v5.7.1 - updates

This commit is contained in:
Anthony 2022-02-08 00:30:23 +00:00
parent 388d68271a
commit 6ac676c60b

View File

@ -98,9 +98,16 @@ class _AccountDetailPageState extends State<AccountDetailPage>
if (activeBody == null) { if (activeBody == null) {
return SizedBox.shrink(); return SizedBox.shrink();
} }
if (_wcCustomerInfoResponse != null) { String userAvatar;
print('here'); String userFirstName = "";
print(_wcCustomerInfoResponse.data.avatar); String userLastName = "";
if (_wcCustomerInfoResponse != null && _wcCustomerInfoResponse.data != null) {
userAvatar = _wcCustomerInfoResponse.data.avatar;
userFirstName = _wcCustomerInfoResponse
.data.firstName;
userLastName = _wcCustomerInfoResponse
.data.lastName;
} }
return Scaffold( return Scaffold(
appBar: AppBar( appBar: AppBar(
@ -135,10 +142,8 @@ class _AccountDetailPageState extends State<AccountDetailPage>
children: <Widget>[ children: <Widget>[
Container( Container(
margin: EdgeInsets.only(top: 10), margin: EdgeInsets.only(top: 10),
child: _wcCustomerInfoResponse != null ? CircleAvatar( child: userAvatar != null ? CircleAvatar(
backgroundImage: NetworkImage( backgroundImage: NetworkImage(userAvatar),
_wcCustomerInfoResponse.data.avatar,
),
) : Icon(Icons.account_circle_rounded, size: 65,), ) : Icon(Icons.account_circle_rounded, size: 65,),
height: 90, height: 90,
width: 90, width: 90,
@ -156,18 +161,13 @@ class _AccountDetailPageState extends State<AccountDetailPage>
MainAxisAlignment.spaceAround, MainAxisAlignment.spaceAround,
children: <Widget>[ children: <Widget>[
Text( Text(
(_wcCustomerInfoResponse == null [
? "" userFirstName,
: [ userLastName
_wcCustomerInfoResponse ].where((t) =>
.data.firstName,
_wcCustomerInfoResponse
.data.lastName
]
.where((t) =>
(t != null || t != "")) (t != null || t != ""))
.toList() .toList()
.join(" ")), .join(" "),
style: TextStyle( style: TextStyle(
fontSize: 20, fontSize: 20,
fontWeight: FontWeight.w600, fontWeight: FontWeight.w600,