215 lines
7.5 KiB
Dart
215 lines
7.5 KiB
Dart
|
|
|
|
import 'package:circle_app/util/util.dart';
|
|
import 'package:flutter/material.dart';
|
|
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
|
import 'package:get/get.dart';
|
|
|
|
import '../../components/my_app_bar.dart';
|
|
import 'logic.dart';
|
|
|
|
|
|
class AboutappPage extends StatelessWidget {
|
|
AboutappPage({Key? key}) : super(key: key);
|
|
|
|
final logic = Get.find<AboutappLogic>();
|
|
final state = Get
|
|
.find<AboutappLogic>()
|
|
.state;
|
|
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return GetBuilder<AboutappLogic>(builder: (logic) {
|
|
return Container(
|
|
decoration: BoxDecoration(
|
|
image: DecorationImage(
|
|
image: AssetImage(getBaseImage("home_back")),
|
|
fit: BoxFit.cover,
|
|
),
|
|
),
|
|
child: Scaffold(
|
|
backgroundColor: Colors.transparent,
|
|
appBar: const MyAppBar(centerTitle: '关于微乐园',),
|
|
body: Scaffold(
|
|
backgroundColor: Colors.transparent,
|
|
// Replace with your desired color
|
|
body: Container(
|
|
margin: EdgeInsets.only(left: 11.sp, right: 11.sp),
|
|
child: Column(
|
|
mainAxisAlignment: MainAxisAlignment.center,
|
|
crossAxisAlignment: CrossAxisAlignment.center,
|
|
|
|
children: [
|
|
GestureDetector(onTap: (){
|
|
// showToast("13");
|
|
},
|
|
child:Image.asset(
|
|
getBaseImage("ic_launcher"), // Replace with your image path
|
|
width: 100.sp,
|
|
height: 100.sp,
|
|
fit: BoxFit.contain,
|
|
) ,)
|
|
,
|
|
SizedBox(height: 20.sp),
|
|
Text(
|
|
logic.currentVersion,
|
|
style: TextStyle(
|
|
color: const Color(0xFFF7FAFA),
|
|
fontSize: 12.sp,
|
|
),
|
|
),
|
|
SizedBox(height: 10.sp),
|
|
Text(
|
|
'微乐园',
|
|
style: TextStyle(
|
|
color: const Color(0xFFF7FAFA),
|
|
fontSize: 16.sp,
|
|
),
|
|
),
|
|
SizedBox(height: 40.sp),
|
|
Container(
|
|
width: double.infinity,
|
|
height: 0.4.sp,
|
|
color: const Color(0xFF2E2E3B),
|
|
),
|
|
// SizedBox(height: 20),
|
|
// GestureDetector(
|
|
// behavior: HitTestBehavior.opaque,
|
|
// onTap: () {
|
|
// _openBrowser();
|
|
// },
|
|
// child: Row(
|
|
// children: [
|
|
// Text(
|
|
// '评价圈子',
|
|
// style: TextStyle(
|
|
// color: Color(0xFFF7FAFA),
|
|
// fontSize: 16,
|
|
// ),
|
|
// ),
|
|
// Spacer(),
|
|
//
|
|
// SizedBox(width: 8),
|
|
// Image(
|
|
// image: AssetImage(getHomeImage("icon_in")),
|
|
// width: 24.sp,
|
|
// height: 24.sp,
|
|
// fit: BoxFit.fill,
|
|
// ),
|
|
//
|
|
// ],
|
|
// ),
|
|
// ),
|
|
|
|
SizedBox(height: 20.sp),
|
|
GestureDetector(
|
|
behavior: HitTestBehavior.opaque,
|
|
onTap: (){
|
|
navigateToUserAgreement();
|
|
},
|
|
child: Row(
|
|
children: [
|
|
Text(
|
|
'用户协议',
|
|
style: TextStyle(
|
|
color: const Color(0xFFF7FAFA),
|
|
fontSize: 16.sp,
|
|
),
|
|
),
|
|
const Spacer(),
|
|
Image(
|
|
image: AssetImage(getHomeImage("icon_in")),
|
|
width: 24.sp,
|
|
height: 24.sp,
|
|
fit: BoxFit.fill,
|
|
),
|
|
],
|
|
),),
|
|
SizedBox(height: 20.sp),
|
|
GestureDetector(
|
|
behavior: HitTestBehavior.opaque,
|
|
onTap: (){
|
|
navigateToPrivacyPolicy();
|
|
},
|
|
child: Row(
|
|
children: [
|
|
Text(
|
|
'隐私政策',
|
|
style: TextStyle(
|
|
color: const Color(0xFFF7FAFA),
|
|
fontSize: 16.sp,
|
|
),
|
|
),
|
|
const Spacer(),
|
|
Image(
|
|
image: AssetImage(getHomeImage("icon_in")),
|
|
width: 24.sp,
|
|
height: 24.sp,
|
|
fit: BoxFit.fill,
|
|
),
|
|
],
|
|
),)
|
|
,
|
|
SizedBox(height: 20.sp),
|
|
GestureDetector(
|
|
behavior: HitTestBehavior.opaque,
|
|
onTap: (){
|
|
logic.getUpVersion();
|
|
},
|
|
child: Row(
|
|
children: [
|
|
Text(
|
|
'版本更新',
|
|
style: TextStyle(
|
|
color: const Color(0xFFF7FAFA),
|
|
fontSize: 16.sp,
|
|
),
|
|
),
|
|
const Spacer(),
|
|
logic.isUpdate? Container(
|
|
width: 6.sp,
|
|
height: 5.sp,
|
|
margin: EdgeInsets.only(top: 1.sp, right: 8.sp),
|
|
decoration: BoxDecoration(
|
|
color: Colors.red,
|
|
borderRadius: BorderRadius.circular(3.sp),
|
|
),
|
|
):Container(),
|
|
Text(
|
|
logic.version,
|
|
style: TextStyle(
|
|
color: const Color(0xFFB7BECC),
|
|
fontSize: 12.sp,
|
|
),
|
|
),
|
|
SizedBox(width: 8.sp),
|
|
Image(
|
|
image: AssetImage(getHomeImage("icon_in")),
|
|
width: 24.sp,
|
|
height: 24.sp,
|
|
fit: BoxFit.fill,
|
|
),
|
|
],
|
|
),
|
|
),
|
|
],
|
|
),)
|
|
),),
|
|
);
|
|
});
|
|
}
|
|
|
|
|
|
// String url = 'https://www.baidu.com'; // Replace with your desired URL
|
|
//
|
|
// void _openBrowser() async {
|
|
// if (await canLaunch(url)) {
|
|
// await launch(url);
|
|
// } else {
|
|
// throw 'Could not launch $url';
|
|
// }
|
|
// }
|
|
|
|
}
|