decode json with utf8 from names and show account info

Signed-off-by: 21pages <pages21@163.com>
This commit is contained in:
21pages
2023-06-18 13:53:03 +08:00
parent a5ffb5f512
commit ca19246f30
4 changed files with 26 additions and 8 deletions

View File

@@ -1369,7 +1369,7 @@ class _AccountState extends State<_Account> {
physics: DraggableNeverScrollableScrollPhysics(),
controller: scrollController,
children: [
_Card(title: 'Account', children: [accountAction()]),
_Card(title: 'Account', children: [accountAction(), useInfo()]),
],
).marginOnly(bottom: _kListViewBottomMargin));
}
@@ -1383,6 +1383,26 @@ class _AccountState extends State<_Account> {
: gFFI.userModel.logOut()
}));
}
Widget useInfo() {
text(String key, String value) {
return Align(
alignment: Alignment.centerLeft,
child: SelectionArea(child: Text('${translate(key)}: $value'))
.marginSymmetric(vertical: 4),
);
}
return Obx(() => Offstage(
offstage: gFFI.userModel.userName.value.isEmpty,
child: Column(
children: [
text('Username', gFFI.userModel.userName.value),
text('Group', gFFI.groupModel.groupName.value),
],
),
)).marginOnly(left: 18, top: 16);
}
}
class _Checkbox extends StatefulWidget {