122 lines
4.3 KiB
Dart
122 lines
4.3 KiB
Dart
import 'package:flutter/material.dart';
|
|
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
|
import 'package:get/get.dart';
|
|
import 'package:package_info/package_info.dart';
|
|
import 'package:school_asignment_app/page/global_widget/my_text.dart';
|
|
// 其他页面
|
|
|
|
class OhterPage extends StatefulWidget {
|
|
const OhterPage({super.key});
|
|
|
|
@override
|
|
State<OhterPage> createState() => _OhterPageState();
|
|
}
|
|
|
|
class _OhterPageState extends State<OhterPage> {
|
|
RxString localVersion = ''.obs;
|
|
|
|
@override
|
|
void initState() {
|
|
super.initState();
|
|
getPageInfo();
|
|
}
|
|
|
|
// 获取当前版本号
|
|
getPageInfo() async {
|
|
PackageInfo packageInfo = await PackageInfo.fromPlatform();
|
|
localVersion.value = packageInfo.version;
|
|
}
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
final personalInfoTitleStly = TextStyle(
|
|
color: const Color.fromRGBO(80, 87, 103, 1),
|
|
fontSize: 16.sp,
|
|
);
|
|
final personalInfoValStly = TextStyle(
|
|
color: const Color.fromRGBO(148, 163, 182, 1),
|
|
fontSize: 16.sp,
|
|
);
|
|
|
|
return Scaffold(
|
|
backgroundColor: const Color.fromRGBO(248, 248, 248, 1),
|
|
appBar: AppBar(
|
|
backgroundColor: Theme.of(context).primaryColor,
|
|
title: quickText('其他', color: Colors.white),
|
|
),
|
|
body: Stack(
|
|
alignment: const FractionalOffset(0.5, 0.98),
|
|
children: [
|
|
ListView(
|
|
children: [
|
|
Container(
|
|
margin: EdgeInsets.symmetric(vertical: 22.h, horizontal: 16.w),
|
|
padding: EdgeInsets.symmetric(vertical: 22.h, horizontal: 16.w),
|
|
height: 130.h,
|
|
decoration: BoxDecoration(
|
|
borderRadius: BorderRadius.all(Radius.circular(6.w)),
|
|
color: Colors.white,
|
|
boxShadow: const [
|
|
BoxShadow(
|
|
color: Color.fromRGBO(46, 91, 255, 0.1),
|
|
offset: Offset.zero, //阴影y轴偏移量
|
|
blurRadius: 20, //阴影模糊程度
|
|
spreadRadius: 10, //阴影扩散程度
|
|
)
|
|
],
|
|
),
|
|
child: Column(
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
children: [
|
|
InkWell(
|
|
onTap: () {
|
|
/* RouterManager.router.navigateTo(
|
|
context,
|
|
transition: TransitionType.fadeIn,
|
|
'${RouterManager.agreementPath}?type=${AGREEMENT_KEY.PRIVACY_GREEMENT.name}',
|
|
);*/
|
|
},
|
|
child: Container(
|
|
padding: EdgeInsets.only(bottom: 4.h),
|
|
child: Row(
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
children: [
|
|
Text('用户隐私协议', style: personalInfoTitleStly),
|
|
Icon(
|
|
Icons.arrow_forward_ios,
|
|
color: const Color.fromRGBO(80, 87, 103, 1),
|
|
size: 16.sp,
|
|
)
|
|
],
|
|
),
|
|
),
|
|
),
|
|
Container(
|
|
height: 1.w,
|
|
color: const Color.fromRGBO(240, 243, 255, 1),
|
|
),
|
|
SizedBox(height: 8.h),
|
|
Row(
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
children: [
|
|
Text('APP版本', style: personalInfoTitleStly),
|
|
Obx(() {
|
|
return quickText(localVersion);
|
|
})
|
|
],
|
|
)
|
|
],
|
|
),
|
|
),
|
|
],
|
|
),
|
|
Row(
|
|
mainAxisSize: MainAxisSize.min,
|
|
mainAxisAlignment: MainAxisAlignment.center,
|
|
children: [Text('APP备案号: ', style: personalInfoTitleStly), quickText('渝ICP备17007225号-3A', size: 14.sp)],
|
|
),
|
|
],
|
|
));
|
|
}
|
|
}
|