import 'package:flutter/material.dart'; import 'package:qhd_prevention/pages/mine/mine_feedback_page.dart'; import 'package:qhd_prevention/pages/mine/webViewPage.dart'; import 'package:qhd_prevention/pages/mine/mine_about_page.dart'; import 'package:qhd_prevention/pages/mine/mine_set_page.dart'; import 'package:qhd_prevention/tools/tools.dart'; class MinePage extends StatefulWidget { const MinePage({super.key}); @override State createState() => _MinePageState(); } class _MinePageState extends State { @override Widget build(BuildContext context) { return Scaffold( body: ListView(children: [ Container( height: 120, color: Colors.white, padding: EdgeInsets.all(0), child: Padding( padding: EdgeInsets.only(left: 30), child: Row( mainAxisAlignment: MainAxisAlignment.start, spacing: 10, children: [ ClipRRect( borderRadius: BorderRadius.circular(30), child: Image.asset( "assets/images/avatar.png", height: 60, width: 60, ), ), SizedBox( child: Column( mainAxisAlignment: MainAxisAlignment.center, crossAxisAlignment: CrossAxisAlignment.start, spacing: 10, children: [ Text("珊瑚撒", style: TextStyle(fontSize: 17, fontWeight: FontWeight.bold),), Text("手机号:129378348949", style: TextStyle(color: Colors.black54),)], ), ), ], ), ), ), SizedBox(height: 10,), GestureDetector( child: _setItemWidget("设置"), onTap: () { pushPage(MineSetPage(), context); }, ), Divider(height: 1,color: Colors.black12,), GestureDetector( child: _setItemWidget("问题反馈"), onTap: () { pushPage(FeedbackPage(), context); }, ), Divider(height: 1,color: Colors.black12,), GestureDetector( child: _setItemWidget("用户服务协议"), onTap: () { Navigator.push( context, MaterialPageRoute( builder: (context) => const WebViewPage( name: "用户服务协议", url: 'http://47.92.102.56:7811/file/xieyi/zsyhxy.htm', // 替换为目标网址 ), ), ); }, ), Divider(height: 1,color: Colors.black12,), GestureDetector( child: _setItemWidget("用户隐私协议"), onTap: () { Navigator.push( context, MaterialPageRoute( builder: (context) => const WebViewPage( name: "用户隐私协议", url: 'http://47.92.102.56:7811/file/xieyi/zsysq.htm', // 替换为目标网址 ), ), ); }, ), Divider(height: 1,color: Colors.black12,), GestureDetector( child: _setItemWidget("帮助中心"), onTap: () { Navigator.push( context, MaterialPageRoute( builder: (context) => const WebViewPage( name: "帮助中心", url: 'http://47.92.102.56:7811/file/help/help/', // 替换为目标网址 ), ), ); }, ), Divider(height: 1,color: Colors.black12,), GestureDetector( child: _setItemWidget("关于"), onTap: () { pushPage(MineAboutPage(), context); }, ), ],), ); } Widget _setItemWidget(final String text) { return Container( height: 55, color: Colors.white, child: Padding( padding: EdgeInsets.all(15), child: Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ Text(text, style: TextStyle(fontSize: 16),), Icon(Icons.chevron_right) ], ), ), ); } }