MacosCheckbox class

A checkbox is a type of button that lets the user choose between two opposite states, actions, or values. A selected checkbox is considered on when it contains a checkmark and off when it's empty. A checkbox is almost always followed by a title unless it appears in a checklist.

Inheritance

Constructors

MacosCheckbox({Key? key, required bool? value, required ValueChanged<bool>? onChanged, double size = 16.0, Color? activeColor, Color disabledColor = CupertinoColors.quaternaryLabel, Color offBorderColor = CupertinoColors.tertiaryLabel, String? semanticLabel})
Creates a checkbox.
const

Properties

activeColor Color?
The background color when the checkbox is on or mixed. If null, MacosThemeData.accentColor is used
final
disabledColor Color
The background color when the checkbox is disabled. CupertinoColors.quaternaryLabel is used by default
final
hashCode int
The hash code for this object.
no setterinherited
isDisabled bool
Whether the checkbox is disabled or not.
no setter
isMixed bool
Whether the checkbox is mixed or not.
no setter
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
offBorderColor Color
The color of the border when the checkbox is off. CupertinoColors.tertiaryLabel is used by default
final
onChanged ValueChanged<bool>?
Called whenever the state of the checkbox changes. If null, the checkbox will be considered disabled
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
semanticLabel String?
The semantic label used by screen readers.
final
size double
The size of the checkbox. It must be non-negative.
final
value bool?
Whether the checkbox is checked or not. If null, it'll be considered mixed.
final

Methods

build(BuildContext context) Widget
Describes the part of the user interface represented by this widget.
override
createElement() StatelessElement
Creates a StatelessElement to manage this widget's location in the tree.
inherited
debugDescribeChildren() List<DiagnosticsNode>
Returns a list of DiagnosticsNode objects describing this node's children.
inherited
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
toStringDeep({String prefixLineOne = '', String? prefixOtherLines, DiagnosticLevel minLevel = DiagnosticLevel.debug}) String
Returns a string representation of this node and its descendants.
inherited
toStringShallow({String joiner = ', ', DiagnosticLevel minLevel = DiagnosticLevel.debug}) String
Returns a one-line detailed description of the object.
inherited
toStringShort() String
A short, textual description of this widget.
inherited

Operators

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