路径规划作业列表 其余界面优化
This commit is contained in:
@@ -10,6 +10,7 @@ import '../../../auth/presentation/bloc/auth_state.dart';
|
||||
import '../../../auth/presentation/pages/login_page.dart';
|
||||
import '../../../web_view/web_view_page.dart';
|
||||
import '../web_view/user_info_pages.dart';
|
||||
|
||||
class MyPage extends StatelessWidget {
|
||||
const MyPage({super.key});
|
||||
|
||||
@@ -46,10 +47,10 @@ class MyPage extends StatelessWidget {
|
||||
// 功能列表
|
||||
_buildFunctionList(context),
|
||||
|
||||
SizedBox(height: 16),
|
||||
//SizedBox(height: 16),
|
||||
|
||||
// 退出登录按钮
|
||||
_buildLogoutButton(context),
|
||||
//// 退出登录按钮
|
||||
//_buildLogoutButton(context),
|
||||
],
|
||||
),
|
||||
),
|
||||
@@ -57,8 +58,8 @@ class MyPage extends StatelessWidget {
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Widget _buildBanner(BuildContext context) { // 添加 context 参数
|
||||
Widget _buildBanner(BuildContext context) {
|
||||
// 添加 context 参数
|
||||
return GestureDetector(
|
||||
onTap: () {
|
||||
Navigator.push(
|
||||
@@ -74,7 +75,9 @@ class MyPage extends StatelessWidget {
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(12),
|
||||
image: DecorationImage(
|
||||
image: NetworkImage('https://c.53326.com/d/file/lan20221010/fyhj0ibovbp.jpg'),
|
||||
image: NetworkImage(
|
||||
'https://c.53326.com/d/file/lan20221010/fyhj0ibovbp.jpg',
|
||||
),
|
||||
fit: BoxFit.cover,
|
||||
),
|
||||
),
|
||||
@@ -109,13 +112,28 @@ class MyPage extends StatelessWidget {
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Widget _buildFunctionList(BuildContext context) {
|
||||
final items = [
|
||||
{'icon': Icons.play_arrow, 'title': '操作视频', 'url': 'https://www.satabot.com/Support/index.html'},
|
||||
{'icon': Icons.car_rental, 'title': '租赁服务', 'url': 'https://www.satabot.com/Leasing.html'},
|
||||
{'icon': Icons.help_outline, 'title': '帮助与支持', 'url': 'https://www.satabot.com/support/index.html'},
|
||||
{'icon': Icons.policy, 'title': '售后政策', 'url': 'https://www.satabot.com/Aftersales-Service.html'},
|
||||
{
|
||||
'icon': Icons.play_arrow,
|
||||
'title': '操作视频',
|
||||
'url': 'https://www.satabot.com/Support/index.html',
|
||||
},
|
||||
{
|
||||
'icon': Icons.car_rental,
|
||||
'title': '租赁服务',
|
||||
'url': 'https://www.satabot.com/Leasing.html',
|
||||
},
|
||||
{
|
||||
'icon': Icons.help_outline,
|
||||
'title': '帮助与支持',
|
||||
'url': 'https://www.satabot.com/support/index.html',
|
||||
},
|
||||
{
|
||||
'icon': Icons.policy,
|
||||
'title': '售后政策',
|
||||
'url': 'https://www.satabot.com/Aftersales-Service.html',
|
||||
},
|
||||
];
|
||||
|
||||
return Container(
|
||||
@@ -143,7 +161,8 @@ class MyPage extends StatelessWidget {
|
||||
Navigator.push(
|
||||
context,
|
||||
MaterialPageRoute(
|
||||
builder: (context) => WebViewPage(url: item['url'] as String),
|
||||
builder: (context) =>
|
||||
WebViewPage(url: item['url'] as String),
|
||||
),
|
||||
);
|
||||
},
|
||||
@@ -154,6 +173,7 @@ class MyPage extends StatelessWidget {
|
||||
Divider(height: 1, color: Colors.grey.withOpacity(0.3)),
|
||||
// 退出登录按钮
|
||||
ListTile(
|
||||
leading: const Icon(Icons.logout, color: Colors.black),
|
||||
title: Text('退出登录', style: TextStyle(color: Colors.black)),
|
||||
trailing: Icon(Icons.exit_to_app, color: Colors.black),
|
||||
onTap: () async {
|
||||
@@ -167,24 +187,20 @@ class MyPage extends StatelessWidget {
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Widget _buildLogoutButton(BuildContext context) {
|
||||
return ElevatedButton(
|
||||
onPressed: () async {
|
||||
await GetIt.I<UserStorage>().deleteUser();
|
||||
GetIt.I<AuthCubit>().logout();
|
||||
context.go(RoutePaths.login);
|
||||
}
|
||||
,
|
||||
},
|
||||
style: ElevatedButton.styleFrom(
|
||||
backgroundColor: Colors.white,
|
||||
foregroundColor: Colors.red,
|
||||
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(12)),
|
||||
padding: EdgeInsets.symmetric(horizontal: 32, vertical: 12),
|
||||
),
|
||||
child: Row(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
child: Row(mainAxisSize: MainAxisSize.min, children: [
|
||||
],
|
||||
),
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user