Closed chitgoks closed 3 years ago
hi. how can it be formatted by default? this is my code
TextFormField( decoration: InputDecoration(labelText: tr('premium')), enabled: connectivityResult != ConnectivityResult.none, initialValue: _policy?.premium == 0 ? '' : _policy?.premium.toString(), inputFormatters: [ CurrencyTextInputFormatter(symbol: '') ], keyboardType: TextInputType.numberWithOptions(decimal: true), textInputAction: TextInputAction.next, validator: (String? value) { return value!.isEmpty ? tr('premium_blank') : null; }, onChanged: (value) { if (value.replaceAll(',', '').length > 0) _policy?.premium = double.parse(value.replaceAll(',', '')); }, ),
The lib works ok when typing. but when it's loaded, it doesnt do any formatting.
Hi, how did you managed this?
sorry, what? what do you mean how i managed this?
hi. how can it be formatted by default? this is my code
The lib works ok when typing. but when it's loaded, it doesnt do any formatting.