YSAboutUs.dart 5.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144
  1. import 'package:flutter/material.dart';
  2. import 'package:flutter/cupertino.dart';
  3. import 'package:package_info/package_info.dart';
  4. import 'package:ysairplane2/base/YSBase.dart';
  5. import 'package:ysairplane2/tools/YSTools.dart';
  6. import 'YSWebLoad.dart';
  7. class YSAboutUs extends StatefulWidget {
  8. @override
  9. _YSAboutUsState createState() => _YSAboutUsState();
  10. }
  11. class _YSAboutUsState extends State<YSAboutUs> {
  12. String _versionStr = '';
  13. @override
  14. void initState() {
  15. _getVersion();
  16. super.initState();
  17. }
  18. _getVersion() async{
  19. PackageInfo packageInfo = await PackageInfo.fromPlatform();
  20. _versionStr = packageInfo.version;
  21. setState(() {
  22. });
  23. }
  24. @override
  25. Widget build(BuildContext context) {
  26. return YSBase(
  27. ystitle: '',
  28. yschild: Column(
  29. children: [
  30. Container(
  31. height: MediaQuery.of(context).size.height-MediaQuery.of(context).padding.top-44-hsp(300),
  32. width: MediaQuery.of(context).size.width,
  33. alignment: Alignment.center,
  34. child: Column(
  35. mainAxisSize: MainAxisSize.min,
  36. children: [
  37. Container(
  38. height: hsp(120),
  39. width: hsp(120),
  40. decoration: BoxDecoration(
  41. borderRadius: BorderRadius.all(Radius.circular(hsp(24))),
  42. image: DecorationImage(
  43. image: AssetImage('lib/images/icon.png')
  44. )
  45. ),
  46. ),
  47. Container(
  48. margin: EdgeInsets.only(top: hsp(70),bottom: hsp(20)),
  49. child: Text('智慧通航商旅app软件',style: TextStyle(fontSize: zsp(40),color: Color(0xFF161616),fontWeight: FontWeight.bold),),
  50. ),
  51. Text('Version $_versionStr',style: TextStyle(fontSize: zsp(30),color: Color(0xFF161616)),),
  52. GestureDetector(
  53. onTap: (){
  54. Navigator.of(context).push(
  55. CupertinoPageRoute(
  56. builder: (context){
  57. return YSWebLoad();
  58. }
  59. )
  60. );
  61. },
  62. child: Container(
  63. margin: EdgeInsets.only(top: hsp(140)),
  64. width: MediaQuery.of(context).size.width-hsp(140),
  65. height: hsp(100),
  66. decoration: BoxDecoration(
  67. border: Border(top: BorderSide(width: 0.5,color: Color(0xFFE5E5E5)),bottom: BorderSide(width: 0.5,color: Color(0xFFE5E5E5)))
  68. ),
  69. child: Row(
  70. mainAxisAlignment: MainAxisAlignment.spaceBetween,
  71. children: [
  72. Text('产品简介',style: TextStyle(fontSize: zsp(32),color: Color(0xFF161616)),),
  73. Icon(Icons.keyboard_arrow_right,size: hsp(50),color: Color(0xFF999999),)
  74. ],
  75. ),
  76. ),
  77. )
  78. ],
  79. ),
  80. ),
  81. Container(
  82. height: hsp(300),
  83. width: MediaQuery.of(context).size.width,
  84. padding: EdgeInsets.all(hsp(30)),
  85. alignment: Alignment.center,
  86. child: Column(
  87. mainAxisSize: MainAxisSize.min,
  88. children: [
  89. GestureDetector(
  90. onTap: (){
  91. Navigator.of(context).push(
  92. CupertinoPageRoute(
  93. builder: (context){
  94. return YSWebLoad(type: 1,);
  95. }
  96. )
  97. );
  98. },
  99. child: Text('《软件许可及服务协议》',style: TextStyle(fontSize: zsp(24),color: Color(0xFF5B6A91)),),
  100. ),
  101. GestureDetector(
  102. onTap: (){
  103. Navigator.of(context).push(
  104. CupertinoPageRoute(
  105. builder: (context){
  106. return YSWebLoad(type: 2,);
  107. }
  108. )
  109. );
  110. },
  111. child: Container(
  112. margin: EdgeInsets.only(top: hsp(10)),
  113. child: Text('《隐私政策》',style: TextStyle(fontSize: zsp(24),color: Color(0xFF5B6A91)),),
  114. ),
  115. ),
  116. GestureDetector(
  117. onTap: (){
  118. Navigator.of(context).push(
  119. CupertinoPageRoute(
  120. builder: (context){
  121. return YSWebLoad(type: 3,);
  122. }
  123. )
  124. );
  125. },
  126. child: Container(
  127. margin: EdgeInsets.only(top: hsp(10),bottom: hsp(40)),
  128. child: Text('《用户协议》',style: TextStyle(fontSize: zsp(24),color: Color(0xFF5B6A91)),),
  129. ),
  130. ),
  131. Text('智慧通航商旅app软件 版权所有\nCopyright @ 2020-${DateTime.now().year} shunxiangshanglv. All Rights Reserved',
  132. style: TextStyle(fontSize: zsp(23),color: Color(0xFFB3B3B3)),textAlign: TextAlign.center,),
  133. ],
  134. ),
  135. )
  136. ],
  137. ),
  138. );
  139. }
  140. }