CupertinoThemeData class
Styling specifications for a CupertinoTheme.
All constructor parameters can be null, in which case a CupertinoColors.activeBlue based default iOS theme styling is used.
Parameters can also be partially specified, in which case some parameters will cascade down to other dependent parameters to create a cohesive visual effect. For instance, if a primaryColor is specified, it would cascade down to affect some fonts in textTheme if textTheme is not specified.
See also:
- CupertinoTheme, in which this CupertinoThemeData is inserted.
- ThemeData, a Material equivalent that also configures Cupertino styling via a CupertinoThemeData subclass MaterialBasedCupertinoThemeData.
- Inheritance
-
- Object
- NoDefaultCupertinoThemeData
- CupertinoThemeData
- Mixed in types
- Implementers
- Annotations
Constructors
- CupertinoThemeData({Brightness? brightness, Color? primaryColor, Color? primaryContrastingColor, CupertinoTextThemeData? textTheme, Color? barBackgroundColor, Color? scaffoldBackgroundColor, bool? applyThemeToAll})
-
Creates a CupertinoTheme styling specification.
const
- CupertinoThemeData.raw(Brightness? brightness, Color? primaryColor, Color? primaryContrastingColor, CupertinoTextThemeData? textTheme, Color? barBackgroundColor, Color? scaffoldBackgroundColor, bool? applyThemeToAll)
-
Same as the default constructor but with positional arguments to avoid
forgetting any and to specify all arguments.
const
Properties
- applyThemeToAll → bool
-
Flag to apply this theme to all descendant Cupertino widgets.
no setteroverride
- barBackgroundColor → Color
-
Background color of the top nav bar and bottom tab bar.
no setteroverride
- brightness → Brightness?
-
The brightness override for Cupertino descendants.
finalinherited
- hashCode → int
-
The hash code for this object.
no setteroverride
- 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 setteroverride
Methods
-
copyWith(
{Brightness? brightness, Color? primaryColor, Color? primaryContrastingColor, CupertinoTextThemeData? textTheme, Color? barBackgroundColor, Color? scaffoldBackgroundColor, bool? applyThemeToAll}) → CupertinoThemeData -
Creates a copy of the theme data with specified attributes overridden.
override
-
debugFillProperties(
DiagnosticPropertiesBuilder properties) → void -
Add additional properties associated with the node.
override
-
noDefault(
) → NoDefaultCupertinoThemeData -
Returns an instance of the theme data whose property getters only return
the construction time specifications with no derived values.
override
-
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.
override