PlatformSettingsData class
Constructors
- PlatformSettingsData({bool iosUsesMaterialWidgets = false, bool iosUseZeroPaddingForAppbarPlatformIcon = false, bool legacyIosUsesMaterialWidgets = false, PlatformStyleData platformStyle = const PlatformStyleData(), bool wrapCupertinoAppBarMiddleWithMediaQuery = true, bool matchMaterialCaseForPlatformText = true})
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- iosUsesMaterialWidgets → bool
-
Adds a Material widget to
CupertinoScaffold
, CupertinoTabScaffold and CupertinoAlertDialog to allow for Material widgets to be used. This is required when using a PlatformApp since some Material widgets will expect a Material parent, otherwise an exception is thrown. Note: This may affect fonts and colors and dark mode may not work in all cases. Note: This may cause widgets to show a ripple effect where as before 1.6.0 it did notfinal - iosUseZeroPaddingForAppbarPlatformIcon → bool
-
Sets any padding of the PlatformIconButton to
EdgeInserts.zero
when placed inside a PlatformAppBar. Only affects the padding for the cupertino style and only if no padding is already defined. Will affect all PlatformIconButtons added to the PlatformAppBarfinal - legacyIosUsesMaterialWidgets → bool
-
Adds a Material widget to
CupertinoScaffold
, CupertinoTabScaffold and CupertinoAlertDialog to allow for Material widgets to be used. This is required when using a PlatformApp since some Material widgets will expect a Material parent, otherwise an exception is thrown. Note: This may affect fonts and colors and dark mode may not work in all cases.final - matchMaterialCaseForPlatformText → bool
-
With Material3 spec defining buttons text as being non ALL CAPS (see https://m3.material.io/components/buttons/overview#388f6096-c34d-4a22-8b1f-11ad69963f7c)
If this is set to true then using PlatformText with material3 style will default to sentence case and not ALL CAPS. Material 2 will continue to be ALL CAPS
If this is set to false then it will default to previous behavour of ALL CAPS.
Going forward PlatformText will likely be removed when the material3 property on ThemeData is removed and all material widgets will assume material3 style.
final
- platformStyle → PlatformStyleData
-
The style each platform will use. Either PlatformStyle.Material or
PlatformStyle.Cupertino.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- wrapCupertinoAppBarMiddleWithMediaQuery → bool
-
Add MediaQuery as a parent to any given title value for a PlatformAppBar for the cupertino CupertinoNavigationBar
This is to resolve the somewhat strange behaviour as described in https://github.com/flutter/flutter/issues/42759
Set to true (wrapped) by default which could be a breaking change. If it is then set this value to false
final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited