FormCast class
FormCast is a class that helps in managing form casts
Constructors
- FormCast({String? type = "capitalize-sentences"})
- FormCast.capitalizeSentences({Widget? prefixIcon, bool clearable = false, Widget? clearIcon})
- Cast to capitalize sentences
- FormCast.capitalizeWords({Widget? prefixIcon, bool clearable = false, Widget? clearIcon})
- Cast to capitalize words
-
FormCast.checkbox({MouseCursor? mouseCursor, Color? activeColor, Color? fillColor, Color? checkColor, Color? hoverColor, Color? overlayColor, double? splashRadius, MaterialTapTargetSize? materialTapTargetSize, VisualDensity? visualDensity, FocusNode? focusNode, bool autofocus = false, 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}) - Cast to a checkbox
- FormCast.chips({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})
- Cast to a chips
- FormCast.currency(String currency)
- Cast to a currency
- FormCast.custom(String type, {dynamic metaData})
- Cast to a custom form field
- FormCast.date({TextStyle? style, VoidCallback? onTap, FocusNode? focusNode, bool autofocus = false, 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.date, DateTimeFieldPickerPlatform pickerPlatform = DateTimeFieldPickerPlatform.adaptive})
- Cast to date
- FormCast.datetime({TextStyle? style, VoidCallback? onTap, FocusNode? focusNode, bool autofocus = false, 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})
- Cast to datetime
- FormCast.email({Widget? prefixIcon, bool clearable = false, Widget? clearIcon})
- Cast to an email
- FormCast.lowercase()
- Cast to uppercase
- FormCast.mask({Widget? prefixIcon, bool clearable = false, Widget? clearIcon, required String? mask, String? match = r'[\w\d]', bool? maskReturnValue = false})
- Cast to text
- FormCast.number({bool decimal = false})
- Cast to a number
- FormCast.password({bool viewable = false})
- Cast to a password
- FormCast.phoneNumber({Widget? prefixIcon, bool clearable = false, Widget? clearIcon})
- Cast to phone number
- FormCast.picker({required List options})
- Cast to a picker
- FormCast.text({Widget? prefixIcon, bool clearable = false, Widget? clearIcon})
- Cast to text
- FormCast.textArea({TextAreaSize textAreaSize = TextAreaSize.sm})
- Cast to a textarea
- FormCast.uppercase()
- Cast to uppercase
- FormCast.url({Widget? prefixIcon, bool clearable = false, Widget? clearIcon})
- Cast to a url
Properties
Methods
-
addMetaData(
Map< String, dynamic> data) → dynamic - Add metadata to the form cast
-
getMetaData(
String name) → dynamic - Get the metadata for the form cast
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited