我在下面有一个屏幕
当我点击配置文件按钮时,我想从我的 firebase 实时数据库中检索当前配置文件的所有数据并显示在下一页(下图)。
这是我用于编辑配置文件屏幕设计的代码。
Widget _NameTextField(String _name) {
return Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Text(
'Full Name',
style: kLabelStyle,
),
SizedBox(height: 10.0),
Container(
alignment: Alignment.centerLeft,
decoration: kBoxDecorationStyle,
height: 60.0,
child: TextFormField(
autovalidate: false,
style: TextStyle(
color: Colors.white,
fontFamily: 'OpenSans',
),
decoration: InputDecoration(
border: InputBorder.none,
contentPadding: EdgeInsets.only(top: 14.0),
prefixIcon: Icon(
Icons.perm_identity,
color: Colors.white,
),
hintText: 'Enter your Full Name',
hintStyle: kHintTextStyle,
),
initialValue: _name,
validator: (String value) {
if (value.isEmpty) {
return 'Name is Required.';
}
if (value.length < …Run Code Online (Sandbox Code Playgroud)