schemesWithCustom constant

Map<FlexScheme, FlexSchemeData> const schemesWithCustom

Returns a FlexScheme enum to FlexSchemeData constant map.

Contains all the pre-made ready to use dark and light FlexSchemeColor color values that can be used e.g. by FlexColorScheme. The FlexColor.schemesWithCustom also contain the standard default material design themes, both the normal and the newer high contrast version.

There is no need to use these predefined themes, you can make your own as well. These can be used as an example on how to define your own Flex themes that you can use in an app to allow users to select totally different pre-made nice themes, no just dark and light.

Each pre-made custom theme include hand-tuned light and dark modes colors for the theme it defines.

Implementation

static const Map<FlexScheme, FlexSchemeData> schemesWithCustom =
    <FlexScheme, FlexSchemeData>{
  ...schemes,
  // This custom color set has same colors as the material default theme.
  // It is up to the implementation to provide custom colors or provide
  // other customization solution for this choice. Often an implementation
  // might allow users to copy a pre-made theme's colors as a starting point
  // to this enum theme choice and allow customizations of its colors with a
  // color picker.
  FlexScheme.custom: FlexSchemeData(
    name: customName,
    description: customDescription,
    light: FlexSchemeColor(
      primary: materialLightPrimary,
      primaryVariant: materialLightPrimaryVariant,
      secondary: materialLightSecondary,
      secondaryVariant: materialLightSecondaryVariant,
      appBarColor: materialLightSecondaryVariant,
      error: materialLightError,
    ),
    dark: FlexSchemeColor(
      primary: materialDarkPrimary,
      primaryVariant: materialDarkPrimaryVariant,
      secondary: materialDarkSecondary,
      secondaryVariant: materialDarkSecondaryVariant,
      appBarColor: materialDarkSecondaryVariant,
      error: materialDarkError,
    ),
  ),
};