AdvancedSegment<K extends Object, V extends String> constructor
const
AdvancedSegment<K extends Object, V extends String> ({
- Key? key,
- required Map<
K, V> segments, - ValueNotifier<
K> ? controller, - TextStyle activeStyle = const TextStyle(fontWeight: FontWeight.w600),
- TextStyle? inactiveStyle,
- EdgeInsetsGeometry itemPadding = const EdgeInsets.symmetric(horizontal: 15, vertical: 10),
- BorderRadius borderRadius = const BorderRadius.all(Radius.circular(8.0)),
- Color backgroundColor = const Color(0x42000000),
- Color sliderColor = const Color(0xFFFFFFFF),
- double sliderOffset = 2.0,
- Duration animationDuration = const Duration(milliseconds: 250),
- List<
BoxShadow> ? shadow = const <BoxShadow>[BoxShadow(color: Color(0x42000000), blurRadius: 8.0)], - BoxDecoration? sliderDecoration,
Implementation
const AdvancedSegment({
Key? key,
required this.segments,
this.controller,
this.activeStyle = const TextStyle(
fontWeight: FontWeight.w600,
),
this.inactiveStyle,
this.itemPadding = const EdgeInsets.symmetric(
horizontal: 15,
vertical: 10,
),
this.borderRadius = const BorderRadius.all(Radius.circular(8.0)),
this.backgroundColor = const Color(0x42000000),
this.sliderColor = const Color(0xFFFFFFFF),
this.sliderOffset = 2.0,
this.animationDuration = const Duration(milliseconds: 250),
this.shadow = const <BoxShadow>[
BoxShadow(
color: Color(0x42000000),
blurRadius: 8.0,
),
],
this.sliderDecoration,
}) : assert(segments.length > 1, 'Minimum segments amount is 2'),
super(key: key);