import 'package:chat/data/constants.dart'; import 'package:chat/generated/i18n.dart'; import 'package:chat/utils/CustomUI.dart'; import 'package:chat/utils/screen.dart'; import 'package:flutter/material.dart'; class UserAgreement extends StatefulWidget { UserAgreement({Key key}) : super(key: key); _UserAgreementState createState() => _UserAgreementState(); } class _UserAgreementState extends State { Widget _buildTitle(str) { return Container( margin: EdgeInsets.only(top: 20, bottom: 0), alignment: Alignment.center, width: Screen.width, child: Text( str, textScaleFactor: 1.0, style: TextStyle(fontSize: 15, fontWeight: FontWeight.w600), ), ); } Widget _buildH1(str) { return Container( margin: EdgeInsets.only(top: 10, bottom: 10), alignment: Alignment.centerLeft, width: Screen.width, child: Text( str, textScaleFactor: 1.0, style: TextStyle(fontSize: 14, fontWeight: FontWeight.w600), ), ); } Widget _buildFoot(str) { return Container( margin: EdgeInsets.only(top: 10, bottom: 10), alignment: Alignment.centerRight, width: Screen.width, child: Text( str, textScaleFactor: 1.0, style: TextStyle(fontSize: 14, fontWeight: FontWeight.w600), ), ); } Widget _buildContent(str) { return Container( alignment: Alignment.centerLeft, width: Screen.width, child: Text( ' ' + str, textScaleFactor: 1.0, style: TextStyle(fontSize: 14, height: 1.35), ), ); } @override Widget build(BuildContext context) { return Scaffold( appBar: AppBar( backgroundColor: AppColors.NewAppbarBgColor, title: Text( I18n.of(context).user_agreement, style: TextStyle(color: AppColors.NewAppbarTextColor), //I18n.of(context).UG_LINE0, textScaleFactor: 1.0, ), centerTitle: true, leading: CustomUI.buildCustomLeading(context), ), body: SafeArea( child: Container( padding: EdgeInsets.only(left: 5, right: 5), color: Colors.white, height: MediaQuery.of(context).size.height, child: SingleChildScrollView( child: Column( children: [ _buildTitle(I18n.of(context).UG_LINE0), _buildH1(I18n.of(context).UG_LINE1), _buildContent(I18n.of(context).UG_LINE2), _buildContent(I18n.of(context).UG_LINE3), _buildH1(I18n.of(context).UG_LINE4), _buildContent(I18n.of(context).UG_LINE5), _buildContent(I18n.of(context).UG_LINE6), _buildContent(I18n.of(context).UG_LINE7), _buildContent(I18n.of(context).UG_LINE8), _buildContent(I18n.of(context).UG_LINE9), _buildContent(I18n.of(context).UG_LINE10), _buildContent(I18n.of(context).UG_LINE11), _buildContent(I18n.of(context).UG_LINE12), _buildContent(I18n.of(context).UG_LINE13), _buildContent(I18n.of(context).UG_LINE14), _buildContent(I18n.of(context).UG_LINE15), _buildContent(I18n.of(context).UG_LINE16), _buildContent(I18n.of(context).UG_LINE17), _buildContent(I18n.of(context).UG_LINE18), _buildContent(I18n.of(context).UG_LINE19), _buildContent(I18n.of(context).UG_LINE20), _buildContent(I18n.of(context).UG_LINE21), _buildContent(I18n.of(context).UG_LINE22), _buildContent(I18n.of(context).UG_LINE23), _buildContent(I18n.of(context).UG_LINE24), _buildContent(I18n.of(context).UG_LINE25), _buildContent(I18n.of(context).UG_LINE26), _buildContent(I18n.of(context).UG_LINE27), _buildContent(I18n.of(context).UG_LINE28), _buildContent(I18n.of(context).UG_LINE29), _buildH1(I18n.of(context).UG_LINE30), _buildContent(I18n.of(context).UG_LINE31), _buildH1(I18n.of(context).UG_LINE32), _buildContent(I18n.of(context).UG_LINE33), _buildH1(I18n.of(context).UG_LINE34), _buildContent(I18n.of(context).UG_LINE35), _buildContent(I18n.of(context).UG_LINE36), _buildContent(I18n.of(context).UG_LINE37), _buildContent(I18n.of(context).UG_LINE38), _buildContent(I18n.of(context).UG_LINE39), _buildContent(I18n.of(context).UG_LINE40), _buildContent(I18n.of(context).UG_LINE41), _buildContent(I18n.of(context).UG_LINE42), _buildH1(I18n.of(context).UG_LINE43), _buildContent(I18n.of(context).UG_LINE44), _buildContent(I18n.of(context).UG_LINE45), _buildContent(I18n.of(context).UG_LINE46), _buildContent(I18n.of(context).UG_LINE47), _buildContent(I18n.of(context).UG_LINE48), _buildContent(I18n.of(context).UG_LINE49), _buildContent(I18n.of(context).UG_LINE50), _buildH1(I18n.of(context).UG_LINE51), _buildContent(I18n.of(context).UG_LINE52), _buildContent(I18n.of(context).UG_LINE53), _buildContent(I18n.of(context).UG_LINE54), _buildContent(I18n.of(context).UG_LINE55), _buildFoot(I18n.of(context).UG_LINE56) ], ), )))); } }