mirror of
https://github.com/qinglong-app/qinglong_app.git
synced 2025-10-09 16:48:19 +08:00
Update login_page.dart
This commit is contained in:
@@ -371,35 +371,37 @@ class _LoginPageState extends ConsumerState<LoginPage> {
|
|||||||
),
|
),
|
||||||
Positioned(
|
Positioned(
|
||||||
bottom: 10,
|
bottom: 10,
|
||||||
child: SizedBox(
|
child: (getIt<UserInfoViewModel>().historyAccounts.isEmpty)
|
||||||
width: MediaQuery.of(context).size.width,
|
? const SizedBox.shrink()
|
||||||
child: Center(
|
: SizedBox(
|
||||||
child: Material(
|
width: MediaQuery.of(context).size.width,
|
||||||
color: Colors.transparent,
|
child: Center(
|
||||||
child: PopupMenuButton<UserInfoBean>(
|
child: Material(
|
||||||
onSelected: (UserInfoBean result) {
|
color: Colors.transparent,
|
||||||
selected(result);
|
child: PopupMenuButton<UserInfoBean>(
|
||||||
},
|
onSelected: (UserInfoBean result) {
|
||||||
itemBuilder: (BuildContext context) => <PopupMenuEntry<UserInfoBean>>[
|
selected(result);
|
||||||
...getIt<UserInfoViewModel>()
|
},
|
||||||
.historyAccounts
|
itemBuilder: (BuildContext context) => <PopupMenuEntry<UserInfoBean>>[
|
||||||
.map((e) => PopupMenuItem<UserInfoBean>(
|
...getIt<UserInfoViewModel>()
|
||||||
value: e,
|
.historyAccounts
|
||||||
child: buildCell(e),
|
.map((e) => PopupMenuItem<UserInfoBean>(
|
||||||
))
|
value: e,
|
||||||
.toList(),
|
child: buildCell(e),
|
||||||
],
|
))
|
||||||
child: Text(
|
.toList(),
|
||||||
"切换账号",
|
],
|
||||||
style: TextStyle(
|
child: Text(
|
||||||
color: ref.watch(themeProvider).primaryColor,
|
"切换账号",
|
||||||
fontSize: 14,
|
style: TextStyle(
|
||||||
|
color: ref.watch(themeProvider).primaryColor,
|
||||||
|
fontSize: 14,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
|||||||
Reference in New Issue
Block a user