getPreferredSize method Null safety
override
Returns the preferred size of the shape, based on the given conditions.
Implementation
@override
Size getPreferredSize(bool isEnabled, bool isDiscrete) {
return Size.fromRadius(isEnabled == true ? enabledThumbRadius : _disabledThumbRadius);
}