styleFrom static method
SegmentedControlStyle
styleFrom({
- BorderRadius? borderRadius,
- Color? borderColor,
- double? borderWidth,
- Color? backgroundColor,
- EdgeInsets? padding,
- double? elevation,
- Color? indicatorColor,
- EdgeInsets? indicatorMargin,
- double? indicatorElevation,
- TextStyle? unselectedTextStyle,
- TextStyle? selectedTextStyle,
A helper method to create a SegmentedControlStyle.
Implementation
static SegmentedControlStyle styleFrom({
BorderRadius? borderRadius,
Color? borderColor,
double? borderWidth,
Color? backgroundColor,
EdgeInsets? padding,
double? elevation,
Color? indicatorColor,
EdgeInsets? indicatorMargin,
double? indicatorElevation,
TextStyle? unselectedTextStyle,
TextStyle? selectedTextStyle,
}) {
return SegmentedControlStyle(
borderRadius: borderRadius,
borderColor: borderColor,
borderWidth: borderWidth ?? 1.0,
backgroundColor: backgroundColor,
padding:
padding ?? const EdgeInsets.symmetric(horizontal: 4, vertical: 2),
elevation: elevation ?? 0.0,
indicatorColor: indicatorColor,
indicatorMargin: indicatorMargin,
indicatorElevation: indicatorElevation ?? 0.0,
unselectedTextStyle: unselectedTextStyle,
selectedTextStyle: selectedTextStyle,
);
}