Switcher.rounded constructor
Switcher.rounded({})
The named constructor called rounded that render a circle shaped Switcher
.
- value: Default is
It's required
; - onChange:
It's required
; - duration: Default is
Duration(milliseconds: 100)
; - size: Default is
24.0
; - activeColor: Default is
Theme.of(context).accentColor
; - disableColor: Default is
Theme.of(context).disabledColor
;
Implementation
Switcher.rounded({
required this.value,
required this.onChange,
this.duration = const Duration(milliseconds: 100),
this.size = 24.0,
this.activeColor,
this.disableColor,
}) :
/// Set shape to a `circle`.
this._borderRadius = size * 2.66,
/// Assert [size] is greater than or equal to `16.0`.
assert(size >= 16.0, 'The size must be greater than or equal to 16.0');