AI界面的开发
This commit is contained in:
@@ -1,7 +1,9 @@
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:get_it/get_it.dart';
|
||||
import 'package:go_router/go_router.dart';
|
||||
import '../../../../core/storage/user_storage.dart';
|
||||
import '../../../web_view/web_view_page.dart';
|
||||
import '../web_view/web_view_page.dart'; // 相对路径
|
||||
|
||||
|
||||
|
||||
@@ -33,7 +35,7 @@ class MyPage extends StatelessWidget {
|
||||
SizedBox(height: 16),
|
||||
|
||||
// 退出登录按钮
|
||||
_buildLogoutButton(),
|
||||
_buildLogoutButton(context),
|
||||
],
|
||||
),
|
||||
),
|
||||
@@ -172,9 +174,12 @@ class MyPage extends StatelessWidget {
|
||||
);
|
||||
}
|
||||
|
||||
Widget _buildLogoutButton() {
|
||||
Widget _buildLogoutButton(BuildContext context) {
|
||||
return ElevatedButton(
|
||||
onPressed: () {},
|
||||
onPressed: () async {
|
||||
await GetIt.I<UserStorage>().deleteUser();
|
||||
context.go('/auth/login');
|
||||
},
|
||||
style: ElevatedButton.styleFrom(
|
||||
backgroundColor: Colors.white,
|
||||
foregroundColor: Colors.red,
|
||||
|
||||
Reference in New Issue
Block a user