FormatRule class

FieldFormatterData

This data class defines the properties every domain field formatter entity must have.

It holds immutable properties that make up the structure and meaning of a field formatter. Use this information to create an input formatter.

Constructors

FormatRule({required String mask, required Map<String, String> filter})
A named parameter const constructor for FieldFormatterData.
const

Properties

filter Map<String, String>
A Map of mask character and Regex string

Example:
final
hashCode int
The hash code for this object.
no setterinherited
isDefined bool
Indicates if the field formatter is defined.

no setter
isNotDefined bool
Indicates if the field formatter is not defined.

no setter
mask String
A string that defines the input mask.

Example: "###-###-####"
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

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

Constants

creditCard → const FormatRule
Credit Card format rules

This is the default format rules for a credit card field.
currency → const FormatRule
Currency format rules

This is the default format rules for a currency field.
date → const FormatRule
Date format rules

This is the default format rules for a date field.
none → const FormatRule
None format rules

This is the default format rules for a field.
percentage → const FormatRule
Percentage format rules

This is the default format rules for a percentage field.
phone → const FormatRule
Phone format rules

This is the default format rules for a phone field.
ssn → const FormatRule
SSN format rules

This is the default format rules for a ssn field.
time → const FormatRule
Time format rules

This is the default format rules for a time field.
zip → const FormatRule
Zip format rules

This is the default format rules for a zip field.