I want to change the primary color in my app so I tried:
theme: ThemeData(
primaryColor: const Color(0xFF784CEF),
),
but that didn't work so I checked the documentation I found another way of doing it which is using
colorScheme: ColorScheme.fromSwatch(
primarySwatch: Colors.red,
// but I want 0xFF784CEF as my primary color so I tried
// primarySwatch: Color(0xFF784CEF),
// which gives me an error saying `The argument type 'Color' can't be assigned to the parameter type 'MaterialColor'.`
),
So my question is: how to change the primary color with a hexadecimal color