The argument type ‘Color?’ can’t be assigned to the parameter type ‘MaterialColor?

Also you can use colorScheme property and set like below :

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),

    ),
  ),

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)