diff --git a/assets/assets/fonts/Poppins-Medium.ttf b/assets/assets/fonts/Poppins-Medium.ttf
new file mode 100644
index 0000000..6bcdcc2
Binary files /dev/null and b/assets/assets/fonts/Poppins-Medium.ttf differ
diff --git a/assets/assets/icons/Group 17.png b/assets/assets/icons/Group 17.png
new file mode 100644
index 0000000..7bb404a
Binary files /dev/null and b/assets/assets/icons/Group 17.png differ
diff --git a/assets/assets/icons/ic_branchs.svg b/assets/assets/icons/ic_branchs.svg
new file mode 100644
index 0000000..d074656
--- /dev/null
+++ b/assets/assets/icons/ic_branchs.svg
@@ -0,0 +1,27 @@
+
diff --git a/assets/assets/icons/ic_close_account.svg b/assets/assets/icons/ic_close_account.svg
new file mode 100644
index 0000000..93adb61
--- /dev/null
+++ b/assets/assets/icons/ic_close_account.svg
@@ -0,0 +1,10 @@
+
diff --git a/assets/assets/icons/ic_face.svg b/assets/assets/icons/ic_face.svg
new file mode 100644
index 0000000..5fa9a9c
--- /dev/null
+++ b/assets/assets/icons/ic_face.svg
@@ -0,0 +1,18 @@
+
diff --git a/assets/assets/icons/ic_face_id.png b/assets/assets/icons/ic_face_id.png
new file mode 100644
index 0000000..913e850
Binary files /dev/null and b/assets/assets/icons/ic_face_id.png differ
diff --git a/assets/assets/icons/ic_fingerprint.png b/assets/assets/icons/ic_fingerprint.png
new file mode 100644
index 0000000..bf73197
Binary files /dev/null and b/assets/assets/icons/ic_fingerprint.png differ
diff --git a/assets/assets/icons/ic_fingerprint.svg b/assets/assets/icons/ic_fingerprint.svg
new file mode 100644
index 0000000..ba45417
--- /dev/null
+++ b/assets/assets/icons/ic_fingerprint.svg
@@ -0,0 +1,14 @@
+
diff --git a/assets/assets/icons/ic_provider.svg b/assets/assets/icons/ic_provider.svg
new file mode 100644
index 0000000..e22c356
--- /dev/null
+++ b/assets/assets/icons/ic_provider.svg
@@ -0,0 +1,3 @@
+
diff --git a/assets/assets/icons/ic_services.svg b/assets/assets/icons/ic_services.svg
new file mode 100644
index 0000000..b0d0606
--- /dev/null
+++ b/assets/assets/icons/ic_services.svg
@@ -0,0 +1,13 @@
+
diff --git a/assets/assets/icons/ic_settings.svg b/assets/assets/icons/ic_settings.svg
new file mode 100644
index 0000000..6435135
--- /dev/null
+++ b/assets/assets/icons/ic_settings.svg
@@ -0,0 +1,4 @@
+
diff --git a/assets/assets/icons/ic_sms.png b/assets/assets/icons/ic_sms.png
new file mode 100644
index 0000000..aa72e0e
Binary files /dev/null and b/assets/assets/icons/ic_sms.png differ
diff --git a/assets/assets/icons/ic_sms.svg b/assets/assets/icons/ic_sms.svg
new file mode 100644
index 0000000..132ab7f
--- /dev/null
+++ b/assets/assets/icons/ic_sms.svg
@@ -0,0 +1,13 @@
+
diff --git a/assets/assets/icons/ic_whatsapp.png b/assets/assets/icons/ic_whatsapp.png
new file mode 100644
index 0000000..3f36403
Binary files /dev/null and b/assets/assets/icons/ic_whatsapp.png differ
diff --git a/assets/assets/icons/ic_whatsapp.svg b/assets/assets/icons/ic_whatsapp.svg
new file mode 100644
index 0000000..073e581
--- /dev/null
+++ b/assets/assets/icons/ic_whatsapp.svg
@@ -0,0 +1,13 @@
+
diff --git a/assets/assets/images/bn_car.jpeg b/assets/assets/images/bn_car.jpeg
new file mode 100644
index 0000000..5a6bd85
Binary files /dev/null and b/assets/assets/images/bn_car.jpeg differ
diff --git a/assets/assets/images/bn_logo.svg b/assets/assets/images/bn_logo.svg
new file mode 100644
index 0000000..b0c971d
--- /dev/null
+++ b/assets/assets/images/bn_logo.svg
@@ -0,0 +1,560 @@
+
diff --git a/assets/assets/images/bn_map.png b/assets/assets/images/bn_map.png
new file mode 100644
index 0000000..b04b5aa
Binary files /dev/null and b/assets/assets/images/bn_map.png differ
diff --git a/assets/assets/images/ic_car.svg b/assets/assets/images/ic_car.svg
new file mode 100644
index 0000000..804f607
--- /dev/null
+++ b/assets/assets/images/ic_car.svg
@@ -0,0 +1,11 @@
+
diff --git a/assets/assets/images/ic_edit.svg b/assets/assets/images/ic_edit.svg
new file mode 100644
index 0000000..c14165f
--- /dev/null
+++ b/assets/assets/images/ic_edit.svg
@@ -0,0 +1,4 @@
+
diff --git a/assets/assets/images/ic_email.svg b/assets/assets/images/ic_email.svg
new file mode 100644
index 0000000..81c4573
--- /dev/null
+++ b/assets/assets/images/ic_email.svg
@@ -0,0 +1,17 @@
+
diff --git a/assets/assets/images/ic_engine.png b/assets/assets/images/ic_engine.png
new file mode 100644
index 0000000..0256ff0
Binary files /dev/null and b/assets/assets/images/ic_engine.png differ
diff --git a/assets/assets/images/ic_lock.svg b/assets/assets/images/ic_lock.svg
new file mode 100644
index 0000000..1273157
--- /dev/null
+++ b/assets/assets/images/ic_lock.svg
@@ -0,0 +1,3 @@
+
diff --git a/assets/assets/images/ic_logo_white.png b/assets/assets/images/ic_logo_white.png
new file mode 100644
index 0000000..779fda4
Binary files /dev/null and b/assets/assets/images/ic_logo_white.png differ
diff --git a/assets/assets/images/ic_logout.svg b/assets/assets/images/ic_logout.svg
new file mode 100644
index 0000000..2be107f
--- /dev/null
+++ b/assets/assets/images/ic_logout.svg
@@ -0,0 +1,11 @@
+
diff --git a/assets/assets/images/ic_mobile.svg b/assets/assets/images/ic_mobile.svg
new file mode 100644
index 0000000..068cf7a
--- /dev/null
+++ b/assets/assets/images/ic_mobile.svg
@@ -0,0 +1,10 @@
+
diff --git a/assets/assets/images/ic_notes.svg b/assets/assets/images/ic_notes.svg
new file mode 100644
index 0000000..009cf17
--- /dev/null
+++ b/assets/assets/images/ic_notes.svg
@@ -0,0 +1,12 @@
+
diff --git a/assets/assets/images/ic_notification.svg b/assets/assets/images/ic_notification.svg
new file mode 100644
index 0000000..e45bab2
--- /dev/null
+++ b/assets/assets/images/ic_notification.svg
@@ -0,0 +1,4 @@
+
diff --git a/assets/assets/images/ic_settings.svg b/assets/assets/images/ic_settings.svg
new file mode 100644
index 0000000..83b64c9
--- /dev/null
+++ b/assets/assets/images/ic_settings.svg
@@ -0,0 +1,4 @@
+
diff --git a/assets/assets/images/ic_world.png b/assets/assets/images/ic_world.png
new file mode 100644
index 0000000..01ea634
Binary files /dev/null and b/assets/assets/images/ic_world.png differ
diff --git a/assets/assets/images/logo.svg b/assets/assets/images/logo.svg
new file mode 100644
index 0000000..8552147
--- /dev/null
+++ b/assets/assets/images/logo.svg
@@ -0,0 +1,38 @@
+
diff --git a/assets/assets/images/splash_logo.svg b/assets/assets/images/splash_logo.svg
new file mode 100644
index 0000000..481226e
--- /dev/null
+++ b/assets/assets/images/splash_logo.svg
@@ -0,0 +1,16 @@
+
diff --git a/lib/pages/user/login_with_password_page.dart b/lib/pages/user/login_with_password_page.dart
index e42d712..709a61b 100644
--- a/lib/pages/user/login_with_password_page.dart
+++ b/lib/pages/user/login_with_password_page.dart
@@ -67,7 +67,7 @@ class _LoginWithPasswordState extends State {
child: Column(
children: [
12.height,
- LocaleKeys.log_in.tr().toText20(),
+ LocaleKeys.login.tr().toText20(),
20.height,
(type == ClassType.NUMBER ? LocaleKeys.enterPhoneNumber.tr() : LocaleKeys.enterEmail.tr()).toText14(
color: MyColors.lightTextColor,
@@ -109,7 +109,7 @@ class _LoginWithPasswordState extends State {
),
10.height,
ShowFillButton(
- title: LocaleKeys.forgetPassword.tr(),
+ title: LocaleKeys.forgetPasswordRecover.tr(),
isFlatButton: true,
isBold: false,
fontSize: 14,
@@ -120,7 +120,7 @@ class _LoginWithPasswordState extends State {
),
30.height,
ShowFillButton(
- title: LocaleKeys.login.tr(),
+ title: LocaleKeys.continu.tr(),
maxWidth: double.infinity,
onPressed: () {
performBasicOtp(context);
diff --git a/lib/pages/user/register_selection_page.dart b/lib/pages/user/register_selection_page.dart
index 646ea0f..b4d04f3 100644
--- a/lib/pages/user/register_selection_page.dart
+++ b/lib/pages/user/register_selection_page.dart
@@ -23,7 +23,7 @@ class RegisterSelectionPage extends StatelessWidget {
height: double.infinity,
child: Column(
children: [
- mFlex(2),
+ mFlex(4),
SvgPicture.asset("assets/images/logo.svg"),
mFlex(3),
LocaleKeys.welcomeMessage.tr().toText20(),
@@ -31,7 +31,6 @@ class RegisterSelectionPage extends StatelessWidget {
mFlex(4),
ShowFillButton(
title: LocaleKeys.login.tr(),
- // title: "Log In With Password",
maxWidth: double.infinity,
horizontalMargin: 20,
onPressed: () {
@@ -49,16 +48,16 @@ class RegisterSelectionPage extends StatelessWidget {
},
),
10.height,
- ShowFillButton(
- title: LocaleKeys.forgetPassword.tr(),
- maxWidth: double.infinity,
- isFlatButton: true,
- isBold: false,
- txtColor: MyColors.darkPrimaryColor,
- onPressed: () {
- navigateWithName(context, AppRoutes.forgetPassword);
- },
- ),
+ // ShowFillButton(
+ // title: LocaleKeys.forgetPassword.tr(),
+ // maxWidth: double.infinity,
+ // isFlatButton: true,
+ // isBold: false,
+ // txtColor: MyColors.darkPrimaryColor,
+ // onPressed: () {
+ // navigateWithName(context, AppRoutes.forgetPassword);
+ // },
+ // ),
mFlex(2),
SvgPicture.asset(
"assets/images/bn_logo.svg",
diff --git a/lib/pages/user/splash_page.dart b/lib/pages/user/splash_page.dart
index 602a99d..2a4c355 100644
--- a/lib/pages/user/splash_page.dart
+++ b/lib/pages/user/splash_page.dart
@@ -7,76 +7,6 @@ import 'package:flutter/material.dart';
import '../../classes/colors.dart';
-// class SplashPage extends StatelessWidget {
-// @override
-// Widget build(BuildContext context) {
-// return Scaffold(
-// body: Container(
-// width: double.infinity,
-// height: double.infinity,
-// child: Column(
-// children: [
-// mFlex(5),
-// "Logo".toText(fontSize: 45, isBold: true),
-// mFlex(3),
-// LocaleKeys.firstTimeLogIn.tr().toText(fontSize: 18, isBold: true).onPress(() {
-// navigateWithName(context, AppRoutes.registerSelection);
-// }),
-// mFlex(1),
-// LocaleKeys.alreadySigned.tr().toText(fontSize: 18, isBold: true).onPress(() async {
-// // navigateWithName(context, AppRoutes.loginVerification);
-//
-// String token = await SharedPrefManager.getUserToken();
-// String refreshToken = await SharedPrefManager.getRefreshToken();
-// Utils.showLoading(context);
-// RefreshToken refresh = await UserApiClent().RefreshTokenAPI(token, refreshToken);
-// Utils.hideLoading(context);
-// if (refresh.messageStatus == 1) {
-// SharedPrefManager.setUserToken(refresh.data!.accessToken ?? "");
-// SharedPrefManager.setRefreshToken(refresh.data!.refreshToken ?? "");
-// String mdata = await SharedPrefManager.getData();
-// print(mdata);
-// UserInfo info = UserInfo.fromJson(jsonDecode(mdata));
-// User user = new User();
-// user.data = new UserData(accessToken: refresh.data!.accessToken ?? "", refreshToken: refresh.data!.refreshToken ?? "", userInfo: info);
-// AppState().setUser = user;
-// print(AppState().getUser.data?.userInfo?.roleName);
-// navigateWithName(context, AppRoutes.dashboard);
-// } else {
-// String accessToken = await SharedPrefManager.getUserToken();
-// String refreshToken = await SharedPrefManager.getRefreshToken();
-// String mdata = await SharedPrefManager.getData();
-// UserInfo info = UserInfo.fromJson(jsonDecode(mdata));
-// User user = new User();
-// user.data = new UserData(accessToken: accessToken, refreshToken: refreshToken, userInfo: info);
-// AppState().setUser = user;
-// print(AppState().getUser.data?.userInfo?.roleName);
-// navigateWithName(context, AppRoutes.dashboard);
-// }
-// }),
-// 35.height,
-// TextButton(
-// style: TextButton.styleFrom(
-// backgroundColor: Colors.white,
-// ),
-// onPressed: () {
-// if (EasyLocalization.of(context)?.currentLocale?.countryCode == "SA")
-// context.setLocale(const Locale("en", "US"));
-// else
-// context.setLocale(const Locale('ar', 'SA'));
-// },
-// child: Text(
-// LocaleKeys.english.tr(),
-// ),
-// ),
-// mFlex(5),
-// ],
-// ),
-// ),
-// );
-// }
-// }
-
class SplashPage extends StatelessWidget {
@override
Widget build(BuildContext context) {
@@ -85,12 +15,29 @@ class SplashPage extends StatelessWidget {
body: Container(
width: double.infinity,
height: double.infinity,
- decoration: MyColors.gradient,
+ color: Colors.black,
child: Column(
children: [
mExp(1),
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),
],
diff --git a/lib/widgets/count_down_timer.dart b/lib/widgets/count_down_timer.dart
new file mode 100644
index 0000000..3817e3c
--- /dev/null
+++ b/lib/widgets/count_down_timer.dart
@@ -0,0 +1,108 @@
+import 'package:flutter/material.dart';
+
+class CountDownTimer extends StatefulWidget {
+ const CountDownTimer({
+ Key? key,
+ int? secondsRemaining,
+ this.countDownTimerStyle,
+ this.whenTimeExpires,
+ this.countDownFormatter,
+ })
+ : secondsRemaining = secondsRemaining,
+ super(key: key);
+
+ final int? secondsRemaining;
+ final Function? whenTimeExpires;
+ final Function? countDownFormatter;
+ final TextStyle ?countDownTimerStyle;
+
+ State createState() => new _CountDownTimerState();
+}
+
+class _CountDownTimerState extends State
+ with TickerProviderStateMixin {
+ late AnimationController _controller;
+ late Duration duration;
+
+ String get timerDisplayString {
+ Duration duration = _controller.duration! * _controller.value;
+ return widget.countDownFormatter != null
+ ? widget.countDownFormatter!(duration.inSeconds)
+ : formatHHMMSS(duration.inSeconds);
+ // In case user doesn't provide formatter use the default one
+ // for that create a method which will be called formatHHMMSS or whatever you like
+ }
+
+ @override
+ void initState() {
+ super.initState();
+ duration = new Duration(seconds: widget.secondsRemaining ?? 0);
+ _controller = new AnimationController(
+ vsync: this,
+ duration: duration,
+ );
+ _controller.reverse(from: widget.secondsRemaining!.toDouble());
+ _controller.addStatusListener((status) {
+ if (status == AnimationStatus.completed || status == AnimationStatus.dismissed) {
+ widget.whenTimeExpires!();
+ }
+ });
+ }
+
+ @override
+ void didUpdateWidget(CountDownTimer oldWidget) {
+ if (widget.secondsRemaining != oldWidget.secondsRemaining) {
+ setState(() {
+ duration = new Duration(seconds: widget.secondsRemaining ?? 0);
+ _controller.dispose();
+ _controller = new AnimationController(
+ vsync: this,
+ duration: duration,
+ );
+ _controller.reverse(from: widget.secondsRemaining?.toDouble());
+ _controller.addStatusListener((status) {
+ if (status == AnimationStatus.completed) {
+ widget.whenTimeExpires!();
+ } else if (status == AnimationStatus.dismissed) {
+ print("Animation Complete");
+ }
+ });
+ });
+ }
+ }
+
+ @override
+ void dispose() {
+ _controller.dispose();
+ super.dispose();
+ }
+
+ @override
+ Widget build(BuildContext context) {
+ return new Center(
+ child: AnimatedBuilder(
+ animation: _controller,
+ builder: (_, Widget? child) {
+ return Text(
+ timerDisplayString ??"",
+ style: widget.countDownTimerStyle,
+ );
+ }),);
+ }
+}
+
+String formatHHMMSS(int seconds) {
+ int hours = (seconds / 3600).truncate();
+ seconds = (seconds % 3600).truncate();
+ int minutes = (seconds / 60).truncate();
+
+ String hoursStr = (hours).toString().padLeft(2, '0');
+ String minutesStr = (minutes).toString().padLeft(2, '0');
+ String secondsStr = (seconds % 60).toString().padLeft(2, '0');
+
+ if (hours == 0) {
+ return "$minutesStr:$secondsStr";
+ }
+
+ return "$hoursStr:$minutesStr:$secondsStr";
+}
\ No newline at end of file
diff --git a/lib/widgets/dialog/otp_dialog.dart b/lib/widgets/dialog/otp_dialog.dart
index ebdb553..e5bcc0d 100644
--- a/lib/widgets/dialog/otp_dialog.dart
+++ b/lib/widgets/dialog/otp_dialog.dart
@@ -1,20 +1,31 @@
import 'package:car_customer_app/classes/colors.dart';
+import 'package:car_customer_app/generated/locale_keys.g.dart';
import 'package:car_customer_app/theme/colors.dart';
import 'package:car_customer_app/utils/navigator.dart';
import 'package:car_customer_app/utils/utils.dart';
+import 'package:car_customer_app/widgets/count_down_timer.dart';
import 'package:car_customer_app/widgets/show_fill_button.dart';
import 'package:car_customer_app/extensions/string_extensions.dart';
import 'package:car_customer_app/extensions/int_extensions.dart';
+import 'package:easy_localization/easy_localization.dart';
import 'package:flutter/material.dart';
import '../otp_widget.dart';
-class OtpDialog extends StatelessWidget {
+class OtpDialog extends StatefulWidget {
+ String? userName;
Function(String) onClick;
+ OtpDialog({required this.onClick, this.userName});
+
+ @override
+ State createState() => _OtpDialogState();
+}
+
+class _OtpDialogState extends State {
+ String code = "";
+ bool hasTimerStopped = false;
- OtpDialog({required this.onClick});
- String code="";
final TextEditingController _pinPutController = TextEditingController();
@override
@@ -22,72 +33,88 @@ class OtpDialog extends StatelessWidget {
return Container(
color: Colors.white,
padding: EdgeInsets.all(24),
+ width: double.infinity,
child: Column(
mainAxisSize: MainAxisSize.min,
- crossAxisAlignment: CrossAxisAlignment.start,
+ crossAxisAlignment: CrossAxisAlignment.center,
+ mainAxisAlignment: MainAxisAlignment.center,
children: [
- "Please insert OTP Code".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,
- OTPWidget(
- autoFocus: true,
- controller: _pinPutController,
- defaultBorderColor: const Color(0xffD8D8D8),
- maxLength: 4,
- onTextChanged: (text) {},
- pinBoxColor: Colors.white,
- onDone: (code) => _onOtpCallBack(code, null),
- textBorderColor: const Color(0xffD8D8D8),
- pinBoxWidth: 60,
- pinBoxHeight: 60,
- pinTextStyle: const TextStyle(fontSize: 24.0, color: MyColors.darkTextColor),
- pinTextAnimatedSwitcherTransition: ProvidedPinBoxTextAnimation.scalingTransition,
- pinTextAnimatedSwitcherDuration: const Duration(milliseconds: 300),
- pinBoxRadius: 10,
- keyboardType: TextInputType.number,
+ Center(
+ child: OTPWidget(
+ autoFocus: true,
+ controller: _pinPutController,
+ defaultBorderColor: const Color(0xffD8D8D8),
+ maxLength: 4,
+ onTextChanged: (text) {},
+ pinBoxColor: Colors.white,
+ onDone: (code) => _onOtpCallBack(code, null),
+ textBorderColor: MyColors.darkPrimaryColor,
+ pinBoxWidth: 48,
+ pinBoxHeight: 48,
+ pinTextStyle: const TextStyle(fontSize: 24.0, color: MyColors.darkTextColor),
+ pinTextAnimatedSwitcherTransition: ProvidedPinBoxTextAnimation.scalingTransition,
+ pinTextAnimatedSwitcherDuration: const Duration(milliseconds: 300),
+ pinBoxRadius: 0,
+ keyboardType: TextInputType.number,
+ ),
),
- // Row(
- // children: [
- // 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),
- // ),
- // ),
- // 12.width,
- // Expanded(
- // child: Container(
- // width: double.infinity,
- // height: 60,
- // color: accentColor.withOpacity(0.3),
- // ),
- // ),
- // ],
- // ),
40.height,
ShowFillButton(
- title: "Check Code",
+ title: LocaleKeys.check_code.tr(),
maxWidth: double.infinity,
onPressed: () {
- onClick(code);
+ widget.onClick(code);
},
- )
+ ),
+ if (!hasTimerStopped)
+ Padding(
+ padding: const EdgeInsets.all(12.0),
+ child: Row(
+ crossAxisAlignment: CrossAxisAlignment.center,
+ mainAxisAlignment: MainAxisAlignment.center,
+ children: [
+ Text(LocaleKeys.time_will_expire.tr() + " "),
+ CountDownTimer(
+ secondsRemaining: 60,
+ whenTimeExpires: () {
+ setState(() {
+ hasTimerStopped = true;
+ });
+ },
+ countDownTimerStyle: TextStyle(
+ color: Colors.blue,
+ height: 1.2,
+ ),
+ ),
+ Text(" " + LocaleKeys.sec.tr()),
+ ],
+ ),
+ ),
+ if (hasTimerStopped)
+ InkWell(
+ onTap: () {
+ setState(() {
+ hasTimerStopped = false;
+ });
+ },
+ child: Padding(
+ padding: const EdgeInsets.all(12.0),
+ child: Text(
+ LocaleKeys.resend_code.tr(),
+ style: TextStyle(
+ decoration: TextDecoration.underline,
+ fontWeight: FontWeight.bold,
+ color: Colors.blue,
+ ),
+ ),
+ ),
+ ),
+
],
),
);
@@ -96,7 +123,7 @@ class OtpDialog extends StatelessWidget {
_onOtpCallBack(String otpCode, bool? isAutofill) {
if (otpCode.length == 4) {
// onSuccess(otpCode);
- code=otpCode;
+ code = otpCode;
}
}
}
diff --git a/lib/widgets/dropdown/dropdow_field.dart b/lib/widgets/dropdown/dropdow_field.dart
index b3b3cb2..5803424 100644
--- a/lib/widgets/dropdown/dropdow_field.dart
+++ b/lib/widgets/dropdown/dropdow_field.dart
@@ -18,9 +18,10 @@ class DropValue {
class DropdownField extends StatefulWidget {
String? hint;
List? list;
+ DropValue? dropdownValue;
Function(DropValue) onSelect;
- DropdownField(this.onSelect, {this.hint, this.list});
+ DropdownField(this.onSelect, {this.hint, this.list,this.dropdownValue});
@override
State createState() => _DropdownFieldState();
@@ -33,19 +34,25 @@ class _DropdownFieldState extends State {
new DropValue(2, "Two", ""),
];
+ @override
+ void initState() {
+ super.initState();
+ dropdownValue = widget.dropdownValue;
+ }
+
@override
Widget build(BuildContext context) {
return Container(
decoration: containerColorRadiusBorderWidth(
- MyColors.textFieldColor,
- 8,
- MyColors.textFieldColor,
+ MyColors.white,
0,
+ MyColors.darkPrimaryColor,
+ 2,
),
margin: EdgeInsets.all(0),
padding: EdgeInsets.only(left: 8, right: 8),
child: DropdownButton(
- value: dropdownValue ?? null,
+ value: dropdownValue??null,
icon: const Icon(Icons.keyboard_arrow_down_sharp),
elevation: 16,
iconSize: 16,
@@ -64,7 +71,7 @@ class _DropdownFieldState extends State {
});
},
items: (widget.list ?? defaultV).map>(
- (DropValue value) {
+ (DropValue value) {
return DropdownMenuItem(
value: value,
child: value.value.toText12(),
diff --git a/lib/widgets/show_fill_button.dart b/lib/widgets/show_fill_button.dart
index 3fe3001..acfcbe5 100644
--- a/lib/widgets/show_fill_button.dart
+++ b/lib/widgets/show_fill_button.dart
@@ -16,8 +16,8 @@ class ShowFillButton extends StatelessWidget {
required this.title,
required this.onPressed,
this.txtColor = Colors.white,
- this.elevation = 4,
- this.radius = 8,
+ this.elevation = 0,
+ this.radius = 0,
this.maxWidth = 88,
this.maxHeight = 45,
this.fontSize = 16,
@@ -33,7 +33,7 @@ class ShowFillButton extends StatelessWidget {
return isFlatButton
? Container(
child: showButton(),
- height: 30,
+ height: maxHeight,
padding: const EdgeInsets.only(
left: 20,
right: 20,
@@ -52,7 +52,8 @@ class ShowFillButton extends StatelessWidget {
Widget showButton() {
return Container(
- decoration: isFlatButton ? null : MyColors.gradientButton,
+ // decoration: isFlatButton ? null : MyColors.gradientButton,
+ color:isFlatButton ? null : MyColors.darkPrimaryColor,
margin: EdgeInsets.symmetric(horizontal: horizontalMargin, vertical: verticalMargin),
child: MaterialButton(
onPressed: onPressed,
diff --git a/lib/widgets/tab/login_email_tab.dart b/lib/widgets/tab/login_email_tab.dart
index 40a07fe..ad435fc 100644
--- a/lib/widgets/tab/login_email_tab.dart
+++ b/lib/widgets/tab/login_email_tab.dart
@@ -1,3 +1,4 @@
+import 'package:car_customer_app/extensions/int_extensions.dart';
import 'package:car_customer_app/generated/locale_keys.g.dart';
import 'package:easy_localization/src/public_ext.dart';
import 'package:flutter/material.dart';
@@ -34,21 +35,22 @@ class _LoginEmailTabState extends State {
width: double.infinity,
height: 45,
decoration: BoxDecoration(
- color: Colors.transparent,
- border: Border.all(color: type == ClassType.NUMBER ? MyColors.darkPrimaryColor : Colors.transparent, width: 2),
- borderRadius: BorderRadius.all(Radius.circular(8)),
+ color: type == ClassType.NUMBER ? MyColors.darkPrimaryColor : Colors.grey[200],
+ // border: Border.all(color: type == ClassType.NUMBER ? MyColors.darkPrimaryColor : Colors.transparent, width: 2),
+ borderRadius: BorderRadius.all(Radius.circular(0)),
),
child: Center(
child: Text(
LocaleKeys.number.tr(),
style: TextStyle(
- color: Colors.black,
+ color: type == ClassType.NUMBER ? MyColors.white : Colors.black,
),
),
),
),
),
),
+ 12.width,
Expanded(
child: InkWell(
onTap: () {
@@ -59,15 +61,15 @@ class _LoginEmailTabState extends State {
width: double.infinity,
height: 45,
decoration: BoxDecoration(
- color: Colors.transparent,
- border: Border.all(color: type == ClassType.EMAIL ? MyColors.darkPrimaryColor : Colors.transparent, width: 2),
- borderRadius: BorderRadius.all(Radius.circular(8)),
+ color: type == ClassType.EMAIL ? MyColors.darkPrimaryColor : Colors.grey[200],
+ // border: Border.all(color: type == ClassType.NUMBER ? MyColors.darkPrimaryColor : Colors.transparent, width: 2),
+ borderRadius: BorderRadius.all(Radius.circular(0)),
),
child: Center(
child: Text(
LocaleKeys.email.tr(),
style: TextStyle(
- color: Colors.black,
+ color: type == ClassType.EMAIL ? MyColors.white : Colors.black,
),
),
),
diff --git a/lib/widgets/txt_field.dart b/lib/widgets/txt_field.dart
index 8a36c38..11e111a 100644
--- a/lib/widgets/txt_field.dart
+++ b/lib/widgets/txt_field.dart
@@ -26,6 +26,7 @@ class TxtField extends StatelessWidget {
bool? isPasswordEnabled;
Function(String)? onChanged;
TextInputType? keyboardType;
+ bool isBackgroundEnabled=false;
TxtField({
this.value,
@@ -45,6 +46,7 @@ class TxtField extends StatelessWidget {
this.onChanged,
this.isPasswordEnabled,
this.keyboardType,
+ this.isBackgroundEnabled=false,
});
@override
@@ -63,8 +65,8 @@ class TxtField extends StatelessWidget {
Expanded(
child: Container(
decoration: BoxDecoration(
- color: MyColors.textFieldColor,
- borderRadius: BorderRadius.all(Radius.circular(8)),
+ color: isBackgroundEnabled?MyColors.textFieldColor:Colors.white,
+ borderRadius: BorderRadius.all(Radius.circular(0)),
),
child: TextField(
keyboardType: keyboardType,
@@ -80,16 +82,18 @@ class TxtField extends StatelessWidget {
alignLabelWithHint: true,
fillColor: Colors.white,
focusedBorder: OutlineInputBorder(
- borderSide: BorderSide(color: MyColors.darkPrimaryColor, 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),
),
enabledBorder: OutlineInputBorder(
- borderSide: BorderSide(color: MyColors.textFieldColor, width: isNeedBorder ? 1.0 : 0),
- borderRadius: BorderRadius.circular(8.0),
+ // borderSide: BorderSide(color: MyColors.textFieldColor, width: isNeedBorder ? 1.0 : 0),
+ borderSide: BorderSide(color: MyColors.darkPrimaryColor, width: isNeedBorder ? 2.0 : 0),
+ borderRadius: BorderRadius.circular(0.0),
),
disabledBorder: OutlineInputBorder(
- borderSide: BorderSide(color: MyColors.textFieldColor, width: isNeedBorder ? 1.0 : 0),
- borderRadius: BorderRadius.circular(8.0),
+ // borderSide: BorderSide(color: MyColors.textFieldColor, width: isNeedBorder ? 1.0 : 0),
+ borderSide: BorderSide(color: MyColors.darkPrimaryColor, width: isNeedBorder ? 2.0 : 0),
+ borderRadius: BorderRadius.circular(0.0),
),
prefixIcon: prefixData != null
? Icon(
diff --git a/resources/langs/ar-SA.json b/resources/langs/ar-SA.json
index 165568e..1f20fa6 100644
--- a/resources/langs/ar-SA.json
+++ b/resources/langs/ar-SA.json
@@ -30,6 +30,7 @@
"createPass": "انشاء كلمة مرور جديده *",
"newPassword": " كلمة مرور جديده",
"forgetPassword": "نسيت كلمة المرور",
+ "forgetPasswordRecover": "نسيت كلمة المرور؟ استعادة",
"editAccount": "تعديل الحساب",
"change": "تغيير",
"verifyAccount": "التحقق من الحساب",
@@ -124,5 +125,11 @@
"chooseCountry": "اختر الدوله",
"terms": "بنود الخدمة وخصوصية السياسة",
"profileMsg": "أدخل التفاصيل أدناه وأكمل معلومات الملف الشخصي",
- "save": "حفظ"
+ "save": "حفظ",
+ "insert_otp_code": "ادخل الرمز",
+ "type_code": "الرجاء كتابة الرمز الذي أرسلناه إلى",
+ "resend_code": "أعد إرسال الرمز",
+ "check_code": "التحقق من الشفرة",
+ "time_will_expire": "إعادة إرسال الرمز بتنسيق",
+ "sec" : "ثانية"
}
\ No newline at end of file
diff --git a/resources/langs/en-US.json b/resources/langs/en-US.json
index 49f87cc..defb8ef 100644
--- a/resources/langs/en-US.json
+++ b/resources/langs/en-US.json
@@ -31,6 +31,7 @@
"createPass": "Create Password *",
"newPassword": "New Password",
"forgetPassword": "Forget Password",
+ "forgetPasswordRecover": "Forget Password? Recover",
"editAccount": "Edit Account",
"change": "Change",
"verifyAccount": "Verify Account",
@@ -124,5 +125,11 @@
"chooseCountry": "Choose Country",
"terms": "Terms of Service and Privacy Policy",
"profileMsg": "Enter the details below and complete the profile info",
- "save": "Save"
+ "save": "Save",
+ "insert_otp_code": "Enter the code",
+ "type_code": "Please type the code we sent to",
+ "resend_code": "Resend Code",
+ "check_code": "Check Code",
+ "time_will_expire": "Resend code in",
+ "sec" : "sec"
}
\ No newline at end of file