BASE: Fix Buttons Radiuses.
This commit is contained in:
@@ -14,6 +14,7 @@ import 'package:customer/themes/round_button_fill.dart';
|
||||
import 'package:customer/themes/show_toast_dialog.dart';
|
||||
import 'package:firebase_auth/firebase_auth.dart' as auth;
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||
import 'package:get/get.dart';
|
||||
import '../screen_ui/auth_screens/login_screen.dart';
|
||||
import '../screen_ui/multi_vendor_service/dash_board_screens/dash_board_screen.dart';
|
||||
@@ -38,7 +39,17 @@ class ServiceListController extends GetxController {
|
||||
// fetch currency
|
||||
CurrencyModel? currency = await FireStoreUtils.getCurrency();
|
||||
|
||||
currencyData.value = currency ?? CurrencyModel(id: "", code: "USD", decimal: 2, isactive: true, name: "US Dollar", symbol: "\$", symbolatright: false);
|
||||
currencyData.value =
|
||||
currency ??
|
||||
CurrencyModel(
|
||||
id: "",
|
||||
code: "USD",
|
||||
decimal: 2,
|
||||
isactive: true,
|
||||
name: "US Dollar",
|
||||
symbol: "\$",
|
||||
symbolatright: false,
|
||||
);
|
||||
|
||||
// Load sections
|
||||
List<SectionModel> sections = await FireStoreUtils.getSections();
|
||||
@@ -59,11 +70,17 @@ class ServiceListController extends GetxController {
|
||||
});
|
||||
}
|
||||
|
||||
Future<void> onServiceTap(BuildContext context, SectionModel sectionModel) async {
|
||||
Future<void> onServiceTap(
|
||||
BuildContext context,
|
||||
SectionModel sectionModel,
|
||||
) async {
|
||||
try {
|
||||
ShowToastDialog.showLoader("Please wait...".tr);
|
||||
Constant.sectionConstantModel = sectionModel;
|
||||
AppThemeData.primary300 = Color(int.tryParse(sectionModel.color?.replaceFirst("#", "0xff") ?? '') ?? 0xff2196F3);
|
||||
AppThemeData.primary300 = Color(
|
||||
int.tryParse(sectionModel.color?.replaceFirst("#", "0xff") ?? '') ??
|
||||
0xff2196F3,
|
||||
);
|
||||
if (auth.FirebaseAuth.instance.currentUser != null) {
|
||||
String uid = auth.FirebaseAuth.instance.currentUser!.uid;
|
||||
UserModel? user = await FireStoreUtils.getUserProfile(uid);
|
||||
@@ -93,7 +110,8 @@ class ServiceListController extends GetxController {
|
||||
}
|
||||
});
|
||||
|
||||
if (sectionModel.serviceTypeFlag == "ecommerce-service" || sectionModel.serviceTypeFlag == "delivery-service") {
|
||||
if (sectionModel.serviceTypeFlag == "ecommerce-service" ||
|
||||
sectionModel.serviceTypeFlag == "delivery-service") {
|
||||
if (cartItem.isNotEmpty) {
|
||||
showAlertDialog(Get.context!, UserModel(), sectionModel);
|
||||
} else {
|
||||
@@ -130,18 +148,27 @@ class ServiceListController extends GetxController {
|
||||
|
||||
final CartProvider cartProvider = CartProvider();
|
||||
|
||||
void showAlertDialog(BuildContext context, UserModel user, SectionModel sectionModel) {
|
||||
void showAlertDialog(
|
||||
BuildContext context,
|
||||
UserModel user,
|
||||
SectionModel sectionModel,
|
||||
) {
|
||||
Get.defaultDialog(
|
||||
title: "Alert!",
|
||||
content: Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
Text("If you select this Section/Service, your previously added items will be removed from the cart.".tr, textAlign: TextAlign.center),
|
||||
Text(
|
||||
"If you select this Section/Service, your previously added items will be removed from the cart."
|
||||
.tr,
|
||||
textAlign: TextAlign.center,
|
||||
),
|
||||
const SizedBox(height: 20),
|
||||
Row(
|
||||
children: [
|
||||
Expanded(
|
||||
child: RoundedButtonFill(
|
||||
borderRadius: 10.r,
|
||||
height: 5.5,
|
||||
title: "Cancel".tr,
|
||||
onPress: () {
|
||||
@@ -154,6 +181,7 @@ class ServiceListController extends GetxController {
|
||||
const SizedBox(width: 12),
|
||||
Expanded(
|
||||
child: RoundedButtonFill(
|
||||
borderRadius: 10.r,
|
||||
title: "OK".tr,
|
||||
height: 5.5,
|
||||
onPress: () async {
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import 'package:flutter/gestures.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||
import 'package:get/get.dart';
|
||||
import '../../controllers/forgot_password_controller.dart';
|
||||
import '../../controllers/theme_controller.dart';
|
||||
@@ -26,12 +27,34 @@ class ForgotPasswordScreen extends StatelessWidget {
|
||||
actions: [
|
||||
TextButton(
|
||||
onPressed: () {},
|
||||
style: TextButton.styleFrom(padding: const EdgeInsets.symmetric(horizontal: 12), minimumSize: const Size(0, 40), tapTargetSize: MaterialTapTargetSize.shrinkWrap),
|
||||
style: TextButton.styleFrom(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 12),
|
||||
minimumSize: const Size(0, 40),
|
||||
tapTargetSize: MaterialTapTargetSize.shrinkWrap,
|
||||
),
|
||||
child: Row(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
Text("Skip".tr, style: AppThemeData.mediumTextStyle(color: isDark ? AppThemeData.greyDark500 : AppThemeData.grey500)),
|
||||
Padding(padding: const EdgeInsets.only(top: 2), child: Icon(Icons.arrow_forward_ios, size: 16, color: isDark ? AppThemeData.greyDark500 : AppThemeData.grey500)),
|
||||
Text(
|
||||
"Skip".tr,
|
||||
style: AppThemeData.mediumTextStyle(
|
||||
color:
|
||||
isDark
|
||||
? AppThemeData.greyDark500
|
||||
: AppThemeData.grey500,
|
||||
),
|
||||
),
|
||||
Padding(
|
||||
padding: const EdgeInsets.only(top: 2),
|
||||
child: Icon(
|
||||
Icons.arrow_forward_ios,
|
||||
size: 16,
|
||||
color:
|
||||
isDark
|
||||
? AppThemeData.greyDark500
|
||||
: AppThemeData.grey500,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
@@ -49,17 +72,35 @@ class ForgotPasswordScreen extends StatelessWidget {
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text(
|
||||
"Enter your registered email to receive a reset link.".tr,
|
||||
style: AppThemeData.boldTextStyle(fontSize: 24, color: isDark ? AppThemeData.greyDark900 : AppThemeData.grey900),
|
||||
"Enter your registered email to receive a reset link."
|
||||
.tr,
|
||||
style: AppThemeData.boldTextStyle(
|
||||
fontSize: 24,
|
||||
color:
|
||||
isDark
|
||||
? AppThemeData.greyDark900
|
||||
: AppThemeData.grey900,
|
||||
),
|
||||
),
|
||||
const SizedBox(height: 24),
|
||||
TextFieldWidget(title: "Email Address*".tr, hintText: "jerome014@gmail.com", controller: controller.emailEditingController.value),
|
||||
TextFieldWidget(
|
||||
title: "Email Address*".tr,
|
||||
hintText: "jerome014@gmail.com",
|
||||
controller: controller.emailEditingController.value,
|
||||
),
|
||||
const SizedBox(height: 30),
|
||||
RoundedButtonFill(
|
||||
borderRadius: 10.r,
|
||||
title: "Send Link".tr,
|
||||
onPress: controller.forgotPassword,
|
||||
color: isDark ? AppThemeData.greyDark900 : AppThemeData.grey900,
|
||||
textColor: isDark ? AppThemeData.surfaceDark : AppThemeData.surface,
|
||||
color:
|
||||
isDark
|
||||
? AppThemeData.greyDark900
|
||||
: AppThemeData.grey900,
|
||||
textColor:
|
||||
isDark
|
||||
? AppThemeData.surfaceDark
|
||||
: AppThemeData.surface,
|
||||
),
|
||||
],
|
||||
),
|
||||
@@ -71,11 +112,20 @@ class ForgotPasswordScreen extends StatelessWidget {
|
||||
child: Text.rich(
|
||||
TextSpan(
|
||||
text: "Remember Password?".tr,
|
||||
style: AppThemeData.mediumTextStyle(color: isDark ? AppThemeData.greyDark800 : AppThemeData.grey800),
|
||||
style: AppThemeData.mediumTextStyle(
|
||||
color:
|
||||
isDark
|
||||
? AppThemeData.greyDark800
|
||||
: AppThemeData.grey800,
|
||||
),
|
||||
children: [
|
||||
TextSpan(
|
||||
text: "Log in".tr,
|
||||
style: AppThemeData.mediumTextStyle(color: AppThemeData.ecommerce300, decoration: TextDecoration.underline, decorationColor: AppThemeData.ecommerce300),
|
||||
style: AppThemeData.mediumTextStyle(
|
||||
color: AppThemeData.ecommerce300,
|
||||
decoration: TextDecoration.underline,
|
||||
decorationColor: AppThemeData.ecommerce300,
|
||||
),
|
||||
recognizer:
|
||||
TapGestureRecognizer()
|
||||
..onTap = () {
|
||||
|
||||
@@ -4,6 +4,7 @@ import 'package:customer/screen_ui/auth_screens/sign_up_screen.dart';
|
||||
import 'package:customer/screen_ui/location_enable_screens/location_permission_screen.dart';
|
||||
import 'package:flutter/gestures.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||
import 'package:flutter_svg/svg.dart';
|
||||
import '../../controllers/login_controller.dart';
|
||||
import '../../controllers/theme_controller.dart';
|
||||
@@ -34,8 +35,23 @@ class LoginScreen extends StatelessWidget {
|
||||
},
|
||||
child: Row(
|
||||
children: [
|
||||
Text("Skip".tr, style: AppThemeData.mediumTextStyle(color: isDark ? AppThemeData.greyDark900 : AppThemeData.grey900)),
|
||||
Icon(Icons.arrow_forward_ios, size: 16, color: isDark ? AppThemeData.greyDark900 : AppThemeData.grey900),
|
||||
Text(
|
||||
"Skip".tr,
|
||||
style: AppThemeData.mediumTextStyle(
|
||||
color:
|
||||
isDark
|
||||
? AppThemeData.greyDark900
|
||||
: AppThemeData.grey900,
|
||||
),
|
||||
),
|
||||
Icon(
|
||||
Icons.arrow_forward_ios,
|
||||
size: 16,
|
||||
color:
|
||||
isDark
|
||||
? AppThemeData.greyDark900
|
||||
: AppThemeData.grey900,
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
@@ -54,11 +70,23 @@ class LoginScreen extends StatelessWidget {
|
||||
children: [
|
||||
const SizedBox(height: 20),
|
||||
Text(
|
||||
"Log in to explore your all in one vendor app favourites and shop effortlessly.".tr,
|
||||
style: AppThemeData.boldTextStyle(fontSize: 24, color: isDark ? AppThemeData.greyDark900 : AppThemeData.grey900),
|
||||
"Log in to explore your all in one vendor app favourites and shop effortlessly."
|
||||
.tr,
|
||||
style: AppThemeData.boldTextStyle(
|
||||
fontSize: 24,
|
||||
color:
|
||||
isDark
|
||||
? AppThemeData.greyDark900
|
||||
: AppThemeData.grey900,
|
||||
),
|
||||
),
|
||||
const SizedBox(height: 24),
|
||||
TextFieldWidget(title: "Email Address*".tr, hintText: "jerome014@gmail.com", controller: controller.emailController.value, focusNode: controller.emailFocusNode),
|
||||
TextFieldWidget(
|
||||
title: "Email Address*".tr,
|
||||
hintText: "jerome014@gmail.com",
|
||||
controller: controller.emailController.value,
|
||||
focusNode: controller.emailFocusNode,
|
||||
),
|
||||
const SizedBox(height: 15),
|
||||
TextFieldWidget(
|
||||
title: "Password*".tr,
|
||||
@@ -70,60 +98,137 @@ class LoginScreen extends StatelessWidget {
|
||||
padding: const EdgeInsets.all(12),
|
||||
child: InkWell(
|
||||
onTap: () {
|
||||
controller.passwordVisible.value = !controller.passwordVisible.value;
|
||||
controller.passwordVisible.value =
|
||||
!controller.passwordVisible.value;
|
||||
},
|
||||
child:
|
||||
controller.passwordVisible.value
|
||||
? SvgPicture.asset("assets/icons/ic_password_show.svg", colorFilter: ColorFilter.mode(isDark ? AppThemeData.grey300 : AppThemeData.grey600, BlendMode.srcIn))
|
||||
: SvgPicture.asset("assets/icons/ic_password_close.svg", colorFilter: ColorFilter.mode(isDark ? AppThemeData.grey300 : AppThemeData.grey600, BlendMode.srcIn)),
|
||||
? SvgPicture.asset(
|
||||
"assets/icons/ic_password_show.svg",
|
||||
colorFilter: ColorFilter.mode(
|
||||
isDark
|
||||
? AppThemeData.grey300
|
||||
: AppThemeData.grey600,
|
||||
BlendMode.srcIn,
|
||||
),
|
||||
)
|
||||
: SvgPicture.asset(
|
||||
"assets/icons/ic_password_close.svg",
|
||||
colorFilter: ColorFilter.mode(
|
||||
isDark
|
||||
? AppThemeData.grey300
|
||||
: AppThemeData.grey600,
|
||||
BlendMode.srcIn,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
Align(
|
||||
alignment: Alignment.centerRight,
|
||||
child: TextButton(
|
||||
onPressed: () => Get.to(() => const ForgotPasswordScreen()),
|
||||
child: Text("Forgot Password".tr, style: AppThemeData.semiBoldTextStyle(color: AppThemeData.info400)),
|
||||
onPressed:
|
||||
() => Get.to(
|
||||
() => const ForgotPasswordScreen(),
|
||||
),
|
||||
child: Text(
|
||||
"Forgot Password".tr,
|
||||
style: AppThemeData.semiBoldTextStyle(
|
||||
color: AppThemeData.info400,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
const SizedBox(height: 20),
|
||||
RoundedButtonFill(
|
||||
borderRadius: 10.r,
|
||||
title: "Log in".tr,
|
||||
onPress: controller.loginWithEmail,
|
||||
color: isDark ? AppThemeData.greyDark900 : AppThemeData.grey900,
|
||||
textColor: isDark ? AppThemeData.surfaceDark : AppThemeData.surface,
|
||||
color:
|
||||
isDark
|
||||
? AppThemeData.greyDark900
|
||||
: AppThemeData.grey900,
|
||||
textColor:
|
||||
isDark
|
||||
? AppThemeData.surfaceDark
|
||||
: AppThemeData.surface,
|
||||
),
|
||||
const SizedBox(height: 25),
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Container(width: 52, height: 1, color: isDark ? AppThemeData.greyDark400 : AppThemeData.grey300),
|
||||
Container(
|
||||
width: 52,
|
||||
height: 1,
|
||||
color:
|
||||
isDark
|
||||
? AppThemeData.greyDark400
|
||||
: AppThemeData.grey300,
|
||||
),
|
||||
const SizedBox(width: 15),
|
||||
Text("or continue with".tr, style: AppThemeData.regularTextStyle(color: isDark ? AppThemeData.greyDark900 : AppThemeData.grey900.withOpacity(0.6))),
|
||||
Text(
|
||||
"or continue with".tr,
|
||||
style: AppThemeData.regularTextStyle(
|
||||
color:
|
||||
isDark
|
||||
? AppThemeData.greyDark900
|
||||
: AppThemeData.grey900.withValues(
|
||||
alpha: 0.6,
|
||||
),
|
||||
),
|
||||
),
|
||||
const SizedBox(width: 15),
|
||||
Container(width: 52, height: 1, color: isDark ? AppThemeData.greyDark400 : AppThemeData.grey300),
|
||||
Container(
|
||||
width: 52,
|
||||
height: 1,
|
||||
color:
|
||||
isDark
|
||||
? AppThemeData.greyDark400
|
||||
: AppThemeData.grey300,
|
||||
),
|
||||
],
|
||||
),
|
||||
const SizedBox(height: 25),
|
||||
RoundedButtonFill(
|
||||
borderRadius: 10.r,
|
||||
title: "Mobile number".tr,
|
||||
onPress: () => Get.to(() => const MobileLoginScreen()),
|
||||
onPress:
|
||||
() => Get.to(() => const MobileLoginScreen()),
|
||||
isRight: false,
|
||||
isCenter: true,
|
||||
icon: Icon(Icons.mobile_friendly_outlined, size: 20, color: isDark ? AppThemeData.greyDark900 : null),
|
||||
icon: Icon(
|
||||
Icons.mobile_friendly_outlined,
|
||||
size: 20,
|
||||
color: isDark ? AppThemeData.greyDark900 : null,
|
||||
),
|
||||
//Image.asset(AppAssets.icMessage, width: 20, height: 18, color: isDark ? AppThemeData.greyDark900 : null),
|
||||
color: isDark ? AppThemeData.greyDark400 : AppThemeData.grey300,
|
||||
textColor: isDark ? AppThemeData.greyDark900 : AppThemeData.grey900,
|
||||
color:
|
||||
isDark
|
||||
? AppThemeData.greyDark400
|
||||
: AppThemeData.grey300,
|
||||
textColor:
|
||||
isDark
|
||||
? AppThemeData.greyDark900
|
||||
: AppThemeData.grey900,
|
||||
),
|
||||
const SizedBox(height: 12),
|
||||
Row(
|
||||
children: [
|
||||
Expanded(
|
||||
child: RoundedButtonFill(
|
||||
borderRadius: 10.r,
|
||||
title: "with Google".tr,
|
||||
textColor: isDark ? AppThemeData.grey100 : AppThemeData.grey900,
|
||||
color: isDark ? AppThemeData.grey900 : AppThemeData.grey100,
|
||||
icon: SvgPicture.asset("assets/icons/ic_google.svg"),
|
||||
textColor:
|
||||
isDark
|
||||
? AppThemeData.grey100
|
||||
: AppThemeData.grey900,
|
||||
color:
|
||||
isDark
|
||||
? AppThemeData.grey900
|
||||
: AppThemeData.grey100,
|
||||
icon: SvgPicture.asset(
|
||||
"assets/icons/ic_google.svg",
|
||||
),
|
||||
isRight: false,
|
||||
isCenter: true,
|
||||
onPress: () async {
|
||||
@@ -135,11 +240,20 @@ class LoginScreen extends StatelessWidget {
|
||||
Platform.isIOS
|
||||
? Expanded(
|
||||
child: RoundedButtonFill(
|
||||
borderRadius: 10.r,
|
||||
title: "with Apple".tr,
|
||||
isCenter: true,
|
||||
textColor: isDark ? AppThemeData.grey100 : AppThemeData.grey900,
|
||||
color: isDark ? AppThemeData.grey900 : AppThemeData.grey100,
|
||||
icon: SvgPicture.asset("assets/icons/ic_apple.svg"),
|
||||
textColor:
|
||||
isDark
|
||||
? AppThemeData.grey100
|
||||
: AppThemeData.grey900,
|
||||
color:
|
||||
isDark
|
||||
? AppThemeData.grey900
|
||||
: AppThemeData.grey100,
|
||||
icon: SvgPicture.asset(
|
||||
"assets/icons/ic_apple.svg",
|
||||
),
|
||||
isRight: false,
|
||||
onPress: () async {
|
||||
controller.loginWithApple();
|
||||
@@ -159,11 +273,19 @@ class LoginScreen extends StatelessWidget {
|
||||
child: Text.rich(
|
||||
TextSpan(
|
||||
text: "Didn't have an account?".tr,
|
||||
style: AppThemeData.mediumTextStyle(color: isDark ? AppThemeData.greyDark900 : AppThemeData.grey900),
|
||||
style: AppThemeData.mediumTextStyle(
|
||||
color:
|
||||
isDark
|
||||
? AppThemeData.greyDark900
|
||||
: AppThemeData.grey900,
|
||||
),
|
||||
children: [
|
||||
TextSpan(
|
||||
text: "Sign up".tr,
|
||||
style: AppThemeData.mediumTextStyle(color: AppThemeData.ecommerce300, decoration: TextDecoration.underline),
|
||||
style: AppThemeData.mediumTextStyle(
|
||||
color: AppThemeData.ecommerce300,
|
||||
decoration: TextDecoration.underline,
|
||||
),
|
||||
recognizer:
|
||||
TapGestureRecognizer()
|
||||
..onTap = () {
|
||||
|
||||
@@ -4,6 +4,7 @@ import 'package:customer/screen_ui/location_enable_screens/location_permission_s
|
||||
import 'package:flutter/gestures.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||
import 'package:get/get.dart';
|
||||
import '../../constant/assets.dart';
|
||||
import '../../constant/constant.dart';
|
||||
@@ -29,7 +30,11 @@ class MobileLoginScreen extends StatelessWidget {
|
||||
elevation: 0,
|
||||
automaticallyImplyLeading: false,
|
||||
leading: IconButton(
|
||||
icon: Icon(Icons.arrow_back, size: 20, color: isDark ? AppThemeData.greyDark500 : AppThemeData.grey500),
|
||||
icon: Icon(
|
||||
Icons.arrow_back,
|
||||
size: 20,
|
||||
color: isDark ? AppThemeData.greyDark500 : AppThemeData.grey500,
|
||||
),
|
||||
onPressed: () {
|
||||
Get.back();
|
||||
},
|
||||
@@ -39,12 +44,34 @@ class MobileLoginScreen extends StatelessWidget {
|
||||
onPressed: () {
|
||||
Get.to(() => LocationPermissionScreen());
|
||||
},
|
||||
style: TextButton.styleFrom(padding: const EdgeInsets.symmetric(horizontal: 12), minimumSize: const Size(0, 40), tapTargetSize: MaterialTapTargetSize.shrinkWrap),
|
||||
style: TextButton.styleFrom(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 12),
|
||||
minimumSize: const Size(0, 40),
|
||||
tapTargetSize: MaterialTapTargetSize.shrinkWrap,
|
||||
),
|
||||
child: Row(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
Text("Skip".tr, style: AppThemeData.mediumTextStyle(color: isDark ? AppThemeData.greyDark500 : AppThemeData.grey500)),
|
||||
Padding(padding: const EdgeInsets.only(top: 2, left: 4), child: Icon(Icons.arrow_forward_ios, size: 16, color: isDark ? AppThemeData.greyDark500 : AppThemeData.grey500)),
|
||||
Text(
|
||||
"Skip".tr,
|
||||
style: AppThemeData.mediumTextStyle(
|
||||
color:
|
||||
isDark
|
||||
? AppThemeData.greyDark500
|
||||
: AppThemeData.grey500,
|
||||
),
|
||||
),
|
||||
Padding(
|
||||
padding: const EdgeInsets.only(top: 2, left: 4),
|
||||
child: Icon(
|
||||
Icons.arrow_forward_ios,
|
||||
size: 16,
|
||||
color:
|
||||
isDark
|
||||
? AppThemeData.greyDark500
|
||||
: AppThemeData.grey500,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
@@ -62,67 +89,163 @@ class MobileLoginScreen extends StatelessWidget {
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text(
|
||||
"Use your mobile number to Log in easily and securely.".tr,
|
||||
style: AppThemeData.boldTextStyle(fontSize: 24, color: isDark ? AppThemeData.greyDark900 : AppThemeData.grey900),
|
||||
"Use your mobile number to Log in easily and securely."
|
||||
.tr,
|
||||
style: AppThemeData.boldTextStyle(
|
||||
fontSize: 24,
|
||||
color:
|
||||
isDark
|
||||
? AppThemeData.greyDark900
|
||||
: AppThemeData.grey900,
|
||||
),
|
||||
),
|
||||
const SizedBox(height: 25),
|
||||
TextFieldWidget(
|
||||
title: "Mobile Number*".tr,
|
||||
hintText: "Enter Mobile number".tr,
|
||||
controller: controller.mobileController.value,
|
||||
textInputType: const TextInputType.numberWithOptions(signed: true, decimal: true),
|
||||
textInputType:
|
||||
const TextInputType.numberWithOptions(
|
||||
signed: true,
|
||||
decimal: true,
|
||||
),
|
||||
textInputAction: TextInputAction.done,
|
||||
inputFormatters: [FilteringTextInputFormatter.allow(RegExp('[0-9]')), LengthLimitingTextInputFormatter(10)],
|
||||
inputFormatters: [
|
||||
FilteringTextInputFormatter.allow(
|
||||
RegExp('[0-9]'),
|
||||
),
|
||||
LengthLimitingTextInputFormatter(10),
|
||||
],
|
||||
prefix: Row(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
CountryCodePicker(
|
||||
onChanged: (value) {
|
||||
controller.countryCodeController.value.text = value.dialCode ?? Constant.defaultCountryCode;
|
||||
controller
|
||||
.countryCodeController
|
||||
.value
|
||||
.text = value.dialCode ??
|
||||
Constant.defaultCountryCode;
|
||||
},
|
||||
initialSelection: controller.countryCodeController.value.text.isNotEmpty ? controller.countryCodeController.value.text : Constant.defaultCountryCode,
|
||||
initialSelection:
|
||||
controller
|
||||
.countryCodeController
|
||||
.value
|
||||
.text
|
||||
.isNotEmpty
|
||||
? controller
|
||||
.countryCodeController
|
||||
.value
|
||||
.text
|
||||
: Constant.defaultCountryCode,
|
||||
showCountryOnly: false,
|
||||
showOnlyCountryWhenClosed: false,
|
||||
alignLeft: false,
|
||||
textStyle: TextStyle(fontSize: 16, color: isDark ? AppThemeData.greyDark900 : Colors.black),
|
||||
dialogTextStyle: TextStyle(fontSize: 16, color: isDark ? AppThemeData.greyDark900 : AppThemeData.grey900),
|
||||
searchStyle: TextStyle(fontSize: 16, color: isDark ? AppThemeData.greyDark900 : AppThemeData.grey900),
|
||||
dialogBackgroundColor: isDark ? AppThemeData.surfaceDark : AppThemeData.surface,
|
||||
textStyle: TextStyle(
|
||||
fontSize: 16,
|
||||
color:
|
||||
isDark
|
||||
? AppThemeData.greyDark900
|
||||
: Colors.black,
|
||||
),
|
||||
dialogTextStyle: TextStyle(
|
||||
fontSize: 16,
|
||||
color:
|
||||
isDark
|
||||
? AppThemeData.greyDark900
|
||||
: AppThemeData.grey900,
|
||||
),
|
||||
searchStyle: TextStyle(
|
||||
fontSize: 16,
|
||||
color:
|
||||
isDark
|
||||
? AppThemeData.greyDark900
|
||||
: AppThemeData.grey900,
|
||||
),
|
||||
dialogBackgroundColor:
|
||||
isDark
|
||||
? AppThemeData.surfaceDark
|
||||
: AppThemeData.surface,
|
||||
padding: EdgeInsets.zero,
|
||||
),
|
||||
// const Icon(Icons.keyboard_arrow_down_rounded, size: 24, color: AppThemeData.grey400),
|
||||
Container(height: 24, width: 1, color: AppThemeData.grey400),
|
||||
Container(
|
||||
height: 24,
|
||||
width: 1,
|
||||
color: AppThemeData.grey400,
|
||||
),
|
||||
const SizedBox(width: 4),
|
||||
],
|
||||
),
|
||||
),
|
||||
const SizedBox(height: 30),
|
||||
RoundedButtonFill(
|
||||
borderRadius: 10.r,
|
||||
title: "Send Code".tr,
|
||||
onPress: controller.sendOtp,
|
||||
color: isDark ? AppThemeData.greyDark900 : AppThemeData.grey900,
|
||||
textColor: isDark ? AppThemeData.surfaceDark : Colors.white,
|
||||
color:
|
||||
isDark
|
||||
? AppThemeData.greyDark900
|
||||
: AppThemeData.grey900,
|
||||
textColor:
|
||||
isDark
|
||||
? AppThemeData.surfaceDark
|
||||
: Colors.white,
|
||||
),
|
||||
const SizedBox(height: 25),
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Container(width: 52, height: 1, color: isDark ? AppThemeData.greyDark300 : AppThemeData.grey300),
|
||||
Container(
|
||||
width: 52,
|
||||
height: 1,
|
||||
color:
|
||||
isDark
|
||||
? AppThemeData.greyDark300
|
||||
: AppThemeData.grey300,
|
||||
),
|
||||
const SizedBox(width: 15),
|
||||
Text("or continue with".tr, style: AppThemeData.regularTextStyle(color: isDark ? AppThemeData.greyDark400 : AppThemeData.grey400)),
|
||||
Text(
|
||||
"or continue with".tr,
|
||||
style: AppThemeData.regularTextStyle(
|
||||
color:
|
||||
isDark
|
||||
? AppThemeData.greyDark400
|
||||
: AppThemeData.grey400,
|
||||
),
|
||||
),
|
||||
const SizedBox(width: 15),
|
||||
Container(width: 52, height: 1, color: isDark ? AppThemeData.greyDark400 : AppThemeData.grey400),
|
||||
Container(
|
||||
width: 52,
|
||||
height: 1,
|
||||
color:
|
||||
isDark
|
||||
? AppThemeData.greyDark400
|
||||
: AppThemeData.grey400,
|
||||
),
|
||||
],
|
||||
),
|
||||
const SizedBox(height: 25),
|
||||
RoundedButtonFill(
|
||||
borderRadius: 10.r,
|
||||
title: "Email address".tr,
|
||||
onPress: () => Get.to(() => const SignUpScreen()),
|
||||
isRight: false,
|
||||
isCenter: true,
|
||||
icon: Image.asset(AppAssets.icMessage, width: 20, height: 18, color: isDark ? AppThemeData.greyDark900 : null),
|
||||
color: isDark ? AppThemeData.greyDark200 : AppThemeData.grey200,
|
||||
textColor: isDark ? AppThemeData.greyDark900 : AppThemeData.grey900,
|
||||
icon: Image.asset(
|
||||
AppAssets.icMessage,
|
||||
width: 20,
|
||||
height: 18,
|
||||
color: isDark ? AppThemeData.greyDark900 : null,
|
||||
),
|
||||
color:
|
||||
isDark
|
||||
? AppThemeData.greyDark200
|
||||
: AppThemeData.grey200,
|
||||
textColor:
|
||||
isDark
|
||||
? AppThemeData.greyDark900
|
||||
: AppThemeData.grey900,
|
||||
),
|
||||
],
|
||||
),
|
||||
@@ -134,7 +257,12 @@ class MobileLoginScreen extends StatelessWidget {
|
||||
child: Text.rich(
|
||||
TextSpan(
|
||||
text: "Didn't have an account?".tr,
|
||||
style: AppThemeData.mediumTextStyle(color: isDark ? AppThemeData.greyDark800 : AppThemeData.grey800),
|
||||
style: AppThemeData.mediumTextStyle(
|
||||
color:
|
||||
isDark
|
||||
? AppThemeData.greyDark800
|
||||
: AppThemeData.grey800,
|
||||
),
|
||||
children: [
|
||||
TextSpan(
|
||||
text: "Sign up".tr,
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import 'package:customer/screen_ui/auth_screens/sign_up_screen.dart';
|
||||
import 'package:flutter/gestures.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:pin_code_fields/pin_code_fields.dart';
|
||||
import '../../constant/assets.dart';
|
||||
@@ -25,7 +26,11 @@ class OtpVerificationScreen extends StatelessWidget {
|
||||
elevation: 0,
|
||||
automaticallyImplyLeading: false,
|
||||
leading: IconButton(
|
||||
icon: Icon(Icons.arrow_back, size: 20, color: isDark ? AppThemeData.greyDark500 : AppThemeData.grey500),
|
||||
icon: Icon(
|
||||
Icons.arrow_back,
|
||||
size: 20,
|
||||
color: isDark ? AppThemeData.greyDark500 : AppThemeData.grey500,
|
||||
),
|
||||
onPressed: () {
|
||||
Get.back();
|
||||
},
|
||||
@@ -35,14 +40,33 @@ class OtpVerificationScreen extends StatelessWidget {
|
||||
onPressed: () {
|
||||
// Handle skip action
|
||||
},
|
||||
style: TextButton.styleFrom(padding: const EdgeInsets.symmetric(horizontal: 12), minimumSize: const Size(0, 40), tapTargetSize: MaterialTapTargetSize.shrinkWrap),
|
||||
style: TextButton.styleFrom(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 12),
|
||||
minimumSize: const Size(0, 40),
|
||||
tapTargetSize: MaterialTapTargetSize.shrinkWrap,
|
||||
),
|
||||
child: Row(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
Text("Skip".tr, style: AppThemeData.mediumTextStyle(color: isDark ? AppThemeData.greyDark500 : AppThemeData.grey500)),
|
||||
Text(
|
||||
"Skip".tr,
|
||||
style: AppThemeData.mediumTextStyle(
|
||||
color:
|
||||
isDark
|
||||
? AppThemeData.greyDark500
|
||||
: AppThemeData.grey500,
|
||||
),
|
||||
),
|
||||
Padding(
|
||||
padding: const EdgeInsets.only(top: 2, left: 4),
|
||||
child: Icon(Icons.arrow_forward_ios, size: 16, color: isDark ? AppThemeData.greyDark500 : AppThemeData.grey500),
|
||||
child: Icon(
|
||||
Icons.arrow_forward_ios,
|
||||
size: 16,
|
||||
color:
|
||||
isDark
|
||||
? AppThemeData.greyDark500
|
||||
: AppThemeData.grey500,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
@@ -62,7 +86,13 @@ class OtpVerificationScreen extends StatelessWidget {
|
||||
children: [
|
||||
Text(
|
||||
"${"Enter the OTP sent to your mobile".tr} ${controller.countryCode} ${controller.maskPhoneNumber(controller.phoneNumber.value)}",
|
||||
style: AppThemeData.boldTextStyle(fontSize: 24, color: isDark ? AppThemeData.greyDark900 : AppThemeData.grey900),
|
||||
style: AppThemeData.boldTextStyle(
|
||||
fontSize: 24,
|
||||
color:
|
||||
isDark
|
||||
? AppThemeData.greyDark900
|
||||
: AppThemeData.grey900,
|
||||
),
|
||||
),
|
||||
|
||||
const SizedBox(height: 30),
|
||||
@@ -73,20 +103,41 @@ class OtpVerificationScreen extends StatelessWidget {
|
||||
length: 6,
|
||||
controller: controller.otpController.value,
|
||||
keyboardType: TextInputType.number,
|
||||
cursorColor: isDark ? AppThemeData.greyDark500 : AppThemeData.grey500,
|
||||
cursorColor:
|
||||
isDark
|
||||
? AppThemeData.greyDark500
|
||||
: AppThemeData.grey500,
|
||||
enablePinAutofill: true,
|
||||
hintCharacter: "-",
|
||||
textStyle: AppThemeData.semiBoldTextStyle(fontSize: 18, color: isDark ? AppThemeData.greyDark800 : AppThemeData.grey800),
|
||||
textStyle: AppThemeData.semiBoldTextStyle(
|
||||
fontSize: 18,
|
||||
color:
|
||||
isDark
|
||||
? AppThemeData.greyDark800
|
||||
: AppThemeData.grey800,
|
||||
),
|
||||
pinTheme: PinTheme(
|
||||
shape: PinCodeFieldShape.box,
|
||||
borderRadius: BorderRadius.circular(12),
|
||||
fieldHeight: 54,
|
||||
fieldWidth: 51,
|
||||
inactiveColor: isDark ? AppThemeData.greyDark200 : AppThemeData.grey200,
|
||||
inactiveColor:
|
||||
isDark
|
||||
? AppThemeData.greyDark200
|
||||
: AppThemeData.grey200,
|
||||
inactiveFillColor: Colors.transparent,
|
||||
selectedColor: isDark ? AppThemeData.greyDark400 : AppThemeData.grey400,
|
||||
selectedFillColor: isDark ? AppThemeData.surfaceDark : AppThemeData.grey50,
|
||||
activeColor: isDark ? AppThemeData.greyDark200 : AppThemeData.grey200,
|
||||
selectedColor:
|
||||
isDark
|
||||
? AppThemeData.greyDark400
|
||||
: AppThemeData.grey400,
|
||||
selectedFillColor:
|
||||
isDark
|
||||
? AppThemeData.surfaceDark
|
||||
: AppThemeData.grey50,
|
||||
activeColor:
|
||||
isDark
|
||||
? AppThemeData.greyDark200
|
||||
: AppThemeData.grey200,
|
||||
activeFillColor: Colors.transparent,
|
||||
errorBorderColor: AppThemeData.danger300,
|
||||
disabledColor: Colors.transparent,
|
||||
@@ -101,13 +152,23 @@ class OtpVerificationScreen extends StatelessWidget {
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Image.asset(AppAssets.icArrowsClockwise, height: 20, width: 20),
|
||||
Image.asset(
|
||||
AppAssets.icArrowsClockwise,
|
||||
height: 20,
|
||||
width: 20,
|
||||
),
|
||||
TextButton(
|
||||
onPressed: () {
|
||||
controller.otpController.value.clear();
|
||||
controller.sendOTP();
|
||||
},
|
||||
child: Text("Resend OTP".tr, style: AppThemeData.semiBoldTextStyle(color: AppThemeData.info400, fontSize: 16)),
|
||||
child: Text(
|
||||
"Resend OTP".tr,
|
||||
style: AppThemeData.semiBoldTextStyle(
|
||||
color: AppThemeData.info400,
|
||||
fontSize: 16,
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
@@ -116,10 +177,17 @@ class OtpVerificationScreen extends StatelessWidget {
|
||||
|
||||
/// Verify Button
|
||||
RoundedButtonFill(
|
||||
borderRadius: 10.r,
|
||||
title: "Verify".tr,
|
||||
onPress: controller.verifyOtp,
|
||||
color: isDark ? AppThemeData.greyDark900 : AppThemeData.grey900,
|
||||
textColor: isDark ? AppThemeData.surfaceDark : Colors.white,
|
||||
color:
|
||||
isDark
|
||||
? AppThemeData.greyDark900
|
||||
: AppThemeData.grey900,
|
||||
textColor:
|
||||
isDark
|
||||
? AppThemeData.surfaceDark
|
||||
: Colors.white,
|
||||
),
|
||||
],
|
||||
),
|
||||
@@ -131,12 +199,25 @@ class OtpVerificationScreen extends StatelessWidget {
|
||||
child: Text.rich(
|
||||
TextSpan(
|
||||
text: "Didn't have an account?".tr,
|
||||
style: AppThemeData.mediumTextStyle(color: isDark ? AppThemeData.greyDark800 : AppThemeData.grey800),
|
||||
style: AppThemeData.mediumTextStyle(
|
||||
color:
|
||||
isDark
|
||||
? AppThemeData.greyDark800
|
||||
: AppThemeData.grey800,
|
||||
),
|
||||
children: [
|
||||
TextSpan(
|
||||
text: "Sign up".tr,
|
||||
style: AppThemeData.mediumTextStyle(color: AppThemeData.ecommerce300, decoration: TextDecoration.underline),
|
||||
recognizer: TapGestureRecognizer()..onTap = () => Get.offAll(() => const SignUpScreen()),
|
||||
style: AppThemeData.mediumTextStyle(
|
||||
color: AppThemeData.ecommerce300,
|
||||
decoration: TextDecoration.underline,
|
||||
),
|
||||
recognizer:
|
||||
TapGestureRecognizer()
|
||||
..onTap =
|
||||
() => Get.offAll(
|
||||
() => const SignUpScreen(),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
|
||||
@@ -3,6 +3,7 @@ import 'package:customer/screen_ui/location_enable_screens/location_permission_s
|
||||
import 'package:flutter/gestures.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||
import 'package:flutter_svg/svg.dart';
|
||||
import '../../constant/constant.dart';
|
||||
import '../../controllers/sign_up_controller.dart';
|
||||
@@ -163,6 +164,7 @@ class SignUpScreen extends StatelessWidget {
|
||||
TextFieldWidget(title: "Referral Code".tr, hintText: "Enter referral code".tr, controller: controller.referralController.value),
|
||||
const SizedBox(height: 40),
|
||||
RoundedButtonFill(
|
||||
borderRadius: 10.r,
|
||||
title: "Sign up".tr,
|
||||
onPress: () => controller.signUp(),
|
||||
color: isDark ? AppThemeData.greyDark900 : AppThemeData.grey900,
|
||||
@@ -181,6 +183,7 @@ class SignUpScreen extends StatelessWidget {
|
||||
),
|
||||
const SizedBox(height: 25),
|
||||
RoundedButtonFill(
|
||||
borderRadius: 10.r,
|
||||
title: "Mobile number".tr,
|
||||
onPress: () => Get.to(() => const MobileLoginScreen()),
|
||||
isRight: false,
|
||||
|
||||
@@ -15,6 +15,7 @@ import 'package:customer/utils/network_image_widget.dart';
|
||||
import 'package:customer/utils/utils.dart';
|
||||
import 'package:dotted_border/dotted_border.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||
import 'package:flutter_svg/flutter_svg.dart';
|
||||
import 'package:geocoding/geocoding.dart' as get_cord_address;
|
||||
import 'package:get/get.dart';
|
||||
@@ -320,6 +321,7 @@ class IntercityHomeScreen extends StatelessWidget {
|
||||
),
|
||||
SizedBox(height: 10),
|
||||
RoundedButtonFill(
|
||||
borderRadius: 10.r,
|
||||
title: "Continue".tr,
|
||||
onPress: () {
|
||||
if (controller.sourceTextEditController.value.text.isEmpty) {
|
||||
@@ -457,6 +459,7 @@ class IntercityHomeScreen extends StatelessWidget {
|
||||
),
|
||||
Obx(
|
||||
() => RoundedButtonFill(
|
||||
borderRadius: 10.r,
|
||||
title: 'pay_amount'.trParams({
|
||||
'amount':
|
||||
controller.selectedVehicleType.value.id == null
|
||||
@@ -594,6 +597,7 @@ class IntercityHomeScreen extends StatelessWidget {
|
||||
),
|
||||
),
|
||||
RoundedButtonFill(
|
||||
borderRadius: 10.r,
|
||||
title: "Continue".tr,
|
||||
color: AppThemeData.primary300,
|
||||
textColor: AppThemeData.grey900,
|
||||
@@ -819,9 +823,10 @@ class IntercityHomeScreen extends StatelessWidget {
|
||||
),
|
||||
),
|
||||
RoundedButtonFill(
|
||||
borderRadius: 10.r,
|
||||
title: "Redeem now".tr,
|
||||
width: 27,
|
||||
borderRadius: 10,
|
||||
width: 27.w,
|
||||
|
||||
fontSizes: 14,
|
||||
onPress: () async {
|
||||
if (controller.cabCouponList
|
||||
@@ -1001,6 +1006,7 @@ class IntercityHomeScreen extends StatelessWidget {
|
||||
),
|
||||
),
|
||||
RoundedButtonFill(
|
||||
borderRadius: 10.r,
|
||||
title: "Confirm Booking".tr,
|
||||
onPress: () async {
|
||||
controller.placeOrder();
|
||||
@@ -1039,6 +1045,7 @@ class IntercityHomeScreen extends StatelessWidget {
|
||||
Text("Waiting for driver....".tr, style: AppThemeData.mediumTextStyle(fontSize: 18, color: AppThemeData.grey900)),
|
||||
Image.asset('assets/loader.gif', width: 250),
|
||||
RoundedButtonFill(
|
||||
borderRadius: 10.r,
|
||||
title: "Cancel Ride".tr,
|
||||
onPress: () async {
|
||||
try {
|
||||
@@ -1400,6 +1407,7 @@ class IntercityHomeScreen extends StatelessWidget {
|
||||
return Column(
|
||||
children: [
|
||||
RoundedButtonFill(
|
||||
borderRadius: 10.r,
|
||||
title: "SOS".tr,
|
||||
color: Colors.red.withOpacity(0.50),
|
||||
textColor: AppThemeData.grey50,
|
||||
@@ -1456,6 +1464,7 @@ class IntercityHomeScreen extends StatelessWidget {
|
||||
Obx(() {
|
||||
if (controller.currentOrder.value.status == Constant.orderInTransit && controller.currentOrder.value.paymentStatus == false) {
|
||||
return RoundedButtonFill(
|
||||
borderRadius: 10.r,
|
||||
title: "Pay Now".tr,
|
||||
onPress: () async {
|
||||
if (controller.selectedPaymentMethod.value == PaymentGateway.stripe.name) {
|
||||
|
||||
@@ -430,6 +430,7 @@ class CabBookingScreen extends StatelessWidget {
|
||||
),
|
||||
SizedBox(height: 15),
|
||||
RoundedButtonFill(
|
||||
borderRadius: 10.r,
|
||||
title: "Continue".tr,
|
||||
onPress: () {
|
||||
if (controller
|
||||
@@ -501,7 +502,7 @@ class CabBookingScreen extends StatelessWidget {
|
||||
),
|
||||
],
|
||||
),
|
||||
SizedBox(height: 15.h),
|
||||
SizedBox(height: 10.h),
|
||||
Padding(
|
||||
padding: EdgeInsetsGeometry.symmetric(horizontal: 16.r),
|
||||
child: Text(
|
||||
@@ -663,35 +664,39 @@ class CabBookingScreen extends StatelessWidget {
|
||||
),
|
||||
),
|
||||
SizedBox(height: 15.h),
|
||||
Obx(
|
||||
() => RoundedButtonFill(
|
||||
title: 'pay_amount'.trParams({
|
||||
'amount':
|
||||
controller.selectedVehicleType.value.id == null
|
||||
? Constant.amountShow(amount: "0.0")
|
||||
: Constant.amountShow(
|
||||
amount:
|
||||
controller
|
||||
.getAmount(
|
||||
controller
|
||||
.selectedVehicleType
|
||||
.value,
|
||||
)
|
||||
.toString(),
|
||||
),
|
||||
}),
|
||||
onPress: () async {
|
||||
if (controller.selectedVehicleType.value.id != null) {
|
||||
controller.calculateTotalAmount();
|
||||
controller.bottomSheetType.value = "payment";
|
||||
} else {
|
||||
ShowToastDialog.showToast(
|
||||
"Please select a vehicle type first.".tr,
|
||||
);
|
||||
}
|
||||
},
|
||||
color: AppThemeData.mainColor,
|
||||
textColor: AppThemeData.grey50,
|
||||
Padding(
|
||||
padding: EdgeInsetsGeometry.symmetric(horizontal: 16.r),
|
||||
child: Obx(
|
||||
() => RoundedButtonFill(
|
||||
borderRadius: 10.r,
|
||||
title: 'pay_amount'.trParams({
|
||||
'amount':
|
||||
controller.selectedVehicleType.value.id == null
|
||||
? Constant.amountShow(amount: "0.0")
|
||||
: Constant.amountShow(
|
||||
amount:
|
||||
controller
|
||||
.getAmount(
|
||||
controller
|
||||
.selectedVehicleType
|
||||
.value,
|
||||
)
|
||||
.toString(),
|
||||
),
|
||||
}),
|
||||
onPress: () async {
|
||||
if (controller.selectedVehicleType.value.id != null) {
|
||||
controller.calculateTotalAmount();
|
||||
controller.bottomSheetType.value = "payment";
|
||||
} else {
|
||||
ShowToastDialog.showToast(
|
||||
"Please select a vehicle type first.".tr,
|
||||
);
|
||||
}
|
||||
},
|
||||
color: AppThemeData.mainColor,
|
||||
textColor: AppThemeData.grey50,
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
@@ -993,6 +998,7 @@ class CabBookingScreen extends StatelessWidget {
|
||||
),
|
||||
),
|
||||
RoundedButtonFill(
|
||||
borderRadius: 10.r,
|
||||
title: "Continue".tr,
|
||||
color: AppThemeData.primary300,
|
||||
textColor: AppThemeData.grey900,
|
||||
@@ -1396,9 +1402,9 @@ class CabBookingScreen extends StatelessWidget {
|
||||
),
|
||||
),
|
||||
RoundedButtonFill(
|
||||
borderRadius: 10.r,
|
||||
title: "Redeem now".tr,
|
||||
width: 27,
|
||||
borderRadius: 10,
|
||||
width: 27.w,
|
||||
fontSizes: 14,
|
||||
onPress: () async {
|
||||
if (controller
|
||||
@@ -1879,6 +1885,7 @@ class CabBookingScreen extends StatelessWidget {
|
||||
),
|
||||
),
|
||||
RoundedButtonFill(
|
||||
borderRadius: 10.r,
|
||||
title: "Confirm Booking".tr,
|
||||
onPress: () async {
|
||||
controller.placeOrder();
|
||||
@@ -1943,6 +1950,7 @@ class CabBookingScreen extends StatelessWidget {
|
||||
),
|
||||
Image.asset('assets/loader.gif', width: 250),
|
||||
RoundedButtonFill(
|
||||
borderRadius: 10.r,
|
||||
title: "Cancel Ride".tr,
|
||||
color: AppThemeData.danger300,
|
||||
textColor: AppThemeData.surface,
|
||||
@@ -2787,8 +2795,9 @@ class CabBookingScreen extends StatelessWidget {
|
||||
return Column(
|
||||
children: [
|
||||
RoundedButtonFill(
|
||||
borderRadius: 10.r,
|
||||
title: "SOS".tr,
|
||||
color: Colors.red.withOpacity(0.50),
|
||||
color: Colors.red.withValues(alpha: 0.50),
|
||||
textColor: AppThemeData.grey50,
|
||||
isCenter: true,
|
||||
icon: const Icon(Icons.call, color: Colors.white),
|
||||
@@ -2850,6 +2859,7 @@ class CabBookingScreen extends StatelessWidget {
|
||||
Constant.orderInTransit &&
|
||||
controller.currentOrder.value.paymentStatus == false) {
|
||||
return RoundedButtonFill(
|
||||
borderRadius: 10.r,
|
||||
title: "Pay Now".tr,
|
||||
onPress: () async {
|
||||
if (controller.selectedPaymentMethod.value ==
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,6 +1,7 @@
|
||||
import 'package:customer/controllers/cab_review_controller.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_rating_bar/flutter_rating_bar.dart';
|
||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||
import 'package:get/get.dart';
|
||||
import '../../constant/constant.dart';
|
||||
import '../../controllers/theme_controller.dart';
|
||||
@@ -120,6 +121,7 @@ class CabReviewScreen extends StatelessWidget {
|
||||
Padding(
|
||||
padding: const EdgeInsets.all(20.0),
|
||||
child: RoundedButtonFill(
|
||||
borderRadius: 10.r,
|
||||
title: controller.ratingModel.value != null ? "Update Review".tr : "Add Review".tr,
|
||||
color: AppThemeData.primary300,
|
||||
textColor: isDark ? Colors.white : Colors.black,
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||
import 'package:get/get.dart';
|
||||
import '../../controllers/complain_controller.dart';
|
||||
import '../../controllers/theme_controller.dart';
|
||||
@@ -53,7 +54,7 @@ class ComplainScreen extends StatelessWidget {
|
||||
const SizedBox(height: 10),
|
||||
Obx(() => TextFieldWidget(title: "Complain".tr, hintText: 'Type Description....'.tr, controller: controller.comment.value, maxLine: 8)),
|
||||
const SizedBox(height: 20),
|
||||
RoundedButtonFill(title: "Save".tr, color: AppThemeData.primary300, textColor: AppThemeData.grey50, onPress: () => controller.submitComplain()),
|
||||
RoundedButtonFill( borderRadius: 10.r,title: "Save".tr, color: AppThemeData.primary300, textColor: AppThemeData.grey50, onPress: () => controller.submitComplain()),
|
||||
],
|
||||
),
|
||||
),
|
||||
|
||||
@@ -6,6 +6,7 @@ import 'package:customer/screen_ui/multi_vendor_service/wallet_screen/wallet_scr
|
||||
import 'package:customer/themes/round_button_fill.dart';
|
||||
import 'package:customer/themes/show_toast_dialog.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||
import 'package:get/get.dart';
|
||||
import '../../constant/constant.dart';
|
||||
import '../../controllers/my_cab_booking_controller.dart';
|
||||
@@ -89,6 +90,7 @@ class MyCabBookingScreen extends StatelessWidget {
|
||||
),
|
||||
const SizedBox(height: 20),
|
||||
RoundedButtonFill(
|
||||
borderRadius: 10.r,
|
||||
title: "Log in".tr,
|
||||
width: 55,
|
||||
height: 5.5,
|
||||
@@ -226,6 +228,7 @@ class MyCabBookingScreen extends StatelessWidget {
|
||||
if (order.status == Constant.orderInTransit && order.paymentStatus == false) SizedBox(height: 14),
|
||||
order.status == Constant.orderInTransit && order.paymentStatus == false
|
||||
? RoundedButtonFill(
|
||||
borderRadius: 10.r,
|
||||
title: "Pay Now".tr,
|
||||
onPress: () async {
|
||||
controller.selectedPaymentMethod.value = order.paymentMethod.toString();
|
||||
@@ -361,6 +364,7 @@ class MyCabBookingScreen extends StatelessWidget {
|
||||
),
|
||||
),
|
||||
RoundedButtonFill(
|
||||
borderRadius: 10.r,
|
||||
title: "Continue".tr,
|
||||
color: AppThemeData.primary300,
|
||||
textColor: AppThemeData.grey900,
|
||||
|
||||
@@ -7,6 +7,7 @@ import 'package:customer/screen_ui/location_enable_screens/enter_manually_locati
|
||||
import 'package:customer/themes/app_them_data.dart' show AppThemeData;
|
||||
import 'package:customer/themes/round_button_fill.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||
import 'package:flutter_svg/flutter_svg.dart';
|
||||
import 'package:get/get.dart';
|
||||
|
||||
@@ -127,6 +128,7 @@ class AddressListScreen extends StatelessWidget {
|
||||
bottomNavigationBar: Padding(
|
||||
padding: const EdgeInsets.only(bottom: 30, left: 16, right: 16, top: 20),
|
||||
child: RoundedButtonFill(
|
||||
borderRadius: 10.r,
|
||||
title: "Add New Address",
|
||||
onPress: () {
|
||||
Get.to(EnterManuallyLocationScreen())!.then((value) {
|
||||
|
||||
@@ -7,6 +7,7 @@ import 'package:customer/widget/osm_map/map_picker_page.dart';
|
||||
import 'package:customer/widget/place_picker/location_picker_screen.dart';
|
||||
import 'package:customer/widget/place_picker/selected_location_model.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||
import 'package:get/get.dart';
|
||||
|
||||
import '../../controllers/enter_manually_location_controller.dart';
|
||||
@@ -173,6 +174,7 @@ class EnterManuallyLocationScreen extends StatelessWidget {
|
||||
),
|
||||
const SizedBox(height: 30),
|
||||
RoundedButtonFill(
|
||||
borderRadius: 10.r,
|
||||
title: "Save Address".tr,
|
||||
color: AppThemeData.primary300,
|
||||
textColor: AppThemeData.grey50,
|
||||
|
||||
@@ -10,6 +10,7 @@ import 'package:customer/widget/osm_map/map_picker_page.dart';
|
||||
import 'package:customer/widget/place_picker/location_picker_screen.dart';
|
||||
import 'package:customer/widget/place_picker/selected_location_model.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||
import 'package:geocoding/geocoding.dart';
|
||||
import 'package:geolocator/geolocator.dart';
|
||||
import 'package:get/get.dart';
|
||||
@@ -54,6 +55,7 @@ class LocationPermissionScreen extends StatelessWidget {
|
||||
),
|
||||
const SizedBox(height: 30),
|
||||
RoundedButtonFill(
|
||||
borderRadius: 10.r,
|
||||
title: "Use current location".tr,
|
||||
onPress: () async {
|
||||
Constant.checkPermission(
|
||||
@@ -104,6 +106,7 @@ class LocationPermissionScreen extends StatelessWidget {
|
||||
),
|
||||
const SizedBox(height: 10),
|
||||
RoundedButtonFill(
|
||||
borderRadius: 10.r,
|
||||
title: "Set from map".tr,
|
||||
onPress: () async {
|
||||
Constant.checkPermission(
|
||||
|
||||
@@ -16,6 +16,7 @@ import 'package:customer/themes/text_field_widget.dart';
|
||||
import 'package:customer/utils/network_image_widget.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||
import 'package:flutter_svg/flutter_svg.dart';
|
||||
import 'package:get/get.dart';
|
||||
|
||||
@@ -1052,6 +1053,7 @@ class CartScreen extends StatelessWidget {
|
||||
),
|
||||
Expanded(
|
||||
child: RoundedButtonFill(
|
||||
borderRadius: 10.r,
|
||||
textColor:
|
||||
controller.selectedPaymentMethod.value != ''
|
||||
? AppThemeData.surface
|
||||
@@ -1176,6 +1178,7 @@ class CartScreen extends StatelessWidget {
|
||||
children: [
|
||||
Expanded(
|
||||
child: RoundedButtonFill(
|
||||
borderRadius: 10.r,
|
||||
title: "Cancel".tr,
|
||||
color: isDark ? AppThemeData.grey700 : AppThemeData.grey200,
|
||||
textColor: isDark ? AppThemeData.grey50 : AppThemeData.grey900,
|
||||
@@ -1187,6 +1190,7 @@ class CartScreen extends StatelessWidget {
|
||||
const SizedBox(width: 20),
|
||||
Expanded(
|
||||
child: RoundedButtonFill(
|
||||
borderRadius: 10.r,
|
||||
title: "Add".tr,
|
||||
color: AppThemeData.primary300,
|
||||
textColor: AppThemeData.grey50,
|
||||
|
||||
@@ -7,6 +7,7 @@ import 'package:customer/screen_ui/ecommarce/dash_board_e_commerce_screen.dart';
|
||||
import 'package:customer/themes/app_them_data.dart';
|
||||
import 'package:customer/themes/round_button_fill.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||
import 'package:flutter_svg/flutter_svg.dart';
|
||||
import 'package:get/get.dart';
|
||||
|
||||
@@ -194,6 +195,7 @@ class OrderPlacingScreen extends StatelessWidget {
|
||||
child:
|
||||
controller.isPlacing.value
|
||||
? RoundedButtonFill(
|
||||
borderRadius: 10.r,
|
||||
title: "Track Order".tr,
|
||||
height: 5.5,
|
||||
color: AppThemeData.primary300,
|
||||
@@ -212,6 +214,7 @@ class OrderPlacingScreen extends StatelessWidget {
|
||||
},
|
||||
)
|
||||
: RoundedButtonFill(
|
||||
borderRadius: 10.r,
|
||||
title: "Track Order".tr,
|
||||
height: 5.5,
|
||||
color: isDark ? AppThemeData.grey700 : AppThemeData.grey200,
|
||||
|
||||
@@ -3,6 +3,7 @@ import 'package:customer/controllers/cart_controller.dart';
|
||||
import 'package:customer/themes/app_them_data.dart';
|
||||
import 'package:customer/themes/round_button_fill.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||
import 'package:get/get.dart';
|
||||
|
||||
import '../../../controllers/theme_controller.dart';
|
||||
@@ -178,11 +179,12 @@ class SelectPaymentScreen extends StatelessWidget {
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.only(bottom: 20),
|
||||
child: RoundedButtonFill(
|
||||
borderRadius: 10.r,
|
||||
title: "${'Pay Now'.tr} | ${Constant.amountShow(amount: controller.totalAmount.value.toString())}".tr,
|
||||
height: 5,
|
||||
color: AppThemeData.primary300,
|
||||
textColor: AppThemeData.grey50,
|
||||
fontSizes: 16,
|
||||
fontSizes: 16.sp,
|
||||
onPress: () async {
|
||||
Get.back();
|
||||
},
|
||||
|
||||
@@ -6,6 +6,7 @@ import 'package:customer/themes/round_button_fill.dart';
|
||||
import 'package:customer/themes/text_field_widget.dart';
|
||||
import 'package:customer/utils/network_image_widget.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:intl/intl.dart';
|
||||
|
||||
@@ -183,6 +184,7 @@ class BookTableScreen extends StatelessWidget {
|
||||
right: 0,
|
||||
child: Center(
|
||||
child: RoundedButtonFill(
|
||||
borderRadius: 10.r,
|
||||
title: "${controller.dateList[index].discountPer}%".tr,
|
||||
color: AppThemeData.primary300,
|
||||
textColor: AppThemeData.grey50,
|
||||
@@ -372,6 +374,7 @@ class BookTableScreen extends StatelessWidget {
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.only(bottom: 20),
|
||||
child: RoundedButtonFill(
|
||||
borderRadius: 10.r,
|
||||
title: "Book Now".tr,
|
||||
height: 5.5,
|
||||
color: AppThemeData.primary300,
|
||||
|
||||
@@ -11,6 +11,7 @@ import 'package:customer/themes/responsive.dart';
|
||||
import 'package:customer/themes/round_button_fill.dart';
|
||||
import 'package:customer/utils/network_image_widget.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||
import 'package:flutter_svg/flutter_svg.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:url_launcher/url_launcher.dart';
|
||||
@@ -105,6 +106,7 @@ class DineInScreen extends StatelessWidget {
|
||||
),
|
||||
const SizedBox(height: 20),
|
||||
RoundedButtonFill(
|
||||
borderRadius: 10.r,
|
||||
title: "Change Zone".tr,
|
||||
width: 55,
|
||||
height: 5.5,
|
||||
|
||||
@@ -7,6 +7,7 @@ import 'package:customer/themes/round_button_fill.dart';
|
||||
import 'package:customer/themes/text_field_widget.dart';
|
||||
import 'package:customer/utils/network_image_widget.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||
import 'package:flutter_svg/flutter_svg.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:image_picker/image_picker.dart';
|
||||
@@ -95,6 +96,7 @@ class EditProfileScreen extends StatelessWidget {
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.only(bottom: 20),
|
||||
child: RoundedButtonFill(
|
||||
borderRadius: 10.r,
|
||||
title: "Save Details".tr,
|
||||
height: 5.5,
|
||||
color: AppThemeData.primary300,
|
||||
|
||||
Reference in New Issue
Block a user