We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Form data from firestore is empty. Some idea / example for loading data ? writing form data is OK.
... Widget _showUserPage(BuildContext context) { _userRead(); return Column( children: <Widget>[ FormBuilder( key: _fbKey, autovalidate: true, initialValue: { 'RagSoc': widget.RagSoc, 'ResDom': widget.ResDom, 'CFPiva': widget.CFPiva, 'Ubicaz': widget.Ubicaz, 'Autorz': widget.Autorz, 'AutorzDate': widget.AutorzDate, }, child: Column( children: <Widget>[ ...
void _userRead() async { await Firestore.instance .collection('USERS') .document(widget.userId) .get() .then((DocumentSnapshot ds) { if (ds.exists) { widget.RagSoc = ds.data['RagSoc'].toString(); widget.ResDom = ds.data['ResDom'].toString(); widget.CFPiva = ds.data['CFPiva'].toString(); widget.Ubicaz = ds.data['Ubicaz'].toString(); widget.Autorz = ds.data['Autorz'].toString(); widget.AutorzDate = ds.data['AutorzDate'].toString(); } }); }
The text was updated successfully, but these errors were encountered:
`My working example === void _getData(id) async { try { await repository.getHabitById(id).then((result) { initData = result.toJson(); }); } catch (e) { print(e); } finally { setState(() { isLoaded = true; }); } } Widget _buildForm() { switch (action) { case "update": return FormBuilder( key: _habitKey, initialValue: isLoaded == true ? initData : {}, autovalidate: false, child: Expanded( child: isLoaded == true ? HabitForm() : Container(), ), ); break; default: return FormBuilder( key: _habitKey, initialValue: {}, autovalidate: false, child: Expanded( child: HabitForm(), ), ); } }`
Sorry, something went wrong.
No branches or pull requests
Form data from firestore is empty.
Some idea / example for loading data ?
writing form data is OK.
The text was updated successfully, but these errors were encountered: