Closed r-manopa closed 1 year ago
final formKey = GlobalKey<FormBuilderState>(); formKey.currentState?.patchValue({ 'phoneNo': '+66987654321', });
FormBuilder( key: formKey, .... FormBuilderPhoneField( name: 'phoneNo', decoration: const InputDecoration( hintText: 'หมายเลขโทรศัพท์', errorStyle: TextStyle(color: Colors.red), contentPadding: EdgeInsets.all(0.0), ), priorityListByIsoCode: const ['TH'], defaultSelectedCountryIsoCode: 'TH', validator: FormBuilderValidators.compose([ FormBuilderValidators.numeric(errorText: 'ใช้เฉพาะตัวเลขเท่านั้น') ]), ),
dependencies: flutter_form_builder: ^7.7.0 form_builder_phone_field: ^1.3.0 form_builder_validators: ^8.3.0
Try didChange method
not working
dependencies: flutter_form_builder: ^7.7.0 form_builder_phone_field: ^1.3.0 form_builder_validators: ^8.3.0