FlexThemeModeSwitch constructor

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

Default constructor.

Implementation

const FlexThemeModeSwitch({
  super.key,
  required this.themeMode,
  required this.onThemeModeChanged,
  required this.flexSchemeData,
  this.title,
  this.hasTitle = true,
  this.labelLight = 'LIGHT',
  this.labelDark = 'DARK',
  this.labelSystem = 'SYSTEM',
  this.showSystemMode = true,
  this.buttonOrder = FlexThemeModeButtonOrder.lightDarkSystem,
  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,
  this.focusColor,
})  : assert(selectedElevation >= 0.0, 'Selected elevation must be >= 0.0'),
      assert(
          unselectedElevation >= 0.0, 'Unselected elevation must be >= 0.0');