|
@@ -120,9 +120,7 @@ class _MineDetailContainerState extends State<_MineDetailContainer> { |
|
|
_createItem( |
|
|
_createItem( |
|
|
'出生日期', |
|
|
'出生日期', |
|
|
birthday > 0 |
|
|
birthday > 0 |
|
|
? DateFormat('yyyy-MM-dd').format( |
|
|
|
|
|
DateTime.fromMillisecondsSinceEpoch( |
|
|
|
|
|
birthday * 1000)) |
|
|
|
|
|
|
|
|
? DateFormat('yyyy-MM-dd').format(DateTime.fromMillisecondsSinceEpoch(birthday * 1000)) |
|
|
: user?.birthday ?? '', onTap: () { |
|
|
: user?.birthday ?? '', onTap: () { |
|
|
_selectBrithday(); |
|
|
_selectBrithday(); |
|
|
}), |
|
|
}), |
|
@@ -130,16 +128,13 @@ class _MineDetailContainerState extends State<_MineDetailContainer> { |
|
|
_createItem( |
|
|
_createItem( |
|
|
'注册时间', |
|
|
'注册时间', |
|
|
registTime > 0 |
|
|
registTime > 0 |
|
|
? DateFormat('yyyy-MM-dd').format( |
|
|
|
|
|
DateTime.fromMillisecondsSinceEpoch( |
|
|
|
|
|
registTime * 1000)) |
|
|
|
|
|
|
|
|
? DateFormat('yyyy-MM-dd').format(DateTime.fromMillisecondsSinceEpoch(registTime * 1000)) |
|
|
: user?.registerTime ?? ''), |
|
|
: user?.registerTime ?? ''), |
|
|
|
|
|
|
|
|
Padding( padding: const EdgeInsets.only(top: 8),child: _createItem('填写微信号', user?.is_upload_wx == '1' ? '已上传' : '未上传微信号与二维码', |
|
|
|
|
|
onTap: (){ |
|
|
|
|
|
|
|
|
Padding( |
|
|
|
|
|
padding: const EdgeInsets.only(top: 8), |
|
|
|
|
|
child: _createItem('填写微信号', user?.is_upload_wx == '1' ? '已上传' : '未上传微信号与二维码', onTap: () { |
|
|
Navigator.push(context, CupertinoPageRoute(builder: (_) => UploadWeChatPage())); |
|
|
Navigator.push(context, CupertinoPageRoute(builder: (_) => UploadWeChatPage())); |
|
|
})) |
|
|
})) |
|
|
|
|
|
|
|
|
], |
|
|
], |
|
|
), |
|
|
), |
|
|
); |
|
|
); |
|
@@ -148,6 +143,7 @@ class _MineDetailContainerState extends State<_MineDetailContainer> { |
|
|
|
|
|
|
|
|
// 头像 |
|
|
// 头像 |
|
|
Widget _creteHeader(MineDetailModel user, {VoidCallback onTap}) { |
|
|
Widget _creteHeader(MineDetailModel user, {VoidCallback onTap}) { |
|
|
|
|
|
// Logger.log("头像:" + user?.avatar); |
|
|
return GestureDetector( |
|
|
return GestureDetector( |
|
|
child: Container( |
|
|
child: Container( |
|
|
height: 140, |
|
|
height: 140, |
|
@@ -160,9 +156,7 @@ class _MineDetailContainerState extends State<_MineDetailContainer> { |
|
|
width: 80, |
|
|
width: 80, |
|
|
height: 80, |
|
|
height: 80, |
|
|
margin: EdgeInsets.only(top: 15), |
|
|
margin: EdgeInsets.only(top: 15), |
|
|
decoration: BoxDecoration( |
|
|
|
|
|
borderRadius: BorderRadius.circular(40), |
|
|
|
|
|
color: Colors.black12), |
|
|
|
|
|
|
|
|
decoration: BoxDecoration(borderRadius: BorderRadius.circular(40), color: Colors.black12), |
|
|
child: ClipRRect( |
|
|
child: ClipRRect( |
|
|
borderRadius: BorderRadius.circular(40), |
|
|
borderRadius: BorderRadius.circular(40), |
|
|
child: CachedNetworkImage( |
|
|
child: CachedNetworkImage( |
|
@@ -196,10 +190,7 @@ class _MineDetailContainerState extends State<_MineDetailContainer> { |
|
|
Expanded( |
|
|
Expanded( |
|
|
child: Text( |
|
|
child: Text( |
|
|
title ?? '', |
|
|
title ?? '', |
|
|
style: TextStyle( |
|
|
|
|
|
fontSize: 13, |
|
|
|
|
|
color: Color(0xff333333), |
|
|
|
|
|
fontWeight: FontWeight.bold), |
|
|
|
|
|
|
|
|
style: TextStyle(fontSize: 13, color: Color(0xff333333), fontWeight: FontWeight.bold), |
|
|
), |
|
|
), |
|
|
), |
|
|
), |
|
|
Text( |
|
|
Text( |
|
@@ -223,8 +214,7 @@ class _MineDetailContainerState extends State<_MineDetailContainer> { |
|
|
); |
|
|
); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
Widget _createInput(String title, TextEditingController controller, |
|
|
|
|
|
{VoidCallback onTap}) { |
|
|
|
|
|
|
|
|
Widget _createInput(String title, TextEditingController controller, {VoidCallback onTap}) { |
|
|
return GestureDetector( |
|
|
return GestureDetector( |
|
|
child: Container( |
|
|
child: Container( |
|
|
padding: EdgeInsets.only(left: 12.5, right: 12.5), |
|
|
padding: EdgeInsets.only(left: 12.5, right: 12.5), |
|
@@ -235,10 +225,7 @@ class _MineDetailContainerState extends State<_MineDetailContainer> { |
|
|
Expanded( |
|
|
Expanded( |
|
|
child: Text( |
|
|
child: Text( |
|
|
title ?? '', |
|
|
title ?? '', |
|
|
style: TextStyle( |
|
|
|
|
|
fontSize: 13, |
|
|
|
|
|
color: Color(0xff333333), |
|
|
|
|
|
fontWeight: FontWeight.bold), |
|
|
|
|
|
|
|
|
style: TextStyle(fontSize: 13, color: Color(0xff333333), fontWeight: FontWeight.bold), |
|
|
), |
|
|
), |
|
|
), |
|
|
), |
|
|
Expanded( |
|
|
Expanded( |
|
@@ -325,8 +312,7 @@ class _MineDetailContainerState extends State<_MineDetailContainer> { |
|
|
toolbarWidgetColor: Colors.white, |
|
|
toolbarWidgetColor: Colors.white, |
|
|
initAspectRatio: CropAspectRatioPreset.original, |
|
|
initAspectRatio: CropAspectRatioPreset.original, |
|
|
lockAspectRatio: true), |
|
|
lockAspectRatio: true), |
|
|
iosUiSettings: IOSUiSettings( |
|
|
|
|
|
minimumAspectRatio: 1.0, aspectRatioLockEnabled: true)); |
|
|
|
|
|
|
|
|
iosUiSettings: IOSUiSettings(minimumAspectRatio: 1.0, aspectRatioLockEnabled: true)); |
|
|
if (cropperFile == null) { |
|
|
if (cropperFile == null) { |
|
|
return; |
|
|
return; |
|
|
} |
|
|
} |
|
@@ -360,13 +346,13 @@ class _MineDetailContainerState extends State<_MineDetailContainer> { |
|
|
builder: (context) { |
|
|
builder: (context) { |
|
|
return ActionDateAlert( |
|
|
return ActionDateAlert( |
|
|
title: '选择出生日期', |
|
|
title: '选择出生日期', |
|
|
|
|
|
maxTimeNew: "max", |
|
|
); |
|
|
); |
|
|
}, |
|
|
}, |
|
|
isScrollControlled: false, |
|
|
isScrollControlled: false, |
|
|
backgroundColor: Colors.transparent); |
|
|
backgroundColor: Colors.transparent); |
|
|
if (dateTime != null) { |
|
|
if (dateTime != null) { |
|
|
String timeStamp = |
|
|
|
|
|
(dateTime.millisecondsSinceEpoch / 1000).ceil().toString(); |
|
|
|
|
|
|
|
|
String timeStamp = (dateTime.millisecondsSinceEpoch / 1000).ceil().toString(); |
|
|
_bloc.updateUser(birthday: timeStamp); |
|
|
_bloc.updateUser(birthday: timeStamp); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|