Field class
Field is a class that helps in managing form fields
Constructors
-
Field(String key, {dynamic value, FormCast? cast, FormValidator? validate, bool autofocus = false, String? dummyData, Widget? header, TextStyle? titleStyle, dynamic style, Map<
String, NyTextField Function(NyTextField nyTextField)> ? metaData = const {}, }) -
Field.checkbox(String key, {dynamic value, FormValidator? validate, bool autofocus = false, String? dummyData, Widget? header, TextStyle? titleStyle, dynamic style, Map<
String, NyTextField Function(NyTextField nyTextField)> ? metaData = const {}, MouseCursor? mouseCursor, Color? activeColor, Color? fillColor, Color? checkColor, Color? hoverColor, Color? overlayColor, double? splashRadius, MaterialTapTargetSize? materialTapTargetSize, VisualDensity? visualDensity, FocusNode? focusNode, ShapeBorder? shape, BorderSide? side, bool isError = false, bool? enabled, Color? tileColor, Widget? title, Widget? subtitle, bool isThreeLine = false, bool? dense, Widget? secondary, bool selected = false, ListTileControlAffinity controlAffinity = ListTileControlAffinity.platform, EdgeInsetsGeometry? contentPadding, bool tristate = false, ShapeBorder? checkboxShape, Color? selectedTileColor, ValueChanged<bool?> ? onFocusChange, bool? enableFeedback, String? checkboxSemanticLabel}) - Field.checkbox is a constructor that helps in managing textArea fields
-
Field.chips(String key, {dynamic value, FormValidator? validate, bool autofocus = false, String? dummyData, Widget? header, TextStyle? titleStyle, dynamic style, Map<
String, NyTextField Function(NyTextField nyTextField)> ? metaData = const {}, required List options, Color? backgroundColor, Color? selectedColor, double headerSpacing = 5, OutlinedBorder shape = const RoundedRectangleBorder(borderRadius: BorderRadius.all(Radius.circular(8))), BorderSide unselectedSide = const BorderSide(color: Colors.grey, width: 1), BorderSide selectedSide = const BorderSide(color: Colors.grey, width: 1), TextStyle labelStyle = const TextStyle(fontWeight: FontWeight.bold, color: Colors.black), TextStyle unselectedTextStyle = const TextStyle(fontWeight: FontWeight.bold, color: Colors.black), TextStyle selectedTextStyle = const TextStyle(fontWeight: FontWeight.bold, color: Colors.white), EdgeInsets padding = const EdgeInsets.all(8.0), double runSpacing = 8.0, double spacing = 8.0, Color checkmarkColor = Colors.white}) - Field.chips is a constructor that helps in managing chips fields
-
Field.currency(String key, {required String currency, dynamic value, FormValidator? validate, bool autofocus = false, String? dummyData, Widget? header, TextStyle? titleStyle, dynamic style, Map<
String, NyTextField Function(NyTextField nyTextField)> ? metaData = const {}, }) - Field.currency is a constructor that helps in managing currency fields
-
Field.date(String key, {dynamic value, FormValidator? validate, bool autofocus = false, String? dummyData, Widget? header, TextStyle? titleStyle, dynamic style, Map<
String, NyTextField Function(NyTextField nyTextField)> ? metaData = const {}, TextStyle? dateTextStyle, VoidCallback? onTap, FocusNode? focusNode, bool? enableFeedback, EdgeInsetsGeometry? padding, bool hideDefaultSuffixIcon = false, DateTime? initialPickerDateTime, CupertinoDatePickerOptions? cupertinoDatePickerOptions, MaterialDatePickerOptions? materialDatePickerOptions, MaterialTimePickerOptions? materialTimePickerOptions, InputDecoration? decoration, DateFormat? dateFormat, DateTime? firstDate, DateTime? lastDate, DateTimeFieldPickerMode mode = DateTimeFieldPickerMode.dateAndTime, DateTimeFieldPickerPlatform pickerPlatform = DateTimeFieldPickerPlatform.adaptive}) - Field.date is a constructor that helps in managing date fields
-
Field.datetime(String key, {dynamic value, FormValidator? validate, bool autofocus = false, String? dummyData, Widget? header, TextStyle? titleStyle, dynamic style, Map<
String, NyTextField Function(NyTextField nyTextField)> ? metaData = const {}, TextStyle? dateTextStyle, VoidCallback? onTap, FocusNode? focusNode, bool? enableFeedback, EdgeInsetsGeometry? padding, bool hideDefaultSuffixIcon = false, DateTime? initialPickerDateTime, CupertinoDatePickerOptions? cupertinoDatePickerOptions, MaterialDatePickerOptions? materialDatePickerOptions, MaterialTimePickerOptions? materialTimePickerOptions, InputDecoration? decoration, DateFormat? dateFormat, DateTime? firstDate, DateTime? lastDate, DateTimeFieldPickerMode mode = DateTimeFieldPickerMode.dateAndTime, DateTimeFieldPickerPlatform pickerPlatform = DateTimeFieldPickerPlatform.adaptive}) - Field.datetime is a constructor that helps in managing datetime fields
-
Field.email(String key, {dynamic value, FormValidator? validate, bool autofocus = false, String? dummyData, Widget? header, TextStyle? titleStyle, dynamic style, Map<
String, NyTextField Function(NyTextField nyTextField)> ? metaData = const {}, Widget? prefixIcon, bool clearable = false, Widget? clearIcon}) - Field.email is a constructor that helps in managing password fields
-
Field.mask(String key, {dynamic value, FormValidator? validate, bool autofocus = false, String? dummyData, Widget? header, TextStyle? titleStyle, dynamic style, Map<
String, NyTextField Function(NyTextField nyTextField)> ? metaData = const {}, Widget? prefixIcon, bool clearable = false, Widget? clearIcon, required String? mask, String? match = r'[\w\d]', bool? maskReturnValue = false}) - Field.mask is a constructor that helps in managing mask fields
-
Field.number(String key, {dynamic value, FormValidator? validate, bool autofocus = false, String? dummyData, Widget? header, TextStyle? titleStyle, dynamic style, Map<
String, NyTextField Function(NyTextField nyTextField)> ? metaData = const {}, bool decimal = false}) - Field.number is a constructor that helps in managing number fields
-
Field.password(String key, {dynamic value, FormValidator? validate, bool autofocus = false, String? dummyData, Widget? header, TextStyle? titleStyle, dynamic style, Map<
String, NyTextField Function(NyTextField nyTextField)> ? metaData = const {}, bool viewable = false}) - Field.password is a constructor that helps in managing password fields
-
Field.phoneNumber(String key, {dynamic value, FormValidator? validate, bool autofocus = false, String? dummyData, Widget? header, TextStyle? titleStyle, dynamic style, Map<
String, NyTextField Function(NyTextField nyTextField)> ? metaData = const {}, Widget? prefixIcon, bool clearable = false, Widget? clearIcon}) - Field.phoneNumber is a constructor that helps in managing phoneNumber fields
-
Field.picker(String key, {dynamic value, FormValidator? validate, bool autofocus = false, String? dummyData, Widget? header, TextStyle? titleStyle, dynamic style, Map<
String, NyTextField Function(NyTextField nyTextField)> ? metaData = const {}, required List<String> options}) - Field.picker is a constructor that helps in managing picker fields
-
Field.text(String key, {dynamic value, FormValidator? validate, bool autofocus = false, String? dummyData, Widget? header, TextStyle? titleStyle, dynamic style, Map<
String, NyTextField Function(NyTextField nyTextField)> ? metaData = const {}, Widget? prefixIcon, bool clearable = false, Widget? clearIcon}) - Field.text is a constructor that helps in managing text fields
-
Field.textArea(String key, {dynamic value, FormValidator? validate, bool autofocus = false, String? dummyData, Widget? header, TextStyle? titleStyle, dynamic style, Map<
String, NyTextField Function(NyTextField nyTextField)> ? metaData = const {}, TextAreaSize textAreaSize = TextAreaSize.sm}) - Field.textArea is a constructor that helps in managing textArea fields
-
Field.url(String key, {dynamic value, FormValidator? validate, bool autofocus = false, String? dummyData, Widget? header, TextStyle? titleStyle, dynamic style, Map<
String, NyTextField Function(NyTextField nyTextField)> ? metaData = const {}, Widget? prefixIcon, bool clearable = false, Widget? clearIcon}) - Field.url is a constructor that helps in managing url fields
Properties
- autofocus ↔ bool
-
The autofocus for the field
getter/setter pair
- cast ↔ FormCast
-
The cast for the field
getter/setter pair
- dummyData ↔ String?
-
The dummy data for the field
getter/setter pair
-
Get the footer of the field
getter/setter pair
- hashCode → int
-
The hash code for this object.
no setterinherited
- header ↔ Widget?
-
Get the header of the field
getter/setter pair
-
Hidden field
getter/setter pair
- key ↔ String
-
The key of the field
getter/setter pair
-
metaData
↔ Map<
String, NyTextField Function(NyTextField nyTextField)> ? -
Get the metadata of the field
getter/setter pair
- name → String
-
Get the name of the field
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- style ↔ dynamic
-
The style for the field
getter/setter pair
- titleStyle ↔ TextStyle?
-
Get the title style of the field
getter/setter pair
- validate ↔ FormValidator?
-
The validator for the field
getter/setter pair
- value ↔ dynamic
-
The value of the field
getter/setter pair
Methods
-
hide(
) → dynamic - Hide the field
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
show(
) → dynamic - Show the field
-
toJson(
) → Map< String, dynamic> - Convert the Field to a Map
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited