Hibok
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.
 
 
 
 
 
 

145 line
6.1 KiB

  1. import 'package:chat/data/constants.dart';
  2. import 'package:chat/generated/i18n.dart';
  3. import 'package:chat/utils/CustomUI.dart';
  4. import 'package:chat/utils/screen.dart';
  5. import 'package:flutter/material.dart';
  6. class UserAgreement extends StatefulWidget {
  7. UserAgreement({Key key}) : super(key: key);
  8. _UserAgreementState createState() => _UserAgreementState();
  9. }
  10. class _UserAgreementState extends State<UserAgreement> {
  11. Widget _buildTitle(str) {
  12. return Container(
  13. margin: EdgeInsets.only(top: 20, bottom: 0),
  14. alignment: Alignment.center,
  15. width: Screen.width,
  16. child: Text(
  17. str,
  18. style: TextStyle(fontSize: 15, fontWeight: FontWeight.w600),
  19. ),
  20. );
  21. }
  22. Widget _buildH1(str) {
  23. return Container(
  24. margin: EdgeInsets.only(top: 10, bottom: 10),
  25. alignment: Alignment.centerLeft,
  26. width: Screen.width,
  27. child: Text(
  28. str,
  29. style: TextStyle(fontSize: 14, fontWeight: FontWeight.w600),
  30. ),
  31. );
  32. }
  33. Widget _buildFoot(str) {
  34. return Container(
  35. margin: EdgeInsets.only(top: 10, bottom: 10),
  36. alignment: Alignment.centerRight,
  37. width: Screen.width,
  38. child: Text(
  39. str,
  40. style: TextStyle(fontSize: 14, fontWeight: FontWeight.w600),
  41. ),
  42. );
  43. }
  44. Widget _buildContent(str) {
  45. return Container(
  46. alignment: Alignment.centerLeft,
  47. width: Screen.width,
  48. child: Text(
  49. ' ' + str,
  50. style: TextStyle(fontSize: 14, height: 1.35),
  51. ),
  52. );
  53. }
  54. @override
  55. Widget build(BuildContext context) {
  56. return Scaffold(
  57. appBar: AppBar(
  58. backgroundColor: AppColors.NewAppbarBgColor,
  59. title: Text(
  60. I18n.of(context).user_agreement,
  61. style: TextStyle(color: AppColors.NewAppbarTextColor),
  62. //I18n.of(context).UG_LINE0,
  63. textScaleFactor: 1.0,
  64. ),
  65. centerTitle: true,
  66. leading: CustomUI.buildCustomLeading(context),
  67. ),
  68. body: SafeArea(
  69. child: Container(
  70. padding: EdgeInsets.only(left: 5, right: 5),
  71. color: Colors.white,
  72. height: MediaQuery.of(context).size.height,
  73. child: SingleChildScrollView(
  74. child: Column(
  75. children: <Widget>[
  76. _buildTitle(I18n.of(context).UG_LINE0),
  77. _buildH1(I18n.of(context).UG_LINE1),
  78. _buildContent(I18n.of(context).UG_LINE2),
  79. _buildContent(I18n.of(context).UG_LINE3),
  80. _buildH1(I18n.of(context).UG_LINE4),
  81. _buildContent(I18n.of(context).UG_LINE5),
  82. _buildContent(I18n.of(context).UG_LINE6),
  83. _buildContent(I18n.of(context).UG_LINE7),
  84. _buildContent(I18n.of(context).UG_LINE8),
  85. _buildContent(I18n.of(context).UG_LINE9),
  86. _buildContent(I18n.of(context).UG_LINE10),
  87. _buildContent(I18n.of(context).UG_LINE11),
  88. _buildContent(I18n.of(context).UG_LINE12),
  89. _buildContent(I18n.of(context).UG_LINE13),
  90. _buildContent(I18n.of(context).UG_LINE14),
  91. _buildContent(I18n.of(context).UG_LINE15),
  92. _buildContent(I18n.of(context).UG_LINE16),
  93. _buildContent(I18n.of(context).UG_LINE17),
  94. _buildContent(I18n.of(context).UG_LINE18),
  95. _buildContent(I18n.of(context).UG_LINE19),
  96. _buildContent(I18n.of(context).UG_LINE20),
  97. _buildContent(I18n.of(context).UG_LINE21),
  98. _buildContent(I18n.of(context).UG_LINE22),
  99. _buildContent(I18n.of(context).UG_LINE23),
  100. _buildContent(I18n.of(context).UG_LINE24),
  101. _buildContent(I18n.of(context).UG_LINE25),
  102. _buildContent(I18n.of(context).UG_LINE26),
  103. _buildContent(I18n.of(context).UG_LINE27),
  104. _buildContent(I18n.of(context).UG_LINE28),
  105. _buildContent(I18n.of(context).UG_LINE29),
  106. _buildH1(I18n.of(context).UG_LINE30),
  107. _buildContent(I18n.of(context).UG_LINE31),
  108. _buildH1(I18n.of(context).UG_LINE32),
  109. _buildContent(I18n.of(context).UG_LINE33),
  110. _buildH1(I18n.of(context).UG_LINE34),
  111. _buildContent(I18n.of(context).UG_LINE35),
  112. _buildContent(I18n.of(context).UG_LINE36),
  113. _buildContent(I18n.of(context).UG_LINE37),
  114. _buildContent(I18n.of(context).UG_LINE38),
  115. _buildContent(I18n.of(context).UG_LINE39),
  116. _buildContent(I18n.of(context).UG_LINE40),
  117. _buildContent(I18n.of(context).UG_LINE41),
  118. _buildContent(I18n.of(context).UG_LINE42),
  119. _buildH1(I18n.of(context).UG_LINE43),
  120. _buildContent(I18n.of(context).UG_LINE44),
  121. _buildContent(I18n.of(context).UG_LINE45),
  122. _buildContent(I18n.of(context).UG_LINE46),
  123. _buildContent(I18n.of(context).UG_LINE47),
  124. _buildContent(I18n.of(context).UG_LINE48),
  125. _buildContent(I18n.of(context).UG_LINE49),
  126. _buildContent(I18n.of(context).UG_LINE50),
  127. _buildH1(I18n.of(context).UG_LINE51),
  128. _buildContent(I18n.of(context).UG_LINE52),
  129. _buildContent(I18n.of(context).UG_LINE53),
  130. _buildContent(I18n.of(context).UG_LINE54),
  131. _buildContent(I18n.of(context).UG_LINE55),
  132. _buildFoot(I18n.of(context).UG_LINE56)
  133. ],
  134. ),
  135. ))));
  136. }
  137. }