FlexThemeModeSwitch constructor

const FlexThemeModeSwitch({
  1. Key? key,
  2. required ThemeMode themeMode,
  3. required ValueChanged<ThemeMode> onThemeModeChanged,
  4. required FlexSchemeData flexSchemeData,
  5. Widget? title,
  6. String labelLight = 'LIGHT',
  7. String labelDark = 'DARK',
  8. String labelSystem = 'SYSTEM',
  9. bool showSystemMode = true,
  10. TextStyle? selectedLabelStyle,
  11. TextStyle? unselectedLabelStyle,
  12. bool labelAbove = true,
  13. Color? backgroundLight,
  14. Color? backgroundDark,
  15. Color? backgroundSystem,
  16. BorderSide? selectedBorder,
  17. BorderSide? unselectedBorder,
  18. double selectedElevation = 0,
  19. double unselectedElevation = 0,
  20. EdgeInsets? optionButtonPadding,
  21. EdgeInsets? optionButtonMargin,
  22. double optionButtonBorderRadius = 5,
  23. double height = 24,
  24. double width = 24,
  25. double borderRadius = 4,
  26. EdgeInsets? padding,
  27. Color? hoverColor,
})

Default constructor.

Implementation

const FlexThemeModeSwitch({
  Key? key,
  required this.themeMode,
  required this.onThemeModeChanged,
  required this.flexSchemeData,
  this.title,
  this.labelLight = 'LIGHT',
  this.labelDark = 'DARK',
  this.labelSystem = 'SYSTEM',
  this.showSystemMode = true,
  this.selectedLabelStyle,
  this.unselectedLabelStyle,
  this.labelAbove = true,
  this.backgroundLight,
  this.backgroundDark,
  this.backgroundSystem,
  this.selectedBorder,
  this.unselectedBorder,
  this.selectedElevation = 0,
  this.unselectedElevation = 0,
  this.optionButtonPadding,
  this.optionButtonMargin,
  this.optionButtonBorderRadius = 5,
  this.height = 24,
  this.width = 24,
  this.borderRadius = 4,
  this.padding,
  this.hoverColor,
})  : assert(selectedElevation >= 0.0, 'Selected elevation must be >= 0.0'),
      assert(
          unselectedElevation >= 0.0, 'Unselected elevation must be >= 0.0'),
      super(key: key);