setting_view.dart 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160
  1. import 'package:clean/base/base_page.dart';
  2. import 'package:clean/base/base_view.dart';
  3. import 'package:clean/data/consts/constants.dart';
  4. import 'package:clean/module/setting/setting_controller.dart';
  5. import 'package:flutter/Material.dart';
  6. import 'package:flutter_screenutil/flutter_screenutil.dart';
  7. import 'package:get/get.dart';
  8. import '../../resource/assets.gen.dart';
  9. import '../browser/browser_view.dart';
  10. class SettingPage extends BasePage<SettingController> {
  11. const SettingPage({super.key});
  12. @override
  13. bool statusBarDarkFont() {
  14. return false;
  15. }
  16. @override
  17. bool immersive() {
  18. return true;
  19. }
  20. @override
  21. Widget buildBody(BuildContext context) {
  22. return Stack(
  23. children: [
  24. SafeArea(
  25. child: Container(
  26. padding: EdgeInsets.only(left: 16.w, top: 14.h, right: 16.w),
  27. child: Column(
  28. mainAxisAlignment: MainAxisAlignment.start,
  29. crossAxisAlignment: CrossAxisAlignment.start,
  30. children: [
  31. GestureDetector(
  32. onTap: () {
  33. Get.back();
  34. },
  35. child: Assets.images.iconCommonBack
  36. .image(width: 28.w, height: 28.w),
  37. ),
  38. SizedBox(
  39. height: 12.h,
  40. ),
  41. Text(
  42. "Settings",
  43. style: TextStyle(
  44. color: Colors.white,
  45. fontSize: 24.sp,
  46. fontWeight: FontWeight.w700,
  47. ),
  48. ),
  49. SizedBox(
  50. height: 25.h,
  51. ),
  52. Container(
  53. height: 124.h,
  54. width: 328.w,
  55. decoration: BoxDecoration(
  56. color: Colors.white.withOpacity(0.12),
  57. borderRadius: BorderRadius.all(
  58. Radius.circular(10.r),
  59. ),
  60. ),
  61. child: Column(
  62. children: [
  63. GestureDetector(
  64. onTap: () {
  65. BrowserPage.start(Constants.privacyPolicy);
  66. },
  67. child: SizedBox(
  68. height: 62.h,
  69. child: Row(
  70. children: [
  71. SizedBox(
  72. width: 13.w,
  73. ),
  74. Assets.images.iconSettingPrivacy
  75. .image(width: 20.w, height: 20.w),
  76. SizedBox(
  77. width: 8.w,
  78. ),
  79. Text(
  80. "Privacy Policy",
  81. style: TextStyle(
  82. color: Colors.white,
  83. fontSize: 16.sp,
  84. fontWeight: FontWeight.w500,
  85. ),
  86. ),
  87. Spacer(),
  88. Icon(
  89. Icons.arrow_forward,
  90. color: Colors.white.withOpacity(0.55),
  91. ),
  92. SizedBox(
  93. width: 15.w,
  94. ),
  95. ],
  96. ),
  97. ),
  98. ),
  99. Container(
  100. margin: EdgeInsets.symmetric(horizontal: 16.w),
  101. height: 1,
  102. color: Colors.white.withOpacity(0.06),
  103. ),
  104. GestureDetector(
  105. onTap: () {
  106. BrowserPage.start(Constants.userAgreement);
  107. },
  108. child: SizedBox(
  109. height: 61.h,
  110. child: Row(
  111. children: [
  112. SizedBox(
  113. width: 13.w,
  114. ),
  115. Assets.images.iconSettingAgreement
  116. .image(width: 20.w, height: 20.w),
  117. SizedBox(
  118. width: 8.w,
  119. ),
  120. Text(
  121. "User Agreement",
  122. style: TextStyle(
  123. color: Colors.white,
  124. fontSize: 16.sp,
  125. fontWeight: FontWeight.w500,
  126. ),
  127. ),
  128. Spacer(),
  129. Icon(
  130. Icons.arrow_forward,
  131. color: Colors.white.withOpacity(0.55),
  132. ),
  133. SizedBox(
  134. width: 15.w,
  135. ),
  136. ],
  137. ),
  138. ),
  139. )
  140. ],
  141. ),
  142. )
  143. ],
  144. ),
  145. ),
  146. ),
  147. IgnorePointer(
  148. child: Assets.images.bgHome.image(
  149. width: 360.w,
  150. ),
  151. ),
  152. ],
  153. );
  154. }
  155. }