FastSwitch class
A FastFormField that contains either a SwitchListTile.adaptive or a CupertinoSwitch.
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatefulWidget
- FormField<
bool> - FastFormField<
bool> - FastSwitch
- Annotations
Constructors
-
FastSwitch({@Deprecated('Use cupertinoErrorBuilder instead.') FastSwitchWidgetBuilder? errorBuilder, @Deprecated('Use cupertinoHelperBuilder instead.') FastSwitchWidgetBuilder? helperBuilder, FastSwitchWidgetBuilder cupertinoErrorBuilder = switchErrorBuilder, FastSwitchWidgetBuilder cupertinoHelperBuilder = switchHelperBuilder, bool? adaptive, AutovalidateMode? autovalidateMode = AutovalidateMode.onUserInteraction, FormFieldBuilder<
bool> builder = switchBuilder, Map<FastConditionHandler, FastConditionList> ? conditions, EdgeInsetsGeometry? contentPadding, InputDecoration? decoration, bool enabled = true, String? helperText, bool? initialValue = false, Key? key, String? labelText, required String name, ValueChanged<bool?> ? onChanged, VoidCallback? onReset, FormFieldSetter<bool> ? onSaved, String? restorationId, FormFieldValidator<bool> ? validator, Color? activeColor, ImageProvider<Object> ? activeThumbImage, Color? activeTrackColor, bool? applyTheme, bool autofocus = false, ListTileControlAffinity controlAffinity = ListTileControlAffinity.platform, FastSwitchWidgetBuilder cupertinoPrefixBuilder = switchPrefixBuilder, DragStartBehavior dragStartBehavior = DragStartBehavior.start, bool? dense, bool? enableFeedback, Color? focusColor, FocusNode? focusNode, Color? hoverColor, Color? inactiveThumbColor, ImageProvider<Object> ? inactiveThumbImage, Color? inactiveTrackColor, bool isThreeLine = false, MaterialTapTargetSize? materialTapTargetSize, MouseCursor? mouseCursor, Color? offLabelColor, void onActiveThumbImageError(Object, StackTrace?)?, void onFocusChange(bool)?, void onInactiveThumbImageError(Object, StackTrace?)?, Color? onLabelColor, MaterialStateProperty<Color?> ? overlayColor, Widget? secondary, Color? selectedTileColor, ShapeBorder? shapeBorder, bool showInputDecoration = true, double? splashRadius, Widget? subtitle, dynamic thumbColor, MaterialStateProperty<Icon?> ? thumbIcon, Color? tileColor, String? titleText, FastSwitchWidgetBuilder titleBuilder = switchTitleBuilder, MaterialStateProperty<Color?> ? trackColor, MaterialStateProperty<Color?> ? trackOutlineColor, VisualDensity? visualDensity}) -
const
Properties
- activeColor → Color?
-
final
-
activeThumbImage
→ ImageProvider<
Object> ? -
final
- activeTrackColor → Color?
-
final
- adaptive → bool?
-
null represents a non-adaptive form field widget
finalinherited
- applyTheme → bool?
-
final
- autofocus → bool
-
final
- autovalidateMode → AutovalidateMode
-
Used to enable/disable this form field auto validation and update its
error text.
finalinherited
-
builder
→ FormFieldBuilder<
bool> -
Function that returns the widget representing this form field. It is
passed the form field state as input, containing the current value and
validation state of this field.
finalinherited
-
conditions
→ Map<
FastConditionHandler, FastConditionList> ? -
finalinherited
- contentPadding → EdgeInsetsGeometry?
-
finalinherited
- controlAffinity → ListTileControlAffinity
-
final
- cupertinoErrorBuilder → FastSwitchWidgetBuilder
-
final
- cupertinoHelperBuilder → FastSwitchWidgetBuilder
-
final
- cupertinoPrefixBuilder → FastSwitchWidgetBuilder
-
final
- decoration → InputDecoration?
-
finalinherited
- dense → bool?
-
final
- dragStartBehavior → DragStartBehavior
-
final
- enabled → bool
-
Whether the form is able to receive user input.
finalinherited
- enableFeedback → bool?
-
final
- focusColor → Color?
-
final
- focusNode → FocusNode?
-
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- helperText → String?
-
finalinherited
- hoverColor → Color?
-
final
- inactiveThumbColor → Color?
-
final
-
inactiveThumbImage
→ ImageProvider<
Object> ? -
final
- inactiveTrackColor → Color?
-
final
- initialValue → bool?
-
An optional value to initialize the form field to, or null otherwise.
finalinherited
- isThreeLine → bool
-
final
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- labelText → String?
-
finalinherited
- materialTapTargetSize → MaterialTapTargetSize?
-
final
- mouseCursor → MouseCursor?
-
final
- name → String
-
finalinherited
- offLabelColor → Color?
-
final
- onActiveThumbImageError → (void Function(Object, StackTrace?)?)
-
final
-
onChanged
→ ValueChanged<
bool?> ? -
finalinherited
- onFocusChange → (void Function(bool)?)
-
final
- onInactiveThumbImageError → (void Function(Object, StackTrace?)?)
-
final
- onLabelColor → Color?
-
final
- onReset → VoidCallback?
-
finalinherited
-
onSaved
→ FormFieldSetter<
bool> ? -
An optional method to call with the final value when the form is saved via
FormState.save.
finalinherited
-
overlayColor
→ MaterialStateProperty<
Color?> ? -
final
- restorationId → String?
-
Restoration ID to save and restore the state of the form field.
finalinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- secondary → Widget?
-
final
- selectedTileColor → Color?
-
final
- shapeBorder → ShapeBorder?
-
final
- showInputDecoration → bool
-
final
- splashRadius → double?
-
final
- subtitle → Widget?
-
final
- thumbColor → dynamic
-
final
-
thumbIcon
→ MaterialStateProperty<
Icon?> ? -
final
- tileColor → Color?
-
final
- titleBuilder → FastSwitchWidgetBuilder
-
final
- titleText → String?
-
final
-
trackColor
→ MaterialStateProperty<
Color?> ? -
final
-
trackOutlineColor
→ MaterialStateProperty<
Color?> ? -
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.
finalinherited
- visualDensity → VisualDensity?
-
final
Methods
-
createElement(
) → StatefulElement -
Creates a StatefulElement to manage this widget's location in the tree.
inherited
-
createState(
) → FastSwitchState -
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