Flutter 颤振型';盒子装饰';不是类型为';小部件'; FutureBuilder( //数据库中的用户数据 future:getUserData(), 生成器:(BuildContext上下文,异步快照){ if(snapshot
颤振型';盒子装饰';不是类型为';小部件';Flutter 颤振型';盒子装饰';不是类型为';小部件'; FutureBuilder( //数据库中的用户数据 future:getUserData(), 生成器:(BuildContext上下文,异步快照){ if(snapshot,flutter,dart,Flutter,Dart,颤振型';盒子装饰';不是类型为';小部件'; FutureBuilder( //数据库中的用户数据 future:getUserData(), 生成器:(BuildContext上下文,异步快照){ if(snapshot.hasData){ 返回新列( 儿童:[ 容器( 高度:200.0, 装饰:盒子装饰( 梯度:线性梯度( 开始:Alignment.topCenter, 结束:对齐。底部中心, 颜色:[颜色(0xFF051622),颜色(0xFF1BA098
FutureBuilder(
//数据库中的用户数据
future:getUserData(),
生成器:(BuildContext上下文,异步快照){
if(snapshot.hasData){
返回新列(
儿童:[
容器(
高度:200.0,
装饰:盒子装饰(
梯度:线性梯度(
开始:Alignment.topCenter,
结束:对齐。底部中心,
颜色:[颜色(0xFF051622),颜色(0xFF1BA098)],
),
borderRadius:仅限borderRadius(
左下角:半径。圆形(15.0),
右下角:半径。圆形(15.0),
),
),
子:列(
mainAxisSize:mainAxisSize.min,
crossAxisAlignment:crossAxisAlignment.start,
儿童:[
划船(
crossAxisAlignment:crossAxisAlignment.start,
儿童:[
填充物(
衬垫:
仅限常数边集(顶部:18.0,左侧:12.0),
儿童:手势检测器(
孩子:圆环星(
半径:30.0,
背景颜色:Colors.white,
子项:(_imageFile!=null)
?BoxEdition(///这是发生错误的地方
形状:BoxShape.circle,
图像:装饰图像(
image:FileImage(_imageFile),
适合:BoxFit.填充),
)
:Icon(Icons.add_a_photo),//替换为数据库中的图像
),
onTap:(){
_getImage();
},
),
),
扩大(
孩子:填充(
填充:仅限常量边设置(
左:20.0,右:75.0,顶:20.0),
孩子:TextField(
装饰:输入装饰(
enabledBorder:UnderlineInputBorder(
边界边(
颜色:颜色(0xFF1BA098),
),
),
FocusedOrder:下划线输入边框(
边界边(
颜色:颜色(0xFFDEB992),
),
),
hintText:
“${snapshot.data.displayName}”,//名称作为displayName来自数据库
hintStyle:TextStyle(
颜色:颜色。白色,字体大小:18.0),
),
样式:TextStyle(
颜色:颜色。白色,字体大小:18.0),
控制器:newName,
),
),
),
],
),
填充物(
填充:仅限常量边集(顶部:12.0,左侧:20.0),
子:文本(
“${snapshot.data.email}”,//以电子邮件形式从数据库发送电子邮件
样式:TextStyle(
颜色:颜色,白色,
字体大小:16.0,
fontWeight:fontWeight.bold),
),
),
填充物(
填充:仅限常量边集(顶部:7.0,左侧:18.0),
子:文本(
“${snapshot.data.phoneNumber}”,//数据库中的数字作为phoneNumber
样式:TextStyle(
颜色:颜色,白色,
字体大小:16.0,
fontWeight:fontWeight.bold),
),
),
划船(
儿童:[
填充物(
衬垫:
仅限常数边集(顶部:10.0,左侧:18.0),
子:图标(
Icons.star_边框,
尺寸:30.0,
颜色:颜色。琥珀色,
),
),
填充物(
衬垫:
仅限常数边集(顶部:15.0,左侧:2.0),
子:文本(
“0.0”//用户的db评级
样式:TextStyle(
颜色:颜色,白色,
字体大小:15.0,
fontWeight:fontWeight.bold,
fontStyle:fontStyle.italic),
),
),
填充物(
填充:仅限常量边设置(
排名:8.0,
左:
200.0),
子项:ArgonTimerButton(
边界半径:50.0,
颜色:Colors.greenAccent,
身高:35.0,
宽度:100.0,
子:文本(
“更新”,
样式:TextStyle(
字体大小:15.0,
fontWeight:fontWeight。
FutureBuilder(
//UserData from DB
future: getUserData(),
builder: (BuildContext context, AsyncSnapshot<FirebaseUser> snapshot) {
if (snapshot.hasData) {
return new Column(
children: <Widget>[
Container(
height: 200.0,
decoration: BoxDecoration(
gradient: LinearGradient(
begin: Alignment.topCenter,
end: Alignment.bottomCenter,
colors: [Color(0xFF051622), Color(0xFF1BA098)],
),
borderRadius: BorderRadius.only(
bottomLeft: Radius.circular(15.0),
bottomRight: Radius.circular(15.0),
),
),
child: Column(
mainAxisSize: MainAxisSize.min,
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Padding(
padding:
const EdgeInsets.only(top: 18.0, left: 12.0),
child: GestureDetector(
child: CircleAvatar(
radius: 30.0,
backgroundColor: Colors.white,
child: (_imageFile != null)
? BoxDecoration(///This is where error happens
shape: BoxShape.circle,
image: DecorationImage(
image: FileImage(_imageFile),
fit: BoxFit.fill),
)
: Icon(Icons.add_a_photo),//Replace with Image From DB
),
onTap: () {
_getImage();
},
),
),
Expanded(
child: Padding(
padding: const EdgeInsets.only(
left: 20.0, right: 75.0, top: 20.0),
child: TextField(
decoration: InputDecoration(
enabledBorder: UnderlineInputBorder(
borderSide: BorderSide(
color: Color(0xFF1BA098),
),
),
focusedBorder: UnderlineInputBorder(
borderSide: BorderSide(
color: Color(0xFFDEB992),
),
),
hintText:
"${snapshot.data.displayName}", //Name comes from db as displayName
hintStyle: TextStyle(
color: Colors.white, fontSize: 18.0),
),
style: TextStyle(
color: Colors.white, fontSize: 18.0),
controller: newName,
),
),
),
],
),
Padding(
padding: const EdgeInsets.only(top: 12.0, left: 20.0),
child: Text(
"${snapshot.data.email}", //Email from DB as email
style: TextStyle(
color: Colors.white,
fontSize: 16.0,
fontWeight: FontWeight.bold),
),
),
Padding(
padding: const EdgeInsets.only(top: 7.0, left: 18.0),
child: Text(
"${snapshot.data.phoneNumber}", //Number from DB as phoneNumber
style: TextStyle(
color: Colors.white,
fontSize: 16.0,
fontWeight: FontWeight.bold),
),
),
Row(
children: <Widget>[
Padding(
padding:
const EdgeInsets.only(top: 10.0, left: 18.0),
child: Icon(
Icons.star_border,
size: 30.0,
color: Colors.amber,
),
),
Padding(
padding:
const EdgeInsets.only(top: 15.0, left: 2.0),
child: Text(
"0.0", //Rating from db for user
style: TextStyle(
color: Colors.white,
fontSize: 15.0,
fontWeight: FontWeight.bold,
fontStyle: FontStyle.italic),
),
),
Padding(
padding: const EdgeInsets.only(
top: 8.0,
left:
200.0),
child: ArgonTimerButton(
borderRadius: 50.0,
color: Colors.greenAccent,
height: 35.0,
width: 100.0,
child: Text(
"Update",
style: TextStyle(
fontSize: 15.0,
fontWeight: FontWeight.w700,
color: Colors.black,
),
),
loader: (time) {
return Container(
padding: EdgeInsets.all(10.0),
child: SpinKitRing(
color: Color(0xFF1BA098),
lineWidth: 3.0,
size: 20.0,
),
);
},
onTap: (startTimer, btnState) {
startTimer(6);
verifyDetails();
},
),
),
],
),
],
),
),
],
);
}
},
),
Container(
decoration: BoxDecoration( ///This is where error happens
shape: BoxShape.circle,
image: DecorationImage(
image: FileImage("_imageFile"), fit: BoxFit.fill),
),
),