CheckboxThemeData class Null safety

Defines default property values for descendant Checkbox widgets.

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

Typically a CheckboxThemeData is specified as part of the overall Theme with ThemeData.checkboxTheme.

All CheckboxThemeData properties are null by default. When null, the Checkbox will use the values from ThemeData if they exist, otherwise it will provide its own defaults based on the overall Theme's colorScheme. See the individual Checkbox properties for details.

See also:

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

Constructors

CheckboxThemeData({MaterialStateProperty<MouseCursor?>? mouseCursor, MaterialStateProperty<Color?>? fillColor, MaterialStateProperty<Color?>? checkColor, MaterialStateProperty<Color?>? overlayColor, double? splashRadius, MaterialTapTargetSize? materialTapTargetSize, VisualDensity? visualDensity, OutlinedBorder? shape, BorderSide? side})
Creates a theme that can be used for ThemeData.checkboxTheme.
const

Properties

checkColor MaterialStateProperty<Color?>?
The color to use for the check icon when this checkbox is checked.
final
fillColor MaterialStateProperty<Color?>?
The color that fills the checkbox, in all MaterialStates.
final
hashCode int
The hash code for this object.
read-onlyoverride
materialTapTargetSize MaterialTapTargetSize?
Configures the minimum size of the tap target.
final
mouseCursor MaterialStateProperty<MouseCursor?>?
The cursor for a mouse pointer when it enters or is hovering over the widget.
final
overlayColor MaterialStateProperty<Color?>?
The color for the checkbox's Material.
final
runtimeType Type
A representation of the runtime type of the object.
read-onlyinherited
shape OutlinedBorder?
The shape of the checkbox's Material.
final
side BorderSide?
The color and width of the checkbox's border.
final
splashRadius double?
The splash radius of the circular Material ink response.
final
visualDensity VisualDensity?
Defines how compact the checkbox's layout will be.
final

Methods

copyWith({MaterialStateProperty<MouseCursor?>? mouseCursor, MaterialStateProperty<Color?>? fillColor, MaterialStateProperty<Color?>? checkColor, MaterialStateProperty<Color?>? overlayColor, double? splashRadius, MaterialTapTargetSize? materialTapTargetSize, VisualDensity? visualDensity, OutlinedBorder? shape, BorderSide? side}) CheckboxThemeData
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 non-existent 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(CheckboxThemeData? a, CheckboxThemeData? b, double t) CheckboxThemeData
Linearly interpolate between two CheckboxThemeDatas.