BadgeThemeData class

Overrides the default properties values for descendant Badge widgets.

Descendant widgets obtain the current BadgeThemeData object using BadgeTheme.of(context). Instances of BadgeThemeData can be customized with BadgeThemeData.copyWith.

Typically a BadgeThemeData is specified as part of the overall Theme with ThemeData.badgeTheme.

All BadgeThemeData properties are null by default. When null, the Badge will use the values from ThemeData if they exist, otherwise it will provide its own defaults.

See also:

  • ThemeData, which describes the overall theme information for the application.
Mixed in types
Annotations

Constructors

BadgeThemeData({Color? backgroundColor, Color? textColor, double? smallSize, double? largeSize, TextStyle? textStyle, EdgeInsetsGeometry? padding, AlignmentGeometry? alignment, Offset? offset})
Creates the set of color, style, and size properties used to configure Badge.
const

Properties

alignment AlignmentGeometry?
Overrides the default value for Badge.alignment.
final
backgroundColor Color?
Overrides the default value for Badge.backgroundColor.
final
hashCode int
The hash code for this object.
no setteroverride
largeSize double?
Overrides the default value for Badge.largeSize.
final
offset Offset?
Overrides the default value for Badge.offset.
final
padding EdgeInsetsGeometry?
Overrides the default value for Badge.padding.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
smallSize double?
Overrides the default value for Badge.smallSize.
final
textColor Color?
Overrides the default value for Badge.textColor.
final
textStyle TextStyle?
Overrides the default value for Badge.textStyle.
final

Methods

copyWith({Color? backgroundColor, Color? textColor, double? smallSize, double? largeSize, TextStyle? textStyle, EdgeInsetsGeometry? padding, AlignmentGeometry? alignment, Offset? offset}) BadgeThemeData
Creates a copy of this object but with the given fields replaced with the new values.
debugFillProperties(DiagnosticPropertiesBuilder properties) → void
Add additional properties associated with the node.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
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

Static Methods

lerp(BadgeThemeData? a, BadgeThemeData? b, double t) BadgeThemeData
Linearly interpolate between two Badge themes.