You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

113 lines
3.0 KiB

import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:huixiang/generated/l10n.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:package_info/package_info.dart';
class AboutPage extends StatefulWidget {
@override
State<StatefulWidget> createState() {
return _AboutPage();
}
}
class _AboutPage extends State<AboutPage> {
String version = "1.0.0";
@override
void initState() {
super.initState();
PackageInfo.fromPlatform().then((PackageInfo packageInfo) {
version = packageInfo.version;
setState(() {});
});
}
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text(
S.of(context).guanyu,
style: TextStyle(
color: Colors.black,
fontWeight: FontWeight.bold,
),
),
centerTitle: false,
backgroundColor: Color(0xFFF7F7F7),
elevation: 0,
leading: GestureDetector(
onTap: () {
Navigator.of(context).pop();
},
child: Container(
alignment: Alignment.centerRight,
margin: EdgeInsets.only(left: 10.w),
padding: EdgeInsets.all(6),
child: Icon(
Icons.arrow_back_ios,
color: Colors.black,
size: 24,
),
),
),
titleSpacing: 2.w,
leadingWidth: 56.w,
),
body: Stack(
children: [
Container(
decoration: new BoxDecoration(
border: Border(
bottom: BorderSide(color: Color(0xffF7F7F7), width: 0.0)),
color: Color(0xffF7F7F7),
),
padding: EdgeInsets.only(top: 125.h),
alignment: Alignment.center,
child: Column(
children: [
Image.asset(
"assets/image/icon_about_logo.png",
width: 130.w,
height: 130.h,
),
Padding(
padding: EdgeInsets.only(top: 32.h, bottom: 5.h),
child: Text(
S.of(context).yixinhuixiang,
style: TextStyle(
fontSize: 30.sp,
color: Color(0xff32A060),
),
),
),
Text(
S.of(context).guojiankangyoujishenghuo,
style: TextStyle(
fontSize: 16.sp,
color: Color(0xffB2B2B2),
),
)
],
),
),
Container(
margin: EdgeInsets.only(bottom: 83.h),
alignment: Alignment.bottomCenter,
child: Text(
S.of(context).banben(version),
style: TextStyle(
fontSize: 16.sp,
color: Color(0XFF868686),
),
),
),
],
),
);
}
}