about_page.dart 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. import 'dart:io';
  2. import 'package:flutter/cupertino.dart';
  3. import 'package:flutter/material.dart';
  4. import 'package:flutter/src/widgets/framework.dart';
  5. import 'package:flutter_screenutil/flutter_screenutil.dart';
  6. import 'package:get/get.dart';
  7. import 'package:get/get_core/src/get_main.dart';
  8. import 'package:location/data/consts/app_config.dart';
  9. import 'package:location/dialog/agreement_dialog.dart';
  10. import 'package:location/resource/assets.gen.dart';
  11. import 'package:location/utils/app_info_util.dart';
  12. import 'package:location/utils/common_expand.dart';
  13. import '../../base/base_page.dart';
  14. import '../../resource/string.gen.dart';
  15. import '../../router/app_pages.dart';
  16. import '../../widget/common_view.dart';
  17. import 'about_controller.dart';
  18. class AboutPage extends BasePage<AboutController> {
  19. const AboutPage({super.key});
  20. static void start() {
  21. Get.toNamed(RoutePath.about);
  22. }
  23. @override
  24. Widget buildBody(BuildContext context) {
  25. return Column(
  26. crossAxisAlignment: CrossAxisAlignment.center,
  27. children: [
  28. CommonView.buildAppBar(StringName.mineFunAbout,
  29. backOnTap: controller.back, titleCenter: false),
  30. SizedBox(height: 48.w),
  31. BuildConfig.logoImage.image(width: 70.w, height: 70.w),
  32. SizedBox(height: 8.w),
  33. Text(BuildConfig.appName,
  34. style: TextStyle(fontSize: 14.sp, color: Colors.black)),
  35. SizedBox(height: 2.w),
  36. Text('当前版本:${appInfoUtil.appVersionName}',
  37. style: TextStyle(fontSize: 12.sp, color: '#A7A7A7'.color)),
  38. Spacer(),
  39. Row(
  40. mainAxisAlignment: MainAxisAlignment.center,
  41. children: [
  42. GestureDetector(
  43. onTap: () => controller.onPrivacyPolicyClick(),
  44. child: Text(StringName.privacyPolicy,
  45. style: TextStyle(fontSize: 12.sp, color: '#579AFF'.color)),
  46. ),
  47. Text(StringName.loginEtPrivacyAnd,
  48. style: TextStyle(fontSize: 12.sp, color: '#A7A7A7'.color)),
  49. GestureDetector(
  50. onTap: () => controller.onTermOfServiceClick(),
  51. child: Text(StringName.termOfService,
  52. style: TextStyle(fontSize: 12.sp, color: '#579AFF'.color)),
  53. ),
  54. ],
  55. ),
  56. SizedBox(height: 1.w),
  57. Text(StringName.recordNumber,
  58. style: TextStyle(fontSize: 12.sp, color: '#A7A7A7'.color)),
  59. SizedBox(height: 52.w),
  60. ],
  61. );
  62. }
  63. }