Closed chitgoks closed 4 years ago
text_form_field.dart': Failed assertion: line 123 pos 15: 'initialValue == null || controller == null': is not true.
final MoneyMaskedTextController moneyMask = MoneyMaskedTextController(); TextFormField( controller: moneyMask, decoration: InputDecoration(labelText: 'Currency'), initialValue: 0, keyboardType: TextInputType.numberWithOptions(decimal: true), onChanged: (value) { value = moneyMask.text; print(value); }, onSaved: (value) { moneyMask.updateValue(double.parse(value)); }, ),
Hey, did you solve this problem? I'm facing this problem right now.
yes. you do not use both controller and initialValue at the same time
Many thanks @chitgoks
text_form_field.dart': Failed assertion: line 123 pos 15: 'initialValue == null || controller == null': is not true.