AdaptiveCheckbox 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.

Use this widget to create checkbox buttons with platform-specific styling and behavior:

  • On macOS, MacosCheckbox is utilized.
  • On Windows, Checkbox is used.
Inheritance
Available extensions

Constructors

AdaptiveCheckbox({Key? key, CoreAdaptiveBuilder<Builder<FluentThemeData, CoreWindowsProperty?>, Builder<MacosThemeData, CoreMacosProperty?>>? builders, Widget? label, IconData? icon, String? semanticLabel, Color? foregroundColor, Color? checkedIconColor, Color? uncheckedIconColor, Color? thirdstateIconColor, Decoration? checkedDecoration, Decoration? uncheckedDecoration, Decoration? thirdstateDecoration, required bool? value, required ValueChanged<bool>? onChanged})
Creates a adp-style checkbox.
const

Properties

builders → CoreAdaptiveBuilder<Builder<FluentThemeData, CoreWindowsProperty?>, Builder<MacosThemeData, CoreMacosProperty?>>?
Builders for adapting the component based on platform and theme.
finalinherited
checkedDecoration → Decoration?
The decoration of the checkbox when it's checked
final
checkedIconColor → Color?
The color of the icon when the checkbox is checked
final
foregroundColor → Color?
The color of the label of the checkbox.
final
hashCode → int
The hash code for this object.
no setterinherited
icon → IconData?
The icon displayed in the checkbox when it's checked
final
key → Key?
Controls how one widget replaces another widget in the tree.
finalinherited
label → Widget?
The label of the adp radio button.
final
onChanged → ValueChanged<bool>?
Called when the value of the checkbox should change.
final
properties → CoreProperties<CoreWindowsProperty, CoreMacosProperty>?
Properties for customizing the visual and functional aspects of the adaptive component.
finalinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
semanticLabel → String?
Semantic label for accessibility.
final
thirdstateDecoration → Decoration?
The decoration of the checkbox when it's in its third state
final
thirdstateIconColor → Color?
The color of the icon when the checkbox is in its third state
final
uncheckedDecoration → Decoration?
The decoration of the checkbox when it's unchecked and disabled.
final
uncheckedIconColor → Color?
The color of the icon when the checkbox is unchecked
final
value → bool?
The current value of the AdaptiveCheckbox (true for checked, false for unchecked).
final

Methods

applyDisabledEffect(bool isDisabled, [double disabledOpacity = 0.5, bool? ignoringPointer]) → Widget

Available on Widget, provided by the ApplyDisabledEffect extension

Wraps the current widget with an AnimatedOpacity to visually indicate whether the widget is enabled or disabled.
build(BuildContext context) → Widget
Describes the part of the user interface represented by this widget.
inherited
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.
inherited
getAdaptiveComponent(BuildContext context) → Widget
inherited
macos(BuildContext context, [CoreMacosProperty? property]) → Widget
margeWith(Widget? child, [double? space = 4.0, Axis direction = Axis.horizontal]) → Widget

Available on Widget, provided by the MergeToChild extension

Merges the current widget with child, separated by a SizedBox.
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, int wrapWidth = 65}) → 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
windows(BuildContext context, [CoreWindowsProperty? property]) → Widget

Operators

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