adaptiveRadius property

FlexAdaptive? adaptiveRadius
final

Controls if the defaultRadiusAdaptive is used instead of defaultRadius on configured platforms.

With this feature you can have another configured default border radius on components with a ShapeBorder than what you defined in defaultRadius as default radius.

If you keep defaultRadius undefined and define defaultRadiusAdaptive, you can get the M3 by radius that varies by widget on platforms not included in your adaptiveRadius and use shared global defaultRadiusAdaptive on all widgets in the platforms included in the adaptiveRadius configuration.

With this feature you can let components use their default very round border radius on Android, but set it e.g. to 10 dp on iOS and macOS, and why not desktop platforms as well.

See class FlexAdaptive on how to configure the platform adaptive behavior. You may for example like the FlexAdaptive.iOSAndDesktop for a configuration that only keeps M3 default Material 3 radius on Android and Fuchsia platforms, and when the app is run in a web browser on these platforms, but uses the defaultRadiusAdaptive value on other platforms, like iOS, desktop and their web usage.

If not defined, defaults to FlexAdaptive.off.

Implementation

final FlexAdaptive? adaptiveRadius;