DataFormCheckbox class

A widget that displays a checkbox with a text and a description

Can be used inside a DataForm widget and have an id to save the value on a data map

Inheritance

Constructors

DataFormCheckbox({required String text, String? description, TextStyle? style, TextStyle? descriptionStyle, bool active = false, dynamic onChanged(bool)?, Color? borderColor, String? id, bool background = false, Future<bool> conditional()?, bool useMaterial3 = false, bool unfocusOnChange = false, ColorScheme? colorScheme, BoxDecoration? decoration, CheckboxPosition checkboxPosition = CheckboxPosition.right, EdgeInsets? contentPadding, double? splashRadius, Key? key})
Creates a new switch option
const

Properties

active bool
Whether the checkbox is active or not
final
background bool
Whether to use a background color
final
borderColor Color?
The color of the border
final
checkboxPosition CheckboxPosition
The position of the checkbox
final
colorScheme ColorScheme?
The color scheme to use on the checkbox
final
conditional Future<bool> Function()?
A function to call before changing the value. If the function returns true, the value will be changed, otherwise it will not
final
contentPadding EdgeInsets?
The padding of the content
final
decoration BoxDecoration?
The decoration of the widget
final
description String?
The optional description to display below the text
final
descriptionStyle TextStyle?
The style of the description
final
hashCode int
The hash code for this object.
no setterinherited
id String?
The id to save the value on a data map
final
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
onChanged → dynamic Function(bool)?
The function to call when the checkbox is changed
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
splashRadius double?
The splash radius of the switch item
final
style TextStyle?
The style of the text
final
text String
The text to display
final
unfocusOnChange bool
Whether to unfocus the scope when the value is changed
final
useMaterial3 bool
Whether to use the Material 3 design
final

Methods

createElement() StatefulElement
Creates a StatefulElement to manage this widget's location in the tree.
inherited
createState() State<DataFormCheckbox>
Creates the mutable state for this widget at a given location in the tree.
override
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
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