| <svg width="62" height="69" viewBox="0 0 62 69" fill="none" xmlns="http://www.w3.org/2000/svg"> | |||||
| <path fill-rule="evenodd" clip-rule="evenodd" d="M0.973389 1.48006C7.96633 9.58079 30.3991 37.1371 39.6769 68.2938C43.4157 68.5015 47.1545 67.5322 50.7548 65.4551L61.4173 59.293C41.1309 19.8279 10.9435 4.24954 1.66576 0.233795C1.45805 0.649217 1.25034 1.06464 0.973389 1.48006Z" fill="url(#paint0_linear)"/> | |||||
| <defs> | |||||
| <linearGradient id="paint0_linear" x1="48.14" y1="52.5269" x2="-10.7115" y2="10.6385" gradientUnits="userSpaceOnUse"> | |||||
| <stop stop-color="#2BBD85"/> | |||||
| <stop offset="1" stop-color="#016A5F"/> | |||||
| </linearGradient> | |||||
| </defs> | |||||
| </svg> |
| theme: ThemeData( | theme: ThemeData( | ||||
| backgroundColor: Colors.white, | backgroundColor: Colors.white, | ||||
| brightness: Brightness.light, | brightness: Brightness.light, | ||||
| primaryColor: COLOR_CONST.DEFAULT, | |||||
| accentColor: COLOR_CONST.DEFAULT, | |||||
| hoverColor: COLOR_CONST.GREEN, | |||||
| primaryColor: AppColors.DEFAULT, | |||||
| accentColor: AppColors.DEFAULT, | |||||
| hoverColor: AppColors.GREEN, | |||||
| fontFamily: 'Roboto', | fontFamily: 'Roboto', | ||||
| ), | ), | ||||
| navigatorKey: _navigatorKey, | navigatorKey: _navigatorKey, |
| opacity: 1, | opacity: 1, | ||||
| )); | )); | ||||
| }, | }, | ||||
| color: COLOR_CONST.DEFAULT, | |||||
| color: AppColors.DEFAULT, | |||||
| shape: RoundedRectangleBorder( | shape: RoundedRectangleBorder( | ||||
| borderRadius: new BorderRadius.circular(7.0), | borderRadius: new BorderRadius.circular(7.0), | ||||
| ), | ), | ||||
| button_add_media, | button_add_media, | ||||
| style: TextStyle( | style: TextStyle( | ||||
| fontWeight: FontWeight.bold, | fontWeight: FontWeight.bold, | ||||
| color: COLOR_CONST.WHITE), | |||||
| color: AppColors.WHITE), | |||||
| ) | ) | ||||
| ], | ], | ||||
| ), | ), |
| textInputAction: TextInputAction.done, | textInputAction: TextInputAction.done, | ||||
| controller: _searchController, | controller: _searchController, | ||||
| onChanged: (String txt) {}, | onChanged: (String txt) {}, | ||||
| cursorColor: COLOR_CONST.GRAY1, | |||||
| cursorColor: AppColors.GRAY1, | |||||
| decoration: InputDecoration( | decoration: InputDecoration( | ||||
| border: InputBorder.none, | border: InputBorder.none, | ||||
| hintText: 'Tìm kiếm ...', | hintText: 'Tìm kiếm ...', |
| : SizedBox(), | : SizedBox(), | ||||
| _.isEdit | _.isEdit | ||||
| ? FlatButton( | ? FlatButton( | ||||
| color: COLOR_CONST.DEFAULT, | |||||
| color: AppColors.DEFAULT, | |||||
| shape: RoundedRectangleBorder( | shape: RoundedRectangleBorder( | ||||
| borderRadius: new BorderRadius.circular(8.0)), | borderRadius: new BorderRadius.circular(8.0)), | ||||
| onPressed: () { | onPressed: () { | ||||
| style: TextStyle(color: Colors.white), | style: TextStyle(color: Colors.white), | ||||
| )) | )) | ||||
| : FlatButton( | : FlatButton( | ||||
| color: COLOR_CONST.DEFAULT, | |||||
| color: AppColors.DEFAULT, | |||||
| shape: RoundedRectangleBorder( | shape: RoundedRectangleBorder( | ||||
| borderRadius: new BorderRadius.circular(8.0)), | borderRadius: new BorderRadius.circular(8.0)), | ||||
| onPressed: () { | onPressed: () { | ||||
| shape: BoxShape.rectangle, | shape: BoxShape.rectangle, | ||||
| borderRadius: BorderRadius.circular(10), | borderRadius: BorderRadius.circular(10), | ||||
| color: Colors.white, | color: Colors.white, | ||||
| border: Border.all(color: COLOR_CONST.DEFAULT)), | |||||
| border: Border.all(color: AppColors.DEFAULT)), | |||||
| child: Form( | child: Form( | ||||
| key: _formSupplyKey, | key: _formSupplyKey, | ||||
| child: Column( | child: Column( |
| : SizedBox(), | : SizedBox(), | ||||
| _.isEdit | _.isEdit | ||||
| ? FlatButton( | ? FlatButton( | ||||
| color: COLOR_CONST.DEFAULT, | |||||
| color: AppColors.DEFAULT, | |||||
| shape: RoundedRectangleBorder( | shape: RoundedRectangleBorder( | ||||
| borderRadius: new BorderRadius.circular(8.0)), | borderRadius: new BorderRadius.circular(8.0)), | ||||
| onPressed: () { | onPressed: () { | ||||
| style: TextStyle(color: Colors.white), | style: TextStyle(color: Colors.white), | ||||
| )) | )) | ||||
| : FlatButton( | : FlatButton( | ||||
| color: COLOR_CONST.DEFAULT, | |||||
| color: AppColors.DEFAULT, | |||||
| shape: RoundedRectangleBorder( | shape: RoundedRectangleBorder( | ||||
| borderRadius: new BorderRadius.circular(8.0)), | borderRadius: new BorderRadius.circular(8.0)), | ||||
| onPressed: () { | onPressed: () { | ||||
| shape: BoxShape.rectangle, | shape: BoxShape.rectangle, | ||||
| borderRadius: BorderRadius.circular(10), | borderRadius: BorderRadius.circular(10), | ||||
| color: Colors.white, | color: Colors.white, | ||||
| border: Border.all(color: COLOR_CONST.DEFAULT)), | |||||
| border: Border.all(color: AppColors.DEFAULT)), | |||||
| child: Form( | child: Form( | ||||
| key: _formSupplyKey, | key: _formSupplyKey, | ||||
| child: Column( | child: Column( |
| shape: BoxShape.rectangle, | shape: BoxShape.rectangle, | ||||
| borderRadius: BorderRadius.circular(10), | borderRadius: BorderRadius.circular(10), | ||||
| color: Colors.white, | color: Colors.white, | ||||
| border: Border.all(color: COLOR_CONST.DEFAULT)), | |||||
| border: Border.all(color: AppColors.DEFAULT)), | |||||
| child: Form( | child: Form( | ||||
| child: Column( | child: Column( | ||||
| children: [ | children: [ | ||||
| .add(Reset()); | .add(Reset()); | ||||
| }), | }), | ||||
| FlatButton( | FlatButton( | ||||
| color: COLOR_CONST.DEFAULT, | |||||
| color: AppColors.DEFAULT, | |||||
| shape: RoundedRectangleBorder( | shape: RoundedRectangleBorder( | ||||
| borderRadius: new BorderRadius.circular(8.0)), | borderRadius: new BorderRadius.circular(8.0)), | ||||
| onPressed: () { | onPressed: () { |
| : SizedBox(), | : SizedBox(), | ||||
| _.isEdit | _.isEdit | ||||
| ? FlatButton( | ? FlatButton( | ||||
| color: COLOR_CONST.DEFAULT, | |||||
| color: AppColors.DEFAULT, | |||||
| shape: RoundedRectangleBorder( | shape: RoundedRectangleBorder( | ||||
| borderRadius: new BorderRadius.circular(8.0)), | borderRadius: new BorderRadius.circular(8.0)), | ||||
| onPressed: () { | onPressed: () { | ||||
| style: TextStyle(color: Colors.white), | style: TextStyle(color: Colors.white), | ||||
| )) | )) | ||||
| : FlatButton( | : FlatButton( | ||||
| color: COLOR_CONST.DEFAULT, | |||||
| color: AppColors.DEFAULT, | |||||
| shape: RoundedRectangleBorder( | shape: RoundedRectangleBorder( | ||||
| borderRadius: new BorderRadius.circular(8.0)), | borderRadius: new BorderRadius.circular(8.0)), | ||||
| onPressed: () { | onPressed: () { | ||||
| shape: BoxShape.rectangle, | shape: BoxShape.rectangle, | ||||
| borderRadius: BorderRadius.circular(10), | borderRadius: BorderRadius.circular(10), | ||||
| color: Colors.white, | color: Colors.white, | ||||
| border: Border.all(color: COLOR_CONST.DEFAULT)), | |||||
| border: Border.all(color: AppColors.DEFAULT)), | |||||
| child: Column( | child: Column( | ||||
| children: [ | children: [ | ||||
| Container( | Container( |
| : SizedBox(), | : SizedBox(), | ||||
| _.isEdit | _.isEdit | ||||
| ? FlatButton( | ? FlatButton( | ||||
| color: COLOR_CONST.DEFAULT, | |||||
| color: AppColors.DEFAULT, | |||||
| shape: RoundedRectangleBorder( | shape: RoundedRectangleBorder( | ||||
| borderRadius: new BorderRadius.circular(8.0)), | borderRadius: new BorderRadius.circular(8.0)), | ||||
| onPressed: () { | onPressed: () { | ||||
| style: TextStyle(color: Colors.white), | style: TextStyle(color: Colors.white), | ||||
| )) | )) | ||||
| : FlatButton( | : FlatButton( | ||||
| color: COLOR_CONST.DEFAULT, | |||||
| color: AppColors.DEFAULT, | |||||
| shape: RoundedRectangleBorder( | shape: RoundedRectangleBorder( | ||||
| borderRadius: new BorderRadius.circular(8.0)), | borderRadius: new BorderRadius.circular(8.0)), | ||||
| onPressed: () { | onPressed: () { | ||||
| shape: BoxShape.rectangle, | shape: BoxShape.rectangle, | ||||
| borderRadius: BorderRadius.circular(10), | borderRadius: BorderRadius.circular(10), | ||||
| color: Colors.white, | color: Colors.white, | ||||
| border: Border.all(color: COLOR_CONST.DEFAULT)), | |||||
| border: Border.all(color: AppColors.DEFAULT)), | |||||
| child: Column( | child: Column( | ||||
| children: [ | children: [ | ||||
| _btnSelectSubstrates(), | _btnSelectSubstrates(), |
| } | } | ||||
| _validateInputs(); | _validateInputs(); | ||||
| }, | }, | ||||
| color: COLOR_CONST.DEFAULT, | |||||
| color: AppColors.DEFAULT, | |||||
| shape: RoundedRectangleBorder( | shape: RoundedRectangleBorder( | ||||
| borderRadius: new BorderRadius.circular(7.0), | borderRadius: new BorderRadius.circular(7.0), | ||||
| ), | ), | ||||
| child: Text( | child: Text( | ||||
| 'Gửi'.toUpperCase(), | 'Gửi'.toUpperCase(), | ||||
| style: | |||||
| TextStyle(fontWeight: FontWeight.bold, color: COLOR_CONST.WHITE), | |||||
| style: TextStyle(fontWeight: FontWeight.bold, color: AppColors.WHITE), | |||||
| ), | ), | ||||
| ), | ), | ||||
| ); | ); |
| textInputAction: TextInputAction.done, | textInputAction: TextInputAction.done, | ||||
| controller: _searchController, | controller: _searchController, | ||||
| onChanged: (String txt) {}, | onChanged: (String txt) {}, | ||||
| cursorColor: COLOR_CONST.GRAY1, | |||||
| cursorColor: AppColors.GRAY1, | |||||
| decoration: InputDecoration( | decoration: InputDecoration( | ||||
| border: InputBorder.none, | border: InputBorder.none, | ||||
| hintText: 'Tìm kiếm ...', | hintText: 'Tìm kiếm ...', |
| @override | @override | ||||
| Widget build(BuildContext context) { | Widget build(BuildContext context) { | ||||
| return Align( | return Align( | ||||
| alignment: Alignment.centerRight, | |||||
| alignment: Alignment.center, | |||||
| child: FlatButton( | child: FlatButton( | ||||
| child: Text( | |||||
| 'Quên mật khẩu ?', | |||||
| ), | |||||
| child: Text('Quên mật khẩu', | |||||
| style: TextStyle(color: AppColors.BLUE, fontSize: 16)), | |||||
| onPressed: () { | onPressed: () { | ||||
| Navigator.of(context).push( | Navigator.of(context).push( | ||||
| MaterialPageRoute(builder: (_) => ForgotPasswordScreen())); | MaterialPageRoute(builder: (_) => ForgotPasswordScreen())); | ||||
| builder: (context, state) { | builder: (context, state) { | ||||
| return Container( | return Container( | ||||
| height: 50, | height: 50, | ||||
| padding: EdgeInsets.symmetric(horizontal: 17), | |||||
| decoration: BoxDecoration( | |||||
| shape: BoxShape.rectangle, | |||||
| borderRadius: BorderRadius.circular(10), | |||||
| color: COLOR_CONST.GRAY7), | |||||
| padding: EdgeInsets.symmetric(horizontal: 8), | |||||
| child: Center( | child: Center( | ||||
| child: TextFormField( | child: TextFormField( | ||||
| focusNode: usernameFocus, | focusNode: usernameFocus, | ||||
| keyboardType: TextInputType.text, | keyboardType: TextInputType.text, | ||||
| obscureText: false, | obscureText: false, | ||||
| textAlign: TextAlign.left, | textAlign: TextAlign.left, | ||||
| decoration: InputDecoration.collapsed( | |||||
| decoration: InputDecoration( | |||||
| hintText: 'Tài khoản', | hintText: 'Tài khoản', | ||||
| ), | ), | ||||
| ), | ), | ||||
| builder: (context, state) { | builder: (context, state) { | ||||
| return Container( | return Container( | ||||
| height: 50, | height: 50, | ||||
| padding: EdgeInsets.symmetric(horizontal: 17), | |||||
| decoration: BoxDecoration( | |||||
| shape: BoxShape.rectangle, | |||||
| borderRadius: BorderRadius.circular(10), | |||||
| color: COLOR_CONST.GRAY7), | |||||
| padding: EdgeInsets.symmetric(horizontal: 8), | |||||
| child: Center( | child: Center( | ||||
| child: TextFormField( | child: TextFormField( | ||||
| focusNode: passwordFocus, | focusNode: passwordFocus, | ||||
| keyboardType: TextInputType.text, | keyboardType: TextInputType.text, | ||||
| obscureText: true, | obscureText: true, | ||||
| textAlign: TextAlign.left, | textAlign: TextAlign.left, | ||||
| decoration: InputDecoration.collapsed( | |||||
| decoration: InputDecoration( | |||||
| hintText: 'Mật khẩu', | hintText: 'Mật khẩu', | ||||
| ), | ), | ||||
| ), | ), | ||||
| } | } | ||||
| }, | }, | ||||
| color: state.status.isValidated | color: state.status.isValidated | ||||
| ? COLOR_CONST.DEFAULT | |||||
| : COLOR_CONST.GRAY1_50, | |||||
| ? AppColors.DEFAULT | |||||
| : AppColors.GRAY1_50, | |||||
| shape: RoundedRectangleBorder( | shape: RoundedRectangleBorder( | ||||
| borderRadius: new BorderRadius.circular(7.0), | borderRadius: new BorderRadius.circular(7.0), | ||||
| ), | ), | ||||
| child: Text( | |||||
| 'Đăng nhập'.toUpperCase(), | |||||
| style: TextStyle( | |||||
| fontWeight: FontWeight.bold, color: COLOR_CONST.WHITE), | |||||
| ), | |||||
| child: Text('Đăng nhập'.toUpperCase(), | |||||
| style: TextStyle( | |||||
| fontWeight: FontWeight.bold, | |||||
| color: AppColors.WHITE, | |||||
| fontSize: 18)), | |||||
| ), | ), | ||||
| ); | ); | ||||
| }, | }, |
| import 'package:farm_tpf/utils/const_assets.dart'; | |||||
| import 'package:farm_tpf/utils/const_color.dart'; | import 'package:farm_tpf/utils/const_color.dart'; | ||||
| import 'package:farm_tpf/utils/const_icons.dart'; | |||||
| import 'package:flutter/material.dart'; | import 'package:flutter/material.dart'; | ||||
| import 'package:flutter_svg/svg.dart'; | |||||
| class WidgetTopWelcome extends StatelessWidget { | class WidgetTopWelcome extends StatelessWidget { | ||||
| @override | @override | ||||
| height: 80, | height: 80, | ||||
| ), | ), | ||||
| SizedBox( | SizedBox( | ||||
| width: 172, | |||||
| child: FlutterLogo( | |||||
| size: 140, | |||||
| ), | |||||
| width: 180, | |||||
| child: Image.asset(AppAssets.logoWithSlogan), | |||||
| ), | ), | ||||
| SizedBox( | SizedBox( | ||||
| height: 80, | height: 80, |
| switch (item.status) { | switch (item.status) { | ||||
| case "STATUS_ARE_ACTIVE": | case "STATUS_ARE_ACTIVE": | ||||
| backgroundColor = Colors.white; | backgroundColor = Colors.white; | ||||
| textColor = COLOR_CONST.DEFAULT; | |||||
| textColor = AppColors.DEFAULT; | |||||
| break; | break; | ||||
| case "STATUS_FINISHED": | case "STATUS_FINISHED": | ||||
| backgroundColor = COLOR_CONST.DEFAULT; | |||||
| backgroundColor = AppColors.DEFAULT; | |||||
| textColor = Colors.white; | textColor = Colors.white; | ||||
| break; | break; | ||||
| default: | default: |
| textInputAction: TextInputAction.done, | textInputAction: TextInputAction.done, | ||||
| controller: _searchController, | controller: _searchController, | ||||
| onChanged: (String txt) {}, | onChanged: (String txt) {}, | ||||
| cursorColor: COLOR_CONST.GRAY1, | |||||
| cursorColor: AppColors.GRAY1, | |||||
| decoration: InputDecoration( | decoration: InputDecoration( | ||||
| border: InputBorder.none, | border: InputBorder.none, | ||||
| hintText: 'Tìm kiếm ...', | hintText: 'Tìm kiếm ...', |
| child: Container( | child: Container( | ||||
| margin: EdgeInsets.all(2.5), | margin: EdgeInsets.all(2.5), | ||||
| decoration: BoxDecoration( | decoration: BoxDecoration( | ||||
| color: COLOR_CONST.WHITE, | |||||
| color: AppColors.WHITE, | |||||
| borderRadius: BorderRadius.all(Radius.circular(4.0)), | borderRadius: BorderRadius.all(Radius.circular(4.0)), | ||||
| boxShadow: <BoxShadow>[ | boxShadow: <BoxShadow>[ | ||||
| BoxShadow( | BoxShadow( | ||||
| color: COLOR_CONST.GRAY1.withOpacity(0.2), | |||||
| color: AppColors.GRAY1.withOpacity(0.2), | |||||
| offset: Offset(1.1, 1.1), | offset: Offset(1.1, 1.1), | ||||
| blurRadius: 4.0), | blurRadius: 4.0), | ||||
| ], | ], | ||||
| style: TextStyle( | style: TextStyle( | ||||
| fontWeight: FontWeight.w400, | fontWeight: FontWeight.w400, | ||||
| fontSize: 11, | fontSize: 11, | ||||
| color: COLOR_CONST.BLACK2, | |||||
| color: AppColors.BLACK2, | |||||
| ), | ), | ||||
| )), | )), | ||||
| )); | )); | ||||
| child: Container( | child: Container( | ||||
| alignment: Alignment.center, | alignment: Alignment.center, | ||||
| decoration: BoxDecoration( | decoration: BoxDecoration( | ||||
| color: COLOR_CONST.WHITE_50, | |||||
| color: AppColors.WHITE_50, | |||||
| border: Border( | border: Border( | ||||
| top: BorderSide( | top: BorderSide( | ||||
| width: 0.5, color: COLOR_CONST.DEFAULT), | |||||
| width: 0.5, color: AppColors.DEFAULT), | |||||
| bottom: BorderSide( | bottom: BorderSide( | ||||
| width: 0.5, color: COLOR_CONST.DEFAULT)), | |||||
| width: 0.5, color: AppColors.DEFAULT)), | |||||
| ), | ), | ||||
| child: Container( | child: Container( | ||||
| child: Row( | child: Row( |
| @override | @override | ||||
| Widget build(BuildContext context) { | Widget build(BuildContext context) { | ||||
| return Container( | return Container( | ||||
| color: COLOR_CONST.ITEM_BG, | |||||
| color: AppColors.ITEM_BG, | |||||
| child: SafeArea( | child: SafeArea( | ||||
| top: false, | top: false, | ||||
| bottom: true, | bottom: true, | ||||
| initialIndex: widget.initialIndex, | initialIndex: widget.initialIndex, | ||||
| length: 2, | length: 2, | ||||
| child: new Scaffold( | child: new Scaffold( | ||||
| backgroundColor: COLOR_CONST.ITEM_BG, | |||||
| backgroundColor: AppColors.ITEM_BG, | |||||
| body: TabBarView( | body: TabBarView( | ||||
| children: [ | children: [ | ||||
| PlotParameterScreen( | PlotParameterScreen( | ||||
| text: "Canh tác", | text: "Canh tác", | ||||
| ), | ), | ||||
| ], | ], | ||||
| labelColor: COLOR_CONST.DEFAULT, | |||||
| unselectedLabelColor: COLOR_CONST.GRAY1_70, | |||||
| labelColor: AppColors.DEFAULT, | |||||
| unselectedLabelColor: AppColors.GRAY1_70, | |||||
| indicatorSize: TabBarIndicatorSize.label, | indicatorSize: TabBarIndicatorSize.label, | ||||
| indicator: RoundedRectIndicator( | indicator: RoundedRectIndicator( | ||||
| color: COLOR_CONST.DEFAULT, | |||||
| color: AppColors.DEFAULT, | |||||
| radius: 2, | radius: 2, | ||||
| padding: 22, | padding: 22, | ||||
| weight: 3.0), | weight: 3.0), |
| GestureType.onPanUpdateDownDirection, | GestureType.onPanUpdateDownDirection, | ||||
| ], | ], | ||||
| child: Container( | child: Container( | ||||
| color: COLOR_CONST.ITEM_BG, | |||||
| color: AppColors.ITEM_BG, | |||||
| child: SafeArea( | child: SafeArea( | ||||
| top: false, | top: false, | ||||
| bottom: true, | bottom: true, |
| } | } | ||||
| _validateInputs(); | _validateInputs(); | ||||
| }, | }, | ||||
| color: COLOR_CONST.DEFAULT, | |||||
| color: AppColors.DEFAULT, | |||||
| shape: RoundedRectangleBorder( | shape: RoundedRectangleBorder( | ||||
| borderRadius: new BorderRadius.circular(7.0), | borderRadius: new BorderRadius.circular(7.0), | ||||
| ), | ), | ||||
| child: Text( | child: Text( | ||||
| 'Cập nhật'.toUpperCase(), | 'Cập nhật'.toUpperCase(), | ||||
| style: | |||||
| TextStyle(fontWeight: FontWeight.bold, color: COLOR_CONST.WHITE), | |||||
| style: TextStyle(fontWeight: FontWeight.bold, color: AppColors.WHITE), | |||||
| ), | ), | ||||
| ), | ), | ||||
| ); | ); |
| alignment: Alignment.centerRight, | alignment: Alignment.centerRight, | ||||
| child: Text( | child: Text( | ||||
| "version:${_packageInfo.version}.${_packageInfo.buildNumber}", | "version:${_packageInfo.version}.${_packageInfo.buildNumber}", | ||||
| style: TextStyle(color: COLOR_CONST.GRAY1_70))); | |||||
| style: TextStyle(color: AppColors.GRAY1_70))); | |||||
| } | } | ||||
| @override | @override |
| textInputAction: TextInputAction.done, | textInputAction: TextInputAction.done, | ||||
| controller: _searchController, | controller: _searchController, | ||||
| onChanged: (String txt) {}, | onChanged: (String txt) {}, | ||||
| cursorColor: COLOR_CONST.GRAY1, | |||||
| cursorColor: AppColors.GRAY1, | |||||
| decoration: InputDecoration( | decoration: InputDecoration( | ||||
| border: InputBorder.none, | border: InputBorder.none, | ||||
| hintText: 'Tìm kiếm ...', | hintText: 'Tìm kiếm ...', |
| @override | @override | ||||
| Widget build(BuildContext context) { | Widget build(BuildContext context) { | ||||
| return Scaffold( | return Scaffold( | ||||
| backgroundColor: COLOR_CONST.WHITE, | |||||
| backgroundColor: AppColors.WHITE, | |||||
| body: SingleChildScrollView( | body: SingleChildScrollView( | ||||
| controller: scrollController, | controller: scrollController, | ||||
| scrollDirection: Axis.horizontal, | scrollDirection: Axis.horizontal, | ||||
| //full-screen Width with widget.screenView | //full-screen Width with widget.screenView | ||||
| child: Container( | child: Container( | ||||
| decoration: BoxDecoration( | decoration: BoxDecoration( | ||||
| color: COLOR_CONST.WHITE, | |||||
| color: AppColors.WHITE, | |||||
| boxShadow: <BoxShadow>[ | boxShadow: <BoxShadow>[ | ||||
| BoxShadow(color: COLOR_CONST.GRAY1, blurRadius: 24), | |||||
| BoxShadow(color: AppColors.GRAY1, blurRadius: 24), | |||||
| ], | ], | ||||
| ), | ), | ||||
| child: Stack( | child: Stack( |
| decoration: BoxDecoration( | decoration: BoxDecoration( | ||||
| borderRadius: BorderRadius.circular(120), | borderRadius: BorderRadius.circular(120), | ||||
| border: Border.all( | border: Border.all( | ||||
| width: 0.35, color: COLOR_CONST.DEFAULT), | |||||
| width: 0.35, color: AppColors.DEFAULT), | |||||
| ), | ), | ||||
| child: ClipRRect( | child: ClipRRect( | ||||
| borderRadius: | borderRadius: | ||||
| '${Get.find<UpdateFullName>().fullName ?? ''}', | '${Get.find<UpdateFullName>().fullName ?? ''}', | ||||
| style: TextStyle( | style: TextStyle( | ||||
| fontWeight: FontWeight.w600, | fontWeight: FontWeight.w600, | ||||
| color: COLOR_CONST.GRAY1, | |||||
| color: AppColors.GRAY1, | |||||
| fontSize: 18, | fontSize: 18, | ||||
| ), | ), | ||||
| ), | ), | ||||
| ), | ), | ||||
| Divider( | Divider( | ||||
| height: 1, | height: 1, | ||||
| color: COLOR_CONST.GRAY1, | |||||
| color: AppColors.GRAY1, | |||||
| ), | ), | ||||
| Expanded( | Expanded( | ||||
| child: ListView.builder( | child: ListView.builder( | ||||
| ), | ), | ||||
| Divider( | Divider( | ||||
| height: 1, | height: 1, | ||||
| color: COLOR_CONST.GRAY1, | |||||
| color: AppColors.GRAY1, | |||||
| ), | ), | ||||
| Column( | Column( | ||||
| children: <Widget>[ | children: <Widget>[ | ||||
| height: 24, | height: 24, | ||||
| child: Image.asset(listData.imageName, | child: Image.asset(listData.imageName, | ||||
| color: currentDrawerIndex == listData.index | color: currentDrawerIndex == listData.index | ||||
| ? COLOR_CONST.DEFAULT | |||||
| : COLOR_CONST.BLACK), | |||||
| ? AppColors.DEFAULT | |||||
| : AppColors.BLACK), | |||||
| ) | ) | ||||
| : Icon(listData.icon.icon, | : Icon(listData.icon.icon, | ||||
| color: widget.screenIndex == listData.index | color: widget.screenIndex == listData.index | ||||
| ? COLOR_CONST.DEFAULT | |||||
| : COLOR_CONST.BLACK), | |||||
| ? AppColors.DEFAULT | |||||
| : AppColors.BLACK), | |||||
| const Padding( | const Padding( | ||||
| padding: EdgeInsets.all(4.0), | padding: EdgeInsets.all(4.0), | ||||
| ), | ), | ||||
| fontWeight: FontWeight.w500, | fontWeight: FontWeight.w500, | ||||
| fontSize: 16, | fontSize: 16, | ||||
| color: widget.screenIndex == listData.index | color: widget.screenIndex == listData.index | ||||
| ? COLOR_CONST.DEFAULT | |||||
| : COLOR_CONST.BLACK, | |||||
| ? AppColors.DEFAULT | |||||
| : AppColors.BLACK, | |||||
| ), | ), | ||||
| textAlign: TextAlign.left, | textAlign: TextAlign.left, | ||||
| ), | ), | ||||
| MediaQuery.of(context).size.width * 0.75 - 64, | MediaQuery.of(context).size.width * 0.75 - 64, | ||||
| height: 46, | height: 46, | ||||
| decoration: BoxDecoration( | decoration: BoxDecoration( | ||||
| color: COLOR_CONST.DEFAULT.withOpacity(0.2), | |||||
| color: AppColors.DEFAULT.withOpacity(0.2), | |||||
| borderRadius: new BorderRadius.only( | borderRadius: new BorderRadius.only( | ||||
| topLeft: Radius.circular(0), | topLeft: Radius.circular(0), | ||||
| topRight: Radius.circular(28), | topRight: Radius.circular(28), |
| @override | @override | ||||
| Widget build(BuildContext context) { | Widget build(BuildContext context) { | ||||
| return Container( | return Container( | ||||
| color: COLOR_CONST.DEFAULT, | |||||
| color: AppColors.DEFAULT, | |||||
| child: SafeArea( | child: SafeArea( | ||||
| top: false, | top: false, | ||||
| bottom: false, | bottom: false, | ||||
| child: Scaffold( | child: Scaffold( | ||||
| backgroundColor: COLOR_CONST.WHITE, | |||||
| backgroundColor: AppColors.WHITE, | |||||
| body: DrawerUserController( | body: DrawerUserController( | ||||
| screenIndex: drawerIndex, | screenIndex: drawerIndex, | ||||
| drawerWidth: MediaQuery.of(context).size.width * 0.75, | drawerWidth: MediaQuery.of(context).size.width * 0.75, |
| class AppAssets { | |||||
| static const baseAssets = 'assets/png/'; | |||||
| static const logo = baseAssets + 'logo.png'; | |||||
| static const logoWithSlogan = baseAssets + 'logoWithSlogan.png'; | |||||
| } |
| import 'hex_color.dart'; | import 'hex_color.dart'; | ||||
| class COLOR_CONST { | |||||
| static final HexColor DEFAULT = new HexColor("#2EC492"); | |||||
| class AppColors { | |||||
| static final HexColor DEFAULT = new HexColor("##61AE46"); | |||||
| static final HexColor BLUE = new HexColor("#2F80ED"); | |||||
| static final HexColor DEFAULT_5 = new HexColor("#0DE81667"); | static final HexColor DEFAULT_5 = new HexColor("#0DE81667"); | ||||
| static final HexColor RED = new HexColor("#F93F3E"); | static final HexColor RED = new HexColor("#F93F3E"); | ||||
| static final HexColor RED2 = new HexColor("#D05045"); | static final HexColor RED2 = new HexColor("#D05045"); | ||||
| static final HexColor GRAY6 = new HexColor("#707070"); | static final HexColor GRAY6 = new HexColor("#707070"); | ||||
| static final HexColor GRAY7 = new HexColor("#DDDDDD"); | static final HexColor GRAY7 = new HexColor("#DDDDDD"); | ||||
| static final HexColor ITEM_BG = new HexColor("#F3F6F8"); | static final HexColor ITEM_BG = new HexColor("#F3F6F8"); | ||||
| static final HexColor BLUE = new HexColor("#222539"); | |||||
| static final HexColor BLUE_SKY = new HexColor("#00BFFF"); | static final HexColor BLUE_SKY = new HexColor("#00BFFF"); | ||||
| static final HexColor DIVIDER = new HexColor("#33000000"); | static final HexColor DIVIDER = new HexColor("#33000000"); | ||||
| static final HexColor TRANS = new HexColor("00000000"); | static final HexColor TRANS = new HexColor("00000000"); |
| class AppIcons { | |||||
| static const baseAssets = 'assets/svg/'; | |||||
| static const appLogo = baseAssets + 'logo.svg'; | |||||
| static const appLogoWithSlogan = baseAssets + 'logoWithSlogan.svg'; | |||||
| } |
| url: "https://pub.dartlang.org" | url: "https://pub.dartlang.org" | ||||
| source: hosted | source: hosted | ||||
| version: "1.0.8" | version: "1.0.8" | ||||
| flutter_svg: | |||||
| dependency: "direct main" | |||||
| description: | |||||
| name: flutter_svg | |||||
| url: "https://pub.dartlang.org" | |||||
| source: hosted | |||||
| version: "0.19.1" | |||||
| flutter_test: | flutter_test: | ||||
| dependency: "direct dev" | dependency: "direct dev" | ||||
| description: flutter | description: flutter | ||||
| url: "https://pub.dartlang.org" | url: "https://pub.dartlang.org" | ||||
| source: hosted | source: hosted | ||||
| version: "1.8.0-nullsafety.1" | version: "1.8.0-nullsafety.1" | ||||
| path_drawing: | |||||
| dependency: transitive | |||||
| description: | |||||
| name: path_drawing | |||||
| url: "https://pub.dartlang.org" | |||||
| source: hosted | |||||
| version: "0.4.1+1" | |||||
| path_parsing: | |||||
| dependency: transitive | |||||
| description: | |||||
| name: path_parsing | |||||
| url: "https://pub.dartlang.org" | |||||
| source: hosted | |||||
| version: "0.1.4" | |||||
| path_provider: | path_provider: | ||||
| dependency: "direct main" | dependency: "direct main" | ||||
| description: | description: | ||||
| url: "https://pub.dartlang.org" | url: "https://pub.dartlang.org" | ||||
| source: hosted | source: hosted | ||||
| version: "1.9.0" | version: "1.9.0" | ||||
| petitparser: | |||||
| dependency: transitive | |||||
| description: | |||||
| name: petitparser | |||||
| url: "https://pub.dartlang.org" | |||||
| source: hosted | |||||
| version: "3.1.0" | |||||
| platform: | platform: | ||||
| dependency: transitive | dependency: transitive | ||||
| description: | description: | ||||
| url: "https://pub.dartlang.org" | url: "https://pub.dartlang.org" | ||||
| source: hosted | source: hosted | ||||
| version: "0.1.0" | version: "0.1.0" | ||||
| xml: | |||||
| dependency: transitive | |||||
| description: | |||||
| name: xml | |||||
| url: "https://pub.dartlang.org" | |||||
| source: hosted | |||||
| version: "4.5.1" | |||||
| yaml: | yaml: | ||||
| dependency: transitive | dependency: transitive | ||||
| description: | description: |
| description: A new Flutter project. | description: A new Flutter project. | ||||
| publish_to: 'none' | publish_to: 'none' | ||||
| version: 0.13.0+1 | |||||
| version: 0.14.0+1 | |||||
| environment: | environment: | ||||
| sdk: ">=2.7.0 <3.0.0" | sdk: ">=2.7.0 <3.0.0" | ||||
| mime: ^0.9.7 | mime: ^0.9.7 | ||||
| flutter_image_compress: ^0.7.0 | flutter_image_compress: ^0.7.0 | ||||
| flutter_svg: ^0.19.1 | |||||
| dev_dependencies: | dev_dependencies: | ||||
| flutter_test: | flutter_test: | ||||
| json_serializable: any | json_serializable: any | ||||
| flutter: | flutter: | ||||
| uses-material-design: true | |||||
| uses-material-design: true | |||||
| assets: | |||||
| - assets/svg/ | |||||
| - assets/png/ |