I am very confused to set the color scheme in my Flutter app properly. Please help me in understanding what actually these things i.e surface, background, secondary, and all others mean.
ThemeData(
fontFamily: 'Poppins',
primaryColor: MyColors.amberPrimary,
colorScheme: const ColorScheme(
primary: MyColors.amberPrimary,
onPrimary: Colors.white,
secondary: Colors.white,
onSecondary: MyColors.amberPrimary,
surface: Colors.white,
onSurface: MyColors.titleFontColor,
background: Colors.white,
onBackground: MyColors.titleFontColor,
brightness: Brightness.light,
error: Colors.red,
one rror: Colors.white,
),
Please elaborate these parameters.
CodePudding user response:
The names are defined by the standard terminology of the "Material Design". You can read more about this at the core website http://material.io, specifically at https://material.io/design/color/the-color-system.html#color-theme-creation.
CodePudding user response:
Please refer to dart's official documentation so that you can understand the latest updated use of these parameters. You can check here