📌  相关文章
📜  参数类型“颜色?”不能分配给参数类型“MaterialColor?”. - 飞镖代码示例

📅  最后修改于: 2022-03-11 14:48:03.033000             🧑  作者: Mango

代码示例1
theme: ThemeData(
    colorScheme: ColorScheme.fromSwatch().copyWith(

      primary: const Colors.yellow[700],
      secondary: const Colors.yellow.shade700,

      // or from RGB

      primary: const Color(0xFF343A40),
      secondary: const Color(0xFFFFC107),

    ),
  ),