| 
									
										
										
										
											2025-07-11 11:03:21 +08:00
										 |  |  | import 'package:flutter/material.dart'; | 
					
						
							|  |  |  | import 'package:qhd_prevention/customWidget/ItemWidgetFactory.dart'; | 
					
						
							|  |  |  | import 'package:qhd_prevention/pages/my_appbar.dart'; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | import '../../tools/tools.dart'; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | class MineAboutPage extends StatefulWidget { | 
					
						
							|  |  |  |   const MineAboutPage({super.key}); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |   @override | 
					
						
							|  |  |  |   State<MineAboutPage> createState() => _MineAboutPageState(); | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | class _MineAboutPageState extends State<MineAboutPage> { | 
					
						
							|  |  |  |   String appVersion = "获取中..."; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |   @override | 
					
						
							|  |  |  |   void initState() { | 
					
						
							|  |  |  |     super.initState(); | 
					
						
							|  |  |  |     _loadAppVersion(); | 
					
						
							|  |  |  |   } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |   Future<void> _loadAppVersion() async { | 
					
						
							| 
									
										
										
										
											2025-09-19 09:36:32 +08:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2025-07-11 11:03:21 +08:00
										 |  |  |     final versionInfo = await getAppVersion(); | 
					
						
							|  |  |  |     setState(() { | 
					
						
							| 
									
										
										
										
											2025-09-19 09:36:32 +08:00
										 |  |  |       appVersion = versionInfo.versionName; | 
					
						
							| 
									
										
										
										
											2025-07-11 11:03:21 +08:00
										 |  |  |     }); | 
					
						
							|  |  |  |   } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |   @override | 
					
						
							|  |  |  |   Widget build(BuildContext context) { | 
					
						
							|  |  |  |     return Scaffold( | 
					
						
							|  |  |  |       appBar: MyAppbar(title: "关于"), | 
					
						
							|  |  |  |       body: SafeArea( | 
					
						
							|  |  |  |         child: Column( | 
					
						
							|  |  |  |           children: [ | 
					
						
							|  |  |  |             SizedBox(height: 80), | 
					
						
							|  |  |  |             SizedBox( | 
					
						
							|  |  |  |               width: 1000, | 
					
						
							|  |  |  |               child: Image.asset( | 
					
						
							|  |  |  |                 "assets/images/app-logo.png", | 
					
						
							|  |  |  |                 width: 70, | 
					
						
							|  |  |  |                 height: 70, | 
					
						
							|  |  |  |               ), | 
					
						
							|  |  |  |             ), | 
					
						
							|  |  |  |             SizedBox(height: 80), | 
					
						
							|  |  |  |             Container( | 
					
						
							|  |  |  |               padding: EdgeInsets.symmetric(horizontal: 15, vertical: 5), | 
					
						
							|  |  |  |               color: Colors.white, | 
					
						
							|  |  |  |               child: ListItemFactory.createRowSpaceBetweenItem( | 
					
						
							|  |  |  |                 leftText: "当前版本", | 
					
						
							|  |  |  |                 rightText: appVersion, | 
					
						
							|  |  |  |               ), | 
					
						
							|  |  |  |             ), | 
					
						
							|  |  |  |           ], | 
					
						
							|  |  |  |         ), | 
					
						
							|  |  |  |       ), | 
					
						
							|  |  |  |     ); | 
					
						
							|  |  |  |   } | 
					
						
							|  |  |  | } |