Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR DART

decimal place textfield flutter

TextFormField(
  keyboardType: TextInputType.numberWithOptions(decimal: true),
  inputFormatters: [
    FilteringTextInputFormatter.allow(RegExp(r'^d+.?d{0,2}')),
  ],
),

TextFormField(
    inputFormatters: [
        WhitelistingTextInputFormatter(RegExp(r'^d+.?d{0,2}')),
    ],
)
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #decimal #place #textfield #flutter
ADD COMMENT
Topic
Name
5+6 =