This commit is contained in:
tao
2025-08-29 13:36:26 +08:00
parent ec7848ad57
commit 6a9c801bd2
9 changed files with 75 additions and 44 deletions

View File

@@ -14,11 +14,6 @@ class AppHeader extends StatefulWidget {
}
class _AppHeaderState extends State<AppHeader> {
void _handLogout() {
var appStore = context.read<AppStore>();
appStore.logout();
context.go(RoutePaths.login);
}
@override
Widget build(BuildContext context) {
@@ -48,31 +43,6 @@ class _AppHeaderState extends State<AppHeader> {
),
],
),
Row(
children: [
PopupMenuButton(
offset: const Offset(0, 50),
color: Theme.of(context).cardColor,
itemBuilder: (context) {
return [
PopupMenuItem(
onTap: _handLogout,
child: Text("Log out"),
),
];
},
child: Container(
width: 40,
height: 40,
decoration: BoxDecoration(
color: Theme.of(context).colorScheme.primary,
shape: BoxShape.circle,
),
child: Icon(RemixIcons.user_3_line, color: Colors.white),
),
),
],
),
],
),
);