GFCheckbox class
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatefulWidget
- GFCheckbox
Constructors
-
GFCheckbox({Key? key, double size = GFSize.MEDIUM, GFCheckboxType type = GFCheckboxType.basic, Color activeBgColor = GFColors.PRIMARY, Color inactiveBgColor = GFColors.WHITE, Color activeBorderColor = GFColors.WHITE, Color inactiveBorderColor = GFColors.DARK, required ValueChanged<
bool> ? onChanged, required bool value, Widget activeIcon = const Icon(Icons.check, size: 20, color: GFColors.WHITE), Widget? inactiveIcon, Color customBgColor = GFColors.SUCCESS, bool autofocus = false, FocusNode? focusNode, FormFieldValidator<bool> ? validator}) -
GFCheckbox is a small box (as in a checklist) in which to place a check mark to make a selection with various customization options.
const
Properties
- activeBgColor → Color
-
type of Color used to change the backgroundColor of the active checkbox
final
- activeBorderColor → Color
-
type of Color used to change the border color of the active checkbox
final
- activeIcon → Widget
-
type of Widget used to change the checkbox's active icon
final
- autofocus → bool
-
on true state this widget will be selected as the initial focus
when no other node in its scope is currently focused
final
- customBgColor → Color
-
type of Color used to change the background color of the custom active checkbox only
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
- inactiveBgColor → Color
-
type of Color used to change the backgroundColor of the inactive checkbox
final
- inactiveBorderColor → Color
-
type of Color used to change the border color of the inactive checkbox
final
- inactiveIcon → Widget?
-
type of Widget used to change the checkbox's inactive icon
final
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
-
onChanged
→ ValueChanged<
bool> ? -
Called when the user checks or unchecks the checkbox.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- size → double
-
type of double which is GFSize ie, small, medium and large and can use any double value
final
- type → GFCheckboxType
-
type of GFCheckboxType which is of four type is basic, square, circular and custom
final
-
validator
→ FormFieldValidator<
bool> ? -
An optional method that validates an input. Returns an error string to
display if the input is invalid, or null otherwise.
final
- value → bool
-
Used to set the current state of the checkbox
final
Methods
-
createElement(
) → StatefulElement -
Creates a StatefulElement to manage this widget's location in the tree.
inherited
-
createState(
) → _GFCheckboxState -
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}) → 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