MaterialBasedCupertinoThemeData class

A CupertinoThemeData that defers unspecified theme attributes to an upstream Material ThemeData.

This type of CupertinoThemeData is used by the Material Theme to harmonize the CupertinoTheme with the material theme's colors and text styles.

In the most basic case, ThemeData's cupertinoOverrideTheme is null and descendant Cupertino widgets' styling is derived from the Material theme.

To override individual parts of the Material-derived Cupertino styling, cupertinoOverrideTheme's construction parameters can be used.

To completely decouple the Cupertino styling from Material theme derivation, another CupertinoTheme widget can be inserted as a descendant of the Material Theme. On a MaterialApp, this can be done using the builder parameter on the constructor.

See also:

Inheritance

Constructors

MaterialBasedCupertinoThemeData({required ThemeData materialTheme})
Create a MaterialBasedCupertinoThemeData based on a Material ThemeData and its cupertinoOverrideTheme.

Properties

applyThemeToAll bool
Flag to apply this theme to all descendant Cupertino widgets.
no setterinherited
barBackgroundColor Color
Background color of the top nav bar and bottom tab bar.
no setterinherited
brightness Brightness
The brightness override for Cupertino descendants.
no setteroverride
hashCode int
The hash code for this object.
no setterinherited
primaryColor Color
A color used on interactive elements of the theme.
no setteroverride
primaryContrastingColor Color
A color that must be easy to see when rendered on a primaryColor background.
no setteroverride
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
scaffoldBackgroundColor Color
Background color of the scaffold.
no setteroverride
textTheme CupertinoTextThemeData
Text styles used by Cupertino widgets.
no setterinherited

Methods

copyWith({Brightness? brightness, Color? primaryColor, Color? primaryContrastingColor, CupertinoTextThemeData? textTheme, Color? barBackgroundColor, Color? scaffoldBackgroundColor, bool? applyThemeToAll}) MaterialBasedCupertinoThemeData
Copies the ThemeData's cupertinoOverrideTheme.
override
debugFillProperties(DiagnosticPropertiesBuilder properties) → void
Add additional properties associated with the node.
inherited
noDefault() NoDefaultCupertinoThemeData
Returns an instance of the theme data whose property getters only return the construction time specifications with no derived values.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
resolveFrom(BuildContext context) CupertinoThemeData
Returns a new theme data with all its colors resolved against the given BuildContext.
override
toDiagnosticsNode({String? name, DiagnosticsTreeStyle? style}) DiagnosticsNode
Returns a debug representation of the object that is used by debugging tools and by DiagnosticsNode.toStringDeep.
inherited
toString({DiagnosticLevel minLevel = DiagnosticLevel.info}) String
A string representation of this object.
inherited
toStringShort() String
A brief description of this object, usually just the runtimeType and the hashCode.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited