FlexSchemeColor constructor

const FlexSchemeColor({
  1. required Color primary,
  2. required Color primaryVariant,
  3. required Color secondary,
  4. required Color secondaryVariant,
  5. Color? appBarColor,
  6. Color? error,
})

Default constructor, that requires the main four colors.

Consider using the FlexSchemeColor.from factory constructor for more flexibility and less required values based on using computed defaults for missing, but required values in a complete FlexSchemeColor.

If you are defining all four required color values, then prefer using this default constructor as it can be const.

The appBarColor and error colors are not required, if they are null, they will be provided by defaults in theme creation later.

Implementation

const FlexSchemeColor({
  required final this.primary,
  required final this.primaryVariant,
  required final this.secondary,
  required final this.secondaryVariant,
  final this.appBarColor,
  final this.error,
});