SwitcherWidget constructor
const
SwitcherWidget({})
The default SwitcherWidget constructor.
- size;
- borderRadius;
- selected;
- duration;
Implementation
const SwitcherWidget({
required this.size,
required this.borderRadius,
required this.selected,
required this.duration,
this.activeColor,
this.disableColor,
}) :
/// This is a inner variable to control the size background of `SwitcherWidget`.
/// The value of this variable is equal to `size * (times) 1.8`.
this._backgroundSize = size * 1.8;