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