PlatformAdaptiveContextExtensions extension
Extensions on BuildContext for resolving platform-specific values.
Provides convenience methods to select between Material (Android) and Cupertino (iOS) values based on defaultTargetPlatform.
- on
Properties
- platformAdaptiveIcons → PlatformAdaptiveIcons
-
Available on BuildContext, provided by the PlatformAdaptiveContextExtensions extension
Render either a Material or Cupertino icon based on the platformno setter
Methods
-
platformIcon(
{required IconData material, required IconData cupertino}) → IconData -
Available on BuildContext, provided by the PlatformAdaptiveContextExtensions extension
Returns the platform-appropriate IconData. -
platformLazyNullable<
T> ({ValueGetter< T> ? material, ValueGetter<T> ? cupertino}) → T? -
Available on BuildContext, provided by the PlatformAdaptiveContextExtensions extension
Returns the platform-appropriate nullable value of typeT, lazily evaluated. -
platformLazyValue<
T> ({required ValueGetter< T> material, required ValueGetter<T> cupertino}) → T -
Available on BuildContext, provided by the PlatformAdaptiveContextExtensions extension
Returns the platform-appropriate value of typeT, lazily evaluated. -
platformValue<
T> ({required T material, required T cupertino}) → T -
Available on BuildContext, provided by the PlatformAdaptiveContextExtensions extension
Returns the platform-appropriate value of typeT. -
platformValueNullable<
T> ({T? material, T? cupertino}) → T? -
Available on BuildContext, provided by the PlatformAdaptiveContextExtensions extension
Returns the platform-appropriate nullable value of typeT.