New UI Implemented Fix 1.2

mirza_dev
devmirza121 4 years ago
parent 3c257868eb
commit a2d12db77d

Binary file not shown.

After

Width:  |  Height:  |  Size: 80 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 562 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 63 KiB

@ -51,7 +51,7 @@ class MyColors {
darkPrimaryColor, darkPrimaryColor,
primaryColor, primaryColor,
]), ]),
borderRadius: BorderRadius.circular(6), borderRadius: BorderRadius.circular(0),
boxShadow: [ boxShadow: [
new BoxShadow( new BoxShadow(
color: primaryColor.withOpacity(0.2), color: primaryColor.withOpacity(0.2),

@ -76,7 +76,7 @@ class AppRoutes {
forgetPassword: (context) => ForgetPasswordPage(), forgetPassword: (context) => ForgetPasswordPage(),
loginVerification: (context) => LoginVerificationPage(), loginVerification: (context) => LoginVerificationPage(),
loginWithPassword: (context) => LoginWithPassword(), loginWithPassword: (context) => LoginWithPassword(),
loginMethodSelection: (context) => LoginMethodSelectionPage(ModalRoute.of(context)!.settings.arguments as String), loginMethodSelection: (context) => LoginMethodSelectionPage(),
completeProfile: (context) => CompleteProfilePage(ModalRoute.of(context)!.settings.arguments as RegisterUser), completeProfile: (context) => CompleteProfilePage(ModalRoute.of(context)!.settings.arguments as RegisterUser),
profile1: (context) => Profile1Page(), profile1: (context) => Profile1Page(),
profile2: (context) => Profile2Page(), profile2: (context) => Profile2Page(),

@ -32,6 +32,7 @@ abstract class LocaleKeys {
static const createPass = 'createPass'; static const createPass = 'createPass';
static const newPassword = 'newPassword'; static const newPassword = 'newPassword';
static const forgetPassword = 'forgetPassword'; static const forgetPassword = 'forgetPassword';
static const forgetPasswordRecover = 'forgetPasswordRecover';
static const editAccount = 'editAccount'; static const editAccount = 'editAccount';
static const change = 'change'; static const change = 'change';
static const verifyAccount = 'verifyAccount'; static const verifyAccount = 'verifyAccount';
@ -132,9 +133,11 @@ abstract class LocaleKeys {
static const gender = 'gender'; static const gender = 'gender';
static const reset_locale = 'reset_locale'; static const reset_locale = 'reset_locale';
static const insert_otp_code = 'insert_otp_code'; static const insert_otp_code = 'insert_otp_code';
static const type_code = 'type_code';
static const resend_code = 'resend_code'; static const resend_code = 'resend_code';
static const check_code = 'check_code'; static const check_code = 'check_code';
static const time_will_expire = 'time_will_expire'; static const time_will_expire = 'time_will_expire';
static const sec = 'sec';
static const no_city_available = 'no_city_available'; static const no_city_available = 'no_city_available';
static const branch_created = 'branch_created'; static const branch_created = 'branch_created';
static const branch_updated = 'branch_updated'; static const branch_updated = 'branch_updated';

@ -44,7 +44,7 @@ class _DefineLicensePageState extends State<DefineLicensePage> {
return Scaffold( return Scaffold(
appBar: appBar( appBar: appBar(
context, context,
title: "", title: LocaleKeys.defineLicences.tr(),
), ),
body: Container( body: Container(
width: double.infinity, width: double.infinity,
@ -57,9 +57,9 @@ class _DefineLicensePageState extends State<DefineLicensePage> {
padding: const EdgeInsets.all(20.0), padding: const EdgeInsets.all(20.0),
child: Column( child: Column(
children: [ children: [
LocaleKeys.defineLicences.tr().toText20(isBold: true), // LocaleKeys.defineLicences.tr().toText20(isBold: true),
12.height, // 12.height,
LocaleKeys.defineLicenese.tr().toText14(color: MyColors.lightTextColor), // LocaleKeys.defineLicenese.tr().toText14(color: MyColors.lightTextColor),
20.height, 20.height,
showWidget(), showWidget(),
], ],
@ -70,7 +70,7 @@ class _DefineLicensePageState extends State<DefineLicensePage> {
Padding( Padding(
padding: const EdgeInsets.all(12.0), padding: const EdgeInsets.all(12.0),
child: ShowFillButton( child: ShowFillButton(
title: LocaleKeys.update.tr(), title: LocaleKeys.continu.tr(),
maxWidth: double.infinity, maxWidth: double.infinity,
onPressed: () { onPressed: () {
if (AppState().getUser.data!.userInfo!.roleId == 5) { if (AppState().getUser.data!.userInfo!.roleId == 5) {
@ -135,6 +135,7 @@ class _DefineLicensePageState extends State<DefineLicensePage> {
TxtField( TxtField(
hint: LocaleKeys.description.tr(), hint: LocaleKeys.description.tr(),
maxLines: 3, maxLines: 3,
isBackgroundEnabled: true,
), ),
if (((document?.data![index].documentUrl ?? "").toString().isNotEmpty)) if (((document?.data![index].documentUrl ?? "").toString().isNotEmpty))
Column( Column(
@ -155,8 +156,8 @@ class _DefineLicensePageState extends State<DefineLicensePage> {
height: 45, height: 45,
decoration: BoxDecoration( decoration: BoxDecoration(
color: Colors.transparent, color: Colors.transparent,
border: Border.all(color: MyColors.darkPrimaryColor, width: 2), border: Border.all(color: MyColors.greyACColor, width: 2),
borderRadius: BorderRadius.all(Radius.circular(8)), borderRadius: BorderRadius.all(Radius.circular(0)),
), ),
child: Row( child: Row(
mainAxisAlignment: MainAxisAlignment.center, mainAxisAlignment: MainAxisAlignment.center,

@ -26,12 +26,15 @@ import 'package:flutter/material.dart';
import 'package:http/http.dart'; import 'package:http/http.dart';
class LoginMethodSelectionPage extends StatelessWidget { class LoginMethodSelectionPage extends StatelessWidget {
String userToken; String? userToken, userName;
LoginMethodSelectionPage(this.userToken);
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
if (userToken == null && userName == null) {
Map<String, dynamic> map = ModalRoute.of(context)!.settings.arguments as Map<String, dynamic>;
userToken = map["userToke"];
userName = map["userName"];
}
return Scaffold( return Scaffold(
appBar: appBar(context, title: LocaleKeys.log_in.tr()), appBar: appBar(context, title: LocaleKeys.log_in.tr()),
body: Container( body: Container(
@ -102,36 +105,38 @@ class LoginMethodSelectionPage extends StatelessWidget {
Future<void> performBasicOtp(BuildContext context) async { Future<void> performBasicOtp(BuildContext context) async {
Utils.showLoading(context); Utils.showLoading(context);
Response response = await UserApiClent().login_V2_OTP(userToken, "1"); Response response = await UserApiClent().login_V2_OTP(userToken ?? "", "1");
Utils.hideLoading(context); Utils.hideLoading(context);
LoginPassword user = LoginPassword.fromJson(jsonDecode(response.body)); LoginPassword user = LoginPassword.fromJson(jsonDecode(response.body));
if (user.messageStatus == 1) { if (user.messageStatus == 1) {
showMDialog(context, child: OtpDialog( showMDialog(context,
onClick: (String code) async { child: OtpDialog(
pop(context); userName: userName,
Utils.showLoading(context); onClick: (String code) async {
Response response2 = await UserApiClent().login_V2_OTPVerify(user.data!.userToken ?? "", code); pop(context);
Utils.hideLoading(context); Utils.showLoading(context);
RegisterUser verifiedUser = RegisterUser.fromJson(jsonDecode(response2.body)); Response response2 = await UserApiClent().login_V2_OTPVerify(user.data!.userToken ?? "", code);
Utils.hideLoading(context);
RegisterUser verifiedUser = RegisterUser.fromJson(jsonDecode(response2.body));
if (verifiedUser.messageStatus == 1) { if (verifiedUser.messageStatus == 1) {
User user = User.fromJson(jsonDecode(response2.body)); User user = User.fromJson(jsonDecode(response2.body));
if (user.data!.userInfo!.roleId == 5 || user.data!.userInfo!.roleId == 6) { if (user.data!.userInfo!.roleId == 5 || user.data!.userInfo!.roleId == 6) {
AppState().setUser = user; AppState().setUser = user;
SharedPrefManager.setUserToken(user.data!.accessToken ?? ""); SharedPrefManager.setUserToken(user.data!.accessToken ?? "");
SharedPrefManager.setUserId(user.data!.userInfo!.userId ?? ""); SharedPrefManager.setUserId(user.data!.userInfo!.userId ?? "");
SharedPrefManager.setRefreshToken(user.data!.refreshToken ?? ""); SharedPrefManager.setRefreshToken(user.data!.refreshToken ?? "");
SharedPrefManager.setData(jsonEncode(user.data!.userInfo!.toJson())); SharedPrefManager.setData(jsonEncode(user.data!.userInfo!.toJson()));
// pop(context); // pop(context);
navigateReplaceWithNameTillLast(context, AppRoutes.dashboard); navigateReplaceWithNameTillLast(context, AppRoutes.dashboard);
} else { } else {
Utils.showToast("Sorry, Only Provider's can log in this app"); Utils.showToast("Sorry, Only Provider's can log in this app");
} }
} else { } else {
Utils.showToast(verifiedUser.message ?? ""); Utils.showToast(verifiedUser.message ?? "");
} }
}, },
)); ));
} else { } else {
Utils.showToast(user.message ?? ""); Utils.showToast(user.message ?? "");
} }

@ -68,7 +68,7 @@ class _LoginWithPasswordState extends State<LoginWithPassword> {
child: Column( child: Column(
children: [ children: [
12.height, 12.height,
LocaleKeys.log_in.tr().toText20(), LocaleKeys.login.tr().toText20(),
20.height, 20.height,
(type == ClassType.NUMBER ? LocaleKeys.enterPhoneNumber.tr() : LocaleKeys.enterEmail.tr()).toText14( (type == ClassType.NUMBER ? LocaleKeys.enterPhoneNumber.tr() : LocaleKeys.enterEmail.tr()).toText14(
color: MyColors.lightTextColor, color: MyColors.lightTextColor,
@ -110,7 +110,7 @@ class _LoginWithPasswordState extends State<LoginWithPassword> {
), ),
10.height, 10.height,
ShowFillButton( ShowFillButton(
title: LocaleKeys.forgetPassword.tr(), title: LocaleKeys.forgetPasswordRecover.tr(),
isFlatButton: true, isFlatButton: true,
isBold: false, isBold: false,
fontSize: 14, fontSize: 14,
@ -121,7 +121,7 @@ class _LoginWithPasswordState extends State<LoginWithPassword> {
), ),
30.height, 30.height,
ShowFillButton( ShowFillButton(
title: LocaleKeys.login.tr(), title: LocaleKeys.continu.tr(),
maxWidth: double.infinity, maxWidth: double.infinity,
onPressed: () { onPressed: () {
performBasicOtp(context); performBasicOtp(context);
@ -171,7 +171,7 @@ class _LoginWithPasswordState extends State<LoginWithPassword> {
if (user.messageStatus == 1) { if (user.messageStatus == 1) {
SharedPrefManager.setPhoneOrEmail(type == ClassType.NUMBER ? countryCode + phoneNum : phoneNum); SharedPrefManager.setPhoneOrEmail(type == ClassType.NUMBER ? countryCode + phoneNum : phoneNum);
SharedPrefManager.setUserPassword(password); SharedPrefManager.setUserPassword(password);
navigateReplaceWithName(context, AppRoutes.loginMethodSelection, arguments: user.data!.userToken); navigateReplaceWithName(context, AppRoutes.loginMethodSelection, arguments: {"userToke": user.data!.userToken, "userName": type == ClassType.NUMBER ? countryCode + phoneNum : phoneNum});
} else { } else {
Utils.showToast(user.message ?? ""); Utils.showToast(user.message ?? "");
} }

@ -22,7 +22,7 @@ class RegisterSelectionPage extends StatelessWidget {
height: double.infinity, height: double.infinity,
child: Column( child: Column(
children: [ children: [
mFlex(2), mFlex(4),
SvgPicture.asset("assets/images/logo.svg"), SvgPicture.asset("assets/images/logo.svg"),
mFlex(3), mFlex(3),
LocaleKeys.welcomeMessage.tr().toText20(), LocaleKeys.welcomeMessage.tr().toText20(),
@ -30,7 +30,6 @@ class RegisterSelectionPage extends StatelessWidget {
mFlex(4), mFlex(4),
ShowFillButton( ShowFillButton(
title: LocaleKeys.login.tr(), title: LocaleKeys.login.tr(),
// title: "Log In With Password",
maxWidth: double.infinity, maxWidth: double.infinity,
horizontalMargin: 20, horizontalMargin: 20,
onPressed: () { onPressed: () {
@ -48,16 +47,16 @@ class RegisterSelectionPage extends StatelessWidget {
}, },
), ),
10.height, 10.height,
ShowFillButton( // ShowFillButton(
title: LocaleKeys.forgetPassword.tr(), // title: LocaleKeys.forgetPassword.tr(),
maxWidth: double.infinity, // maxWidth: double.infinity,
isFlatButton: true, // isFlatButton: true,
isBold: false, // isBold: false,
txtColor: MyColors.darkPrimaryColor, // txtColor: MyColors.darkPrimaryColor,
onPressed: () { // onPressed: () {
navigateWithName(context, AppRoutes.forgetPassword); // navigateWithName(context, AppRoutes.forgetPassword);
}, // },
), // ),
mFlex(2), mFlex(2),
SvgPicture.asset( SvgPicture.asset(
"assets/images/bn_logo.svg", "assets/images/bn_logo.svg",

@ -14,12 +14,29 @@ class SplashPage extends StatelessWidget {
body: Container( body: Container(
width: double.infinity, width: double.infinity,
height: double.infinity, height: double.infinity,
decoration: MyColors.gradient, color: Colors.black,
child: Column( child: Column(
children: [ children: [
mExp(1), mExp(1),
Expanded( Expanded(
child: SvgPicture.asset("assets/images/splash_logo.svg"), child: Image.asset(
"assets/images/ic_logo_white.png",
),
),
Expanded(
flex: 10,
child: Image.asset(
"assets/images/bn_car.jpeg",
fit: BoxFit.cover,
width: double.infinity,
height: 00,
),
),
Expanded(
flex: 3,
child: Image.asset(
"assets/images/ic_engine.png",
),
), ),
mExp(1), mExp(1),
], ],

@ -15,8 +15,8 @@ class ShowFillButton extends StatelessWidget {
required this.title, required this.title,
required this.onPressed, required this.onPressed,
this.txtColor = Colors.white, this.txtColor = Colors.white,
this.elevation = 4, this.elevation = 0,
this.radius = 8, this.radius = 0,
this.maxWidth = 88, this.maxWidth = 88,
this.maxHeight = 45, this.maxHeight = 45,
this.fontSize = 16, this.fontSize = 16,
@ -32,7 +32,7 @@ class ShowFillButton extends StatelessWidget {
return isFlatButton return isFlatButton
? Container( ? Container(
child: showButton(), child: showButton(),
height: 30, height: maxHeight,
padding: const EdgeInsets.only( padding: const EdgeInsets.only(
left: 20, left: 20,
right: 20, right: 20,
@ -51,7 +51,8 @@ class ShowFillButton extends StatelessWidget {
Widget showButton() { Widget showButton() {
return Container( return Container(
decoration: isFlatButton ? null : MyColors.gradientButton, // decoration: isFlatButton ? null : MyColors.gradientButton,
color:isFlatButton ? null : MyColors.darkPrimaryColor,
margin: EdgeInsets.symmetric(horizontal: horizontalMargin, vertical: verticalMargin), margin: EdgeInsets.symmetric(horizontal: horizontalMargin, vertical: verticalMargin),
child: MaterialButton( child: MaterialButton(
onPressed: onPressed, onPressed: onPressed,

@ -13,9 +13,10 @@ import '../count_down_timer.dart';
import '../otp_widget.dart'; import '../otp_widget.dart';
class OtpDialog extends StatefulWidget { class OtpDialog extends StatefulWidget {
String? userName;
Function(String) onClick; Function(String) onClick;
OtpDialog({required this.onClick}); OtpDialog({required this.onClick, this.userName});
@override @override
State<OtpDialog> createState() => _OtpDialogState(); State<OtpDialog> createState() => _OtpDialogState();
@ -35,9 +36,13 @@ class _OtpDialogState extends State<OtpDialog> {
width: double.infinity, width: double.infinity,
child: Column( child: Column(
mainAxisSize: MainAxisSize.min, mainAxisSize: MainAxisSize.min,
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.center,
mainAxisAlignment: MainAxisAlignment.center,
children: [ children: [
LocaleKeys.insert_otp_code.tr().toText24(), LocaleKeys.insert_otp_code.tr().toText24(),
8.height,
LocaleKeys.type_code.tr().toText12(color: MyColors.textColor),
if (widget.userName != null) (widget.userName ?? "").toText12(color: MyColors.darkPrimaryColor),
20.height, 20.height,
Center( Center(
child: OTPWidget( child: OTPWidget(
@ -48,59 +53,32 @@ class _OtpDialogState extends State<OtpDialog> {
onTextChanged: (text) {}, onTextChanged: (text) {},
pinBoxColor: Colors.white, pinBoxColor: Colors.white,
onDone: (code) => _onOtpCallBack(code, null), onDone: (code) => _onOtpCallBack(code, null),
textBorderColor: const Color(0xffD8D8D8), textBorderColor: MyColors.darkPrimaryColor,
pinBoxWidth: 48, pinBoxWidth: 48,
pinBoxHeight: 48, pinBoxHeight: 48,
pinTextStyle: const TextStyle(fontSize: 24.0, color: MyColors.darkTextColor), pinTextStyle: const TextStyle(fontSize: 24.0, color: MyColors.darkTextColor),
pinTextAnimatedSwitcherTransition: ProvidedPinBoxTextAnimation.scalingTransition, pinTextAnimatedSwitcherTransition: ProvidedPinBoxTextAnimation.scalingTransition,
pinTextAnimatedSwitcherDuration: const Duration(milliseconds: 300), pinTextAnimatedSwitcherDuration: const Duration(milliseconds: 300),
pinBoxRadius: 8, pinBoxRadius: 0,
keyboardType: TextInputType.number, keyboardType: TextInputType.number,
), ),
), ),
// Row( 40.height,
// children: [ ShowFillButton(
// Expanded( title: LocaleKeys.check_code.tr(),
// child: Container( maxWidth: double.infinity,
// width: double.infinity, onPressed: () {
// height: 60, widget.onClick(code);
// color: accentColor.withOpacity(0.3), },
// ), ),
// ),
// 12.width,
// Expanded(
// child: Container(
// width: double.infinity,
// height: 60,
// color: accentColor.withOpacity(0.3),
// ),
// ),
// 12.width,
// Expanded(
// child: Container(
// width: double.infinity,
// height: 60,
// color: accentColor.withOpacity(0.3),
// ),
// ),
// 12.width,
// Expanded(
// child: Container(
// width: double.infinity,
// height: 60,
// color: accentColor.withOpacity(0.3),
// ),
// ),
// ],
// ),
if (!hasTimerStopped) if (!hasTimerStopped)
Padding( Padding(
padding: const EdgeInsets.all(12.0), padding: const EdgeInsets.all(12.0),
child: Row( child: Row(
crossAxisAlignment: CrossAxisAlignment.center,
mainAxisAlignment: MainAxisAlignment.center,
children: [ children: [
Expanded( Text(LocaleKeys.time_will_expire.tr() + " "),
child: Text(LocaleKeys.time_will_expire.tr()),
),
CountDownTimer( CountDownTimer(
secondsRemaining: 60, secondsRemaining: 60,
whenTimeExpires: () { whenTimeExpires: () {
@ -110,43 +88,33 @@ class _OtpDialogState extends State<OtpDialog> {
}, },
countDownTimerStyle: TextStyle( countDownTimerStyle: TextStyle(
color: Colors.blue, color: Colors.blue,
fontSize: 17.0,
height: 1.2, height: 1.2,
), ),
), ),
Text(" " + LocaleKeys.sec.tr()),
], ],
), ),
), ),
if (hasTimerStopped) if (hasTimerStopped)
Align( InkWell(
alignment: Alignment.topRight, onTap: () {
child: InkWell( setState(() {
onTap: () { hasTimerStopped = false;
setState(() { });
hasTimerStopped = false; },
}); child: Padding(
}, padding: const EdgeInsets.all(12.0),
child: Padding( child: Text(
padding: const EdgeInsets.all(12.0), LocaleKeys.resend_code.tr(),
child: Text( style: TextStyle(
LocaleKeys.resend_code.tr(), decoration: TextDecoration.underline,
style: TextStyle( fontWeight: FontWeight.bold,
decoration: TextDecoration.underline, color: Colors.blue,
fontWeight: FontWeight.bold,
color: Colors.blue,
),
), ),
), ),
), ),
), ),
40.height,
ShowFillButton(
title: LocaleKeys.check_code.tr(),
maxWidth: double.infinity,
onPressed: () {
widget.onClick(code);
},
)
], ],
), ),
); );

@ -43,10 +43,10 @@ class _DropdownFieldState extends State<DropdownField> {
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Container( return Container(
decoration: containerColorRadiusBorderWidth( decoration: containerColorRadiusBorderWidth(
MyColors.textFieldColor, MyColors.white,
8,
MyColors.textFieldColor,
0, 0,
MyColors.darkPrimaryColor,
2,
), ),
margin: EdgeInsets.all(0), margin: EdgeInsets.all(0),
padding: EdgeInsets.only(left: 8, right: 8), padding: EdgeInsets.only(left: 8, right: 8),

@ -1,5 +1,7 @@
import 'package:car_provider_app/extensions/int_extensions.dart';
import 'package:easy_localization/easy_localization.dart'; import 'package:easy_localization/easy_localization.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:sizer/sizer.dart';
import '../../classes/colors.dart'; import '../../classes/colors.dart';
import '../../generated/locale_keys.g.dart'; import '../../generated/locale_keys.g.dart';
@ -34,21 +36,22 @@ class _LoginEmailTabState extends State<LoginEmailTab> {
width: double.infinity, width: double.infinity,
height: 45, height: 45,
decoration: BoxDecoration( decoration: BoxDecoration(
color: Colors.transparent, color: type == ClassType.NUMBER ? MyColors.darkPrimaryColor : Colors.grey[200],
border: Border.all(color: type == ClassType.NUMBER ? MyColors.darkPrimaryColor : Colors.transparent, width: 2), // border: Border.all(color: type == ClassType.NUMBER ? MyColors.darkPrimaryColor : Colors.transparent, width: 2),
borderRadius: BorderRadius.all(Radius.circular(8)), borderRadius: BorderRadius.all(Radius.circular(0)),
), ),
child: Center( child: Center(
child: Text( child: Text(
LocaleKeys.number.tr(), LocaleKeys.number.tr(),
style: TextStyle( style: TextStyle(
color: Colors.black, color: type == ClassType.NUMBER ? MyColors.white : Colors.black,
), ),
), ),
), ),
), ),
), ),
), ),
12.width,
Expanded( Expanded(
child: InkWell( child: InkWell(
onTap: () { onTap: () {
@ -59,15 +62,15 @@ class _LoginEmailTabState extends State<LoginEmailTab> {
width: double.infinity, width: double.infinity,
height: 45, height: 45,
decoration: BoxDecoration( decoration: BoxDecoration(
color: Colors.transparent, color: type == ClassType.EMAIL ? MyColors.darkPrimaryColor : Colors.grey[200],
border: Border.all(color: type == ClassType.EMAIL ? MyColors.darkPrimaryColor : Colors.transparent, width: 2), // border: Border.all(color: type == ClassType.NUMBER ? MyColors.darkPrimaryColor : Colors.transparent, width: 2),
borderRadius: BorderRadius.all(Radius.circular(8)), borderRadius: BorderRadius.all(Radius.circular(0)),
), ),
child: Center( child: Center(
child: Text( child: Text(
LocaleKeys.email.tr(), LocaleKeys.email.tr(),
style: TextStyle( style: TextStyle(
color: Colors.black, color: type == ClassType.EMAIL ? MyColors.white : Colors.black,
), ),
), ),
), ),

@ -26,6 +26,7 @@ class TxtField extends StatelessWidget {
bool? isPasswordEnabled; bool? isPasswordEnabled;
Function(String)? onChanged; Function(String)? onChanged;
TextInputType? keyboardType; TextInputType? keyboardType;
bool isBackgroundEnabled=false;
TxtField({ TxtField({
this.value, this.value,
@ -45,6 +46,7 @@ class TxtField extends StatelessWidget {
this.onChanged, this.onChanged,
this.isPasswordEnabled, this.isPasswordEnabled,
this.keyboardType, this.keyboardType,
this.isBackgroundEnabled=false,
}); });
@override @override
@ -63,8 +65,8 @@ class TxtField extends StatelessWidget {
Expanded( Expanded(
child: Container( child: Container(
decoration: BoxDecoration( decoration: BoxDecoration(
color: MyColors.textFieldColor, color: isBackgroundEnabled?MyColors.textFieldColor:Colors.white,
borderRadius: BorderRadius.all(Radius.circular(8)), borderRadius: BorderRadius.all(Radius.circular(0)),
), ),
child: TextField( child: TextField(
keyboardType: keyboardType, keyboardType: keyboardType,
@ -80,16 +82,18 @@ class TxtField extends StatelessWidget {
alignLabelWithHint: true, alignLabelWithHint: true,
fillColor: Colors.white, fillColor: Colors.white,
focusedBorder: OutlineInputBorder( focusedBorder: OutlineInputBorder(
borderSide: BorderSide(color: MyColors.darkPrimaryColor, width: isNeedBorder ? 1.0 : 0), borderSide: BorderSide(color: MyColors.darkPrimaryColor, width: isNeedBorder ? 2.0 : 0),
borderRadius: BorderRadius.circular(8.0), borderRadius: BorderRadius.circular(0.0),
), ),
enabledBorder: OutlineInputBorder( enabledBorder: OutlineInputBorder(
borderSide: BorderSide(color: MyColors.textFieldColor, width: isNeedBorder ? 1.0 : 0), // borderSide: BorderSide(color: MyColors.textFieldColor, width: isNeedBorder ? 1.0 : 0),
borderRadius: BorderRadius.circular(8.0), borderSide: BorderSide(color: MyColors.darkPrimaryColor, width: isNeedBorder ? 2.0 : 0),
borderRadius: BorderRadius.circular(0.0),
), ),
disabledBorder: OutlineInputBorder( disabledBorder: OutlineInputBorder(
borderSide: BorderSide(color: MyColors.textFieldColor, width: isNeedBorder ? 1.0 : 0), // borderSide: BorderSide(color: MyColors.textFieldColor, width: isNeedBorder ? 1.0 : 0),
borderRadius: BorderRadius.circular(8.0), borderSide: BorderSide(color: MyColors.darkPrimaryColor, width: isNeedBorder ? 2.0 : 0),
borderRadius: BorderRadius.circular(0.0),
), ),
prefixIcon: prefixData != null prefixIcon: prefixData != null
? Icon( ? Icon(

@ -30,6 +30,7 @@
"createPass": "انشاء كلمة مرور جديده *", "createPass": "انشاء كلمة مرور جديده *",
"newPassword": " كلمة مرور جديده", "newPassword": " كلمة مرور جديده",
"forgetPassword": "نسيت كلمة المرور", "forgetPassword": "نسيت كلمة المرور",
"forgetPasswordRecover": "نسيت كلمة المرور؟ استعادة",
"editAccount": "تعديل الحساب", "editAccount": "تعديل الحساب",
"change": "تغيير", "change": "تغيير",
"verifyAccount": "التحقق من الحساب", "verifyAccount": "التحقق من الحساب",
@ -151,10 +152,12 @@
} }
}, },
"reset_locale": "Reset Language", "reset_locale": "Reset Language",
"insert_otp_code": "الرجاء إدخال رمز OTP", "insert_otp_code": "ادخل الرمز",
"type_code": "الرجاء كتابة الرمز الذي أرسلناه إلى",
"resend_code": "أعد إرسال الرمز", "resend_code": "أعد إرسال الرمز",
"check_code": "التحقق من الشفرة", "check_code": "التحقق من الشفرة",
"time_will_expire": "سينتهي الوقت في", "time_will_expire": "إعادة إرسال الرمز بتنسيق",
"sec" : "ثانية",
"no_city_available": "لا توجد مدينة متاحة لهذا البلد", "no_city_available": "لا توجد مدينة متاحة لهذا البلد",
"branch_created": "تم إنشاء الفرع بنجاح", "branch_created": "تم إنشاء الفرع بنجاح",
"branch_updated": "تم تحديث الفرع بنجاح", "branch_updated": "تم تحديث الفرع بنجاح",

@ -1,10 +1,10 @@
{ {
"firstTimeLogIn": "First Time Log In", "firstTimeLogIn": "First Time Log In",
"signUp": "Sign Up", "signUp": "Register",
"changeMobile": "Change Mobile", "changeMobile": "Change Mobile",
"notifications": "Notifications", "notifications": "Notifications",
"general": "General", "general": "General",
"defineLicences": "Define Licences", "defineLicences": "Register Licences",
"dealershipSettings": "Dealership Settings", "dealershipSettings": "Dealership Settings",
"changePassword": "Change Password", "changePassword": "Change Password",
"retrievePassword": "Retrieve Password", "retrievePassword": "Retrieve Password",
@ -20,7 +20,7 @@
"confirm": "Confirm", "confirm": "Confirm",
"completeProfile": "Complete Profile", "completeProfile": "Complete Profile",
"enterNewPhoneNumber": "Enter New Phone Number", "enterNewPhoneNumber": "Enter New Phone Number",
"enterPhoneNumber": "Enter Phone Number", "enterPhoneNumber": "Enter the login credentials",
"continu": "Continue", "continu": "Continue",
"confirmPassword": "Confirm Password", "confirmPassword": "Confirm Password",
"createPassword": "Create Password", "createPassword": "Create Password",
@ -31,6 +31,7 @@
"createPass": "Create Password *", "createPass": "Create Password *",
"newPassword": "New Password", "newPassword": "New Password",
"forgetPassword": "Forget Password", "forgetPassword": "Forget Password",
"forgetPasswordRecover": "Forget Password? Recover",
"editAccount": "Edit Account", "editAccount": "Edit Account",
"change": "Change", "change": "Change",
"verifyAccount": "Verify Account", "verifyAccount": "Verify Account",
@ -151,10 +152,12 @@
} }
}, },
"reset_locale": "Reset Language", "reset_locale": "Reset Language",
"insert_otp_code": "Please insert OTP Code", "insert_otp_code": "Enter the code",
"type_code": "Please type the code we sent to",
"resend_code": "Resend Code", "resend_code": "Resend Code",
"check_code": "Check Code", "check_code": "Check Code",
"time_will_expire": "Time will Expire in", "time_will_expire": "Resend code in",
"sec" : "sec",
"no_city_available": "No City Available for this country", "no_city_available": "No City Available for this country",
"branch_created": "Branch is successfully created", "branch_created": "Branch is successfully created",
"branch_updated": "Branch is successfully Updated", "branch_updated": "Branch is successfully Updated",

Loading…
Cancel
Save