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 iOS, CupertinoCheckbox is utilized.
- On Android, Checkbox is used.
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatelessWidget
- CoreAdaptiveComponent<
CoreAndroidProperty, CoreIOSProperty> - AdaptiveCheckbox
- Available extensions
Constructors
-
AdaptiveCheckbox({Key? key, CoreAdaptiveBuilder<
Builder< ? builders, BorderSide? side, Widget? label, OutlinedBorder? shape, Color? activeColor, Color? inactiveColor, bool autofocus = false, Color? checkColor, Color? focusColor, FocusNode? focusNode, required bool? value, required ValueChanged<ThemeData, CoreAndroidProperty?> , Builder<CupertinoThemeData, CoreIOSProperty?> >bool> ? onChanged}) -
Creates a adp-style checkbox.
const
Properties
- activeColor → Color?
-
The color to use when this checkbox is checked.
final
- autofocus → bool
-
True if this widget will be selected as the initial focus when no other
node in its scope is currently focused.
final
-
builders
→ CoreAdaptiveBuilder<
Builder< ?ThemeData, CoreAndroidProperty?> , Builder<CupertinoThemeData, CoreIOSProperty?> > -
Builders for adapting the component based on platform and theme.
finalinherited
- checkColor → Color?
-
The color to use for the check icon when this checkbox is checked.
final
- focusColor → Color?
-
The color for the checkbox border shadow when it has the input focus.
final
- focusNode → FocusNode?
-
An optional focus node to use as the focus node for this widget.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- inactiveColor → Color?
-
The color used if the checkbox is inactive and disabled.
final
- isEnabled → bool
-
if onChanged callback is not null, indicating that the checkbox is enabled.
no setter
- isTriState → bool
-
if the value of the checkbox is null, indicating it's in a tri-state mode.
no setter
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- label → Widget?
-
The label of the adp checkbox button.
final
-
onChanged
→ ValueChanged<
bool> ? -
Called when the value of the checkbox should change.
final
-
properties
→ CoreProperties<
CoreAndroidProperty, CoreIOSProperty> ? -
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
- shape → OutlinedBorder?
-
The shape of the checkbox.
final
- side → BorderSide?
-
The color and width of the checkbox border.
final
- value → bool?
-
The current value of the AdaptiveCheckbox (true for checked, false for unchecked).
final
Methods
-
android(
BuildContext context, [CoreAndroidProperty? property]) → Widget -
applyDisabledEffect(
bool isDisabled, [double disabledOpacity = 0.5, bool? ignoringPointer]) → Widget -
Available on Widget, provided by the ApplyDisabledEffect extension
Wraps the current widget with anAnimatedOpacityto 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
-
iOS(
BuildContext context, [CoreIOSProperty? 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 withchild, 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
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited