flutter_form_builder
flutter_form_builder copied to clipboard
Type safe forms values
trafficstars
currently FormBuilder.initialValue(formSchema)
formSchema is Map<String, dynamic>
any plans for making "form schema" type safe?
/// An optional Map of field initialValues. Keys correspond to the field's
/// name and value to the initialValue of the field.
///
/// The initialValues set here will be ignored if the field has a local
/// initialValue set.
final Map<String, dynamic> initialValue; // current solution
final T initialValue; // Maybe someday in the future?
I don't sure if this is possible, because form use a map to fieldNames (String key) and your values (dynamic value).
If do you have a solution, please feel free to make comments or a pull request