getPreferredSize method

  1. @override
Size getPreferredSize(
  1. bool isEnabled,
  2. bool isDiscrete
)
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 ? enabledThumbRadius : _disabledThumbRadius);
}