FlexThemeModeSwitch constructor
const
FlexThemeModeSwitch(
- {Key? key,
- required ThemeMode themeMode,
- required ValueChanged<
ThemeMode> onThemeModeChanged, - required FlexSchemeData flexSchemeData,
- Widget? title,
- bool hasTitle = true,
- String labelLight = 'LIGHT',
- String labelDark = 'DARK',
- String labelSystem = 'SYSTEM',
- bool showSystemMode = true,
- FlexThemeModeButtonOrder buttonOrder = FlexThemeModeButtonOrder.lightDarkSystem,
- TextStyle? selectedLabelStyle,
- TextStyle? unselectedLabelStyle,
- bool labelAbove = true,
- Color? backgroundLight,
- Color? backgroundDark,
- Color? backgroundSystem,
- BorderSide? selectedBorder,
- BorderSide? unselectedBorder,
- double selectedElevation = 0,
- double unselectedElevation = 0,
- EdgeInsetsGeometry? optionButtonPadding,
- EdgeInsetsGeometry? optionButtonMargin,
- double optionButtonBorderRadius = 5,
- double height = 24,
- double width = 24,
- double borderRadius = 4,
- EdgeInsetsGeometry? padding,
- Color? hoverColor,
- 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');