about.dart 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. import 'package:flutter/material.dart';
  2. import 'package:twong/config/protocols.dart';
  3. import 'package:twong/config/style.dart';
  4. import 'package:twong/router/base.dart';
  5. import 'package:twong/utils/index.dart';
  6. import 'package:twong/widgets/app_bar.dart';
  7. class AboutPage extends StatelessWidget {
  8. @override
  9. Widget build(BuildContext context) {
  10. return Scaffold(
  11. appBar: DAppBar("关于我们"),
  12. body: SafeArea(
  13. child: Column(
  14. children: [
  15. Expanded(child: _buildLogo()),
  16. _buildButtons(context),
  17. _buildBottom()
  18. ],
  19. ),
  20. ),
  21. );
  22. }
  23. Widget _buildLogo() {
  24. return Container(
  25. margin: EdgeInsets.only(bottom: 186.px),
  26. child: Center(
  27. child: Image(image: AssetImage("assets/images/logo.png"), width: 128.px),
  28. ),
  29. );
  30. }
  31. Widget _buildButtons(BuildContext context) {
  32. return Container(
  33. margin: EdgeInsets.only(bottom: 36.px),
  34. child: Column(
  35. children: [
  36. Container(
  37. width: 108.px,
  38. child: OutlineButton(onPressed: () {
  39. Navigator.pushNamed(context, RouteNames.protocol, arguments: ProtocolType.USER);
  40. }, child: Text("用户注册协议"), highlightColor: Colors.transparent),
  41. ),
  42. Container(
  43. width: 108.px,
  44. child: OutlineButton(onPressed: () {
  45. Navigator.pushNamed(context, RouteNames.protocol, arguments: ProtocolType.PRIVATE);
  46. }, child: Text("隐私政策"), highlightColor: Colors.transparent),
  47. ),
  48. Container(
  49. child: Text("V1.0.0"),
  50. )
  51. ],
  52. ),
  53. );
  54. }
  55. Widget _buildBottom() {
  56. return Container(
  57. margin: EdgeInsets.only(bottom: 16.px),
  58. child: Wrap(
  59. children: [
  60. Text("Copyright - 美天旺-郑州完璧时空网络科技有限公司 - All rights reserved"
  61. ,textAlign: TextAlign.center, style: TextStyle(fontSize: 10.px))
  62. ],
  63. ),
  64. );
  65. }
  66. }