8-28/1
|
Before Width: | Height: | Size: 32 KiB After Width: | Height: | Size: 23 KiB |
|
Before Width: | Height: | Size: 2.8 KiB After Width: | Height: | Size: 4.6 KiB |
|
Before Width: | Height: | Size: 1.7 KiB After Width: | Height: | Size: 2.5 KiB |
|
Before Width: | Height: | Size: 4.2 KiB After Width: | Height: | Size: 7.4 KiB |
|
Before Width: | Height: | Size: 7.5 KiB After Width: | Height: | Size: 14 KiB |
|
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 23 KiB |
|
Before Width: | Height: | Size: 4.4 KiB After Width: | Height: | Size: 7.8 KiB |
|
Before Width: | Height: | Size: 152 KiB After Width: | Height: | Size: 335 KiB |
|
Before Width: | Height: | Size: 5.4 KiB After Width: | Height: | Size: 9.8 KiB |
|
Before Width: | Height: | Size: 5.8 KiB After Width: | Height: | Size: 11 KiB |
|
Before Width: | Height: | Size: 6.4 KiB After Width: | Height: | Size: 12 KiB |
|
Before Width: | Height: | Size: 7.5 KiB After Width: | Height: | Size: 14 KiB |
|
Before Width: | Height: | Size: 8.2 KiB After Width: | Height: | Size: 16 KiB |
|
Before Width: | Height: | Size: 489 B After Width: | Height: | Size: 591 B |
|
Before Width: | Height: | Size: 9.2 KiB After Width: | Height: | Size: 18 KiB |
|
Before Width: | Height: | Size: 10 KiB After Width: | Height: | Size: 21 KiB |
|
Before Width: | Height: | Size: 584 B After Width: | Height: | Size: 780 B |
|
Before Width: | Height: | Size: 18 KiB After Width: | Height: | Size: 37 KiB |
|
Before Width: | Height: | Size: 923 B After Width: | Height: | Size: 1.2 KiB |
|
Before Width: | Height: | Size: 1021 B After Width: | Height: | Size: 1.4 KiB |
|
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.9 KiB |
|
Before Width: | Height: | Size: 1.8 KiB After Width: | Height: | Size: 2.7 KiB |
|
Before Width: | Height: | Size: 32 KiB After Width: | Height: | Size: 119 KiB |
|
Before Width: | Height: | Size: 2.1 KiB After Width: | Height: | Size: 3.3 KiB |
|
Before Width: | Height: | Size: 2.2 KiB After Width: | Height: | Size: 3.3 KiB |
|
Before Width: | Height: | Size: 2.2 KiB After Width: | Height: | Size: 3.5 KiB |
|
Before Width: | Height: | Size: 2.5 KiB After Width: | Height: | Size: 3.8 KiB |
|
Before Width: | Height: | Size: 2.8 KiB After Width: | Height: | Size: 4.6 KiB |
|
Before Width: | Height: | Size: 3.1 KiB After Width: | Height: | Size: 5.1 KiB |
|
Before Width: | Height: | Size: 3.3 KiB After Width: | Height: | Size: 5.4 KiB |
|
Before Width: | Height: | Size: 3.7 KiB After Width: | Height: | Size: 6.3 KiB |
|
Before Width: | Height: | Size: 11 KiB |
|
Before Width: | Height: | Size: 295 B |
|
Before Width: | Height: | Size: 406 B |
|
Before Width: | Height: | Size: 450 B |
|
Before Width: | Height: | Size: 282 B |
|
Before Width: | Height: | Size: 462 B |
|
Before Width: | Height: | Size: 704 B |
|
Before Width: | Height: | Size: 406 B |
|
Before Width: | Height: | Size: 586 B |
|
Before Width: | Height: | Size: 862 B |
|
Before Width: | Height: | Size: 862 B |
|
Before Width: | Height: | Size: 1.6 KiB |
|
Before Width: | Height: | Size: 762 B |
|
Before Width: | Height: | Size: 1.2 KiB |
|
Before Width: | Height: | Size: 1.4 KiB |
@@ -14,4 +14,6 @@ class BoxName {
|
|||||||
static const String cardHolderName = "cardHolderName";
|
static const String cardHolderName = "cardHolderName";
|
||||||
static const String expiryDate = "expiryDate";
|
static const String expiryDate = "expiryDate";
|
||||||
static const String cvvCode = "cvvCode";
|
static const String cvvCode = "cvvCode";
|
||||||
|
static const String passengerWalletDetails = "passengerWalletDetails";
|
||||||
|
static const String passengerWalletTotal = "passengerWalletTotal";
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,7 +7,24 @@ class AppLink {
|
|||||||
static const String getTokens = "$server/ride/firebase/get.php";
|
static const String getTokens = "$server/ride/firebase/get.php";
|
||||||
static const String addTokens = "$server/ride/firebase/add.php";
|
static const String addTokens = "$server/ride/firebase/add.php";
|
||||||
|
|
||||||
//=======================ride===================
|
//=======================Wallet===================
|
||||||
|
static const String wallet = '$server/ride/passengerWallet/';
|
||||||
|
static const String getAllPassengerTransaction =
|
||||||
|
"$wallet/getAllPassengerTransaction.php";
|
||||||
|
static const String getWalletByPassenger = "$wallet/getWalletByPassenger.php";
|
||||||
|
static const String getPassengersWallet = "$wallet/get.php";
|
||||||
|
static const String addPassengersWallet = "$wallet/add.php";
|
||||||
|
static const String deletePassengersWallet = "$wallet/delete.php";
|
||||||
|
static const String updatePassengersWallet = "$wallet/update.php";
|
||||||
|
|
||||||
|
//=======================promo===================ride.mobile-app.store/ride/promo/get.php
|
||||||
|
static const String promo = '$server/ride/promo';
|
||||||
|
static const String getPassengersPromo = "$promo/get.php";
|
||||||
|
static const String addPassengersPromo = "$promo/add.php";
|
||||||
|
static const String deletePassengersPromo = "$promo/delete.php";
|
||||||
|
static const String updatePassengersPromo = "$promo/update.php";
|
||||||
|
|
||||||
|
////=======================ride===================
|
||||||
static const String ride = '$server/ride/';
|
static const String ride = '$server/ride/';
|
||||||
static const String addCancelRide = "$server/ride/cancelRide/add.php";
|
static const String addCancelRide = "$server/ride/cancelRide/add.php";
|
||||||
static const String cancelRide = "$server/ride/cancelRide/get.php";
|
static const String cancelRide = "$server/ride/cancelRide/get.php";
|
||||||
|
|||||||
@@ -21,8 +21,8 @@ class CRUD {
|
|||||||
'Basic ${base64Encode(utf8.encode(AppCredintials.basicAuthCredentials))}',
|
'Basic ${base64Encode(utf8.encode(AppCredintials.basicAuthCredentials))}',
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
// print("--------------" + response.body.toString());
|
print("--------------" + response.request.toString());
|
||||||
// print("--------------" + payload.toString());
|
print("--------------" + payload.toString());
|
||||||
if (response.statusCode == 200) {
|
if (response.statusCode == 200) {
|
||||||
var jsonData = jsonDecode(response.body);
|
var jsonData = jsonDecode(response.body);
|
||||||
if (jsonData['status'] == 'success') {
|
if (jsonData['status'] == 'success') {
|
||||||
|
|||||||
35
lib/controller/functions/toast.dart
Normal file
@@ -0,0 +1,35 @@
|
|||||||
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:get/get.dart';
|
||||||
|
import 'package:ride/constant/colors.dart';
|
||||||
|
import 'package:ride/constant/style.dart';
|
||||||
|
|
||||||
|
class Toast {
|
||||||
|
static void show(BuildContext context, String message, Color color) {
|
||||||
|
final snackBar = SnackBar(
|
||||||
|
clipBehavior: Clip.antiAliasWithSaveLayer,
|
||||||
|
backgroundColor: color,
|
||||||
|
elevation: 3,
|
||||||
|
content: Text(
|
||||||
|
message,
|
||||||
|
style: AppStyle.title.copyWith(color: AppColor.secondaryColor),
|
||||||
|
),
|
||||||
|
behavior: SnackBarBehavior.floating,
|
||||||
|
animation: const AlwaysStoppedAnimation(1.0),
|
||||||
|
shape: RoundedRectangleBorder(
|
||||||
|
borderRadius: BorderRadius.circular(10.0), // Custom border radius
|
||||||
|
),
|
||||||
|
width: Get.width * .8,
|
||||||
|
// shape: const StadiumBorder(
|
||||||
|
// side: BorderSide(
|
||||||
|
// color: AppColor.secondaryColor,
|
||||||
|
// width: 1.0,
|
||||||
|
// style: BorderStyle.solid,
|
||||||
|
// )),
|
||||||
|
duration: const Duration(seconds: 2),
|
||||||
|
);
|
||||||
|
|
||||||
|
ScaffoldMessenger.of(context).showSnackBar(
|
||||||
|
snackBar,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -11,6 +11,7 @@ import 'package:ride/constant/box_name.dart';
|
|||||||
import 'package:ride/constant/credential.dart';
|
import 'package:ride/constant/credential.dart';
|
||||||
import 'package:ride/constant/links.dart';
|
import 'package:ride/constant/links.dart';
|
||||||
import 'package:ride/controller/functions/crud.dart';
|
import 'package:ride/controller/functions/crud.dart';
|
||||||
|
import 'package:ride/controller/functions/secure_storage.dart';
|
||||||
import 'package:ride/views/widgets/elevated_btn.dart';
|
import 'package:ride/views/widgets/elevated_btn.dart';
|
||||||
import '../../main.dart';
|
import '../../main.dart';
|
||||||
import '../../models/model/locations.dart';
|
import '../../models/model/locations.dart';
|
||||||
@@ -55,6 +56,13 @@ class MapController extends GetxController {
|
|||||||
var dataCarsLocationByPassenger;
|
var dataCarsLocationByPassenger;
|
||||||
CarLocation? nearestCar;
|
CarLocation? nearestCar;
|
||||||
late Timer markerReloadingTimer;
|
late Timer markerReloadingTimer;
|
||||||
|
|
||||||
|
int selectedPassengerCount = 1;
|
||||||
|
void onChangedPassengerCount(int newValue) {
|
||||||
|
selectedPassengerCount = newValue;
|
||||||
|
update();
|
||||||
|
}
|
||||||
|
|
||||||
// final mainBottomMenuMap = GlobalKey<AnimatedContainer>();
|
// final mainBottomMenuMap = GlobalKey<AnimatedContainer>();
|
||||||
void changeButtomSheetShown() {
|
void changeButtomSheetShown() {
|
||||||
isButtomSheetShown = !isButtomSheetShown;
|
isButtomSheetShown = !isButtomSheetShown;
|
||||||
@@ -110,6 +118,7 @@ class MapController extends GetxController {
|
|||||||
changeConfirmRide() {
|
changeConfirmRide() {
|
||||||
rideConfirm = true;
|
rideConfirm = true;
|
||||||
print('rideConfirm= $rideConfirm');
|
print('rideConfirm= $rideConfirm');
|
||||||
|
|
||||||
//TODO add ride and get ride id and details
|
//TODO add ride and get ride id and details
|
||||||
update();
|
update();
|
||||||
}
|
}
|
||||||
@@ -403,7 +412,7 @@ class MapController extends GetxController {
|
|||||||
// longitude: double.parse(carLocation['longitude']),
|
// longitude: double.parse(carLocation['longitude']),
|
||||||
// );
|
// );
|
||||||
// }
|
// }
|
||||||
|
isloading = true;
|
||||||
update();
|
update();
|
||||||
// Make API request to get exact distance and duration
|
// Make API request to get exact distance and duration
|
||||||
String apiUrl =
|
String apiUrl =
|
||||||
@@ -426,6 +435,7 @@ class MapController extends GetxController {
|
|||||||
latitude: double.parse(carLocation['latitude']),
|
latitude: double.parse(carLocation['latitude']),
|
||||||
longitude: double.parse(carLocation['longitude']),
|
longitude: double.parse(carLocation['longitude']),
|
||||||
);
|
);
|
||||||
|
isloading = false;
|
||||||
update();
|
update();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -701,7 +711,7 @@ class MapController extends GetxController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
List<LatLng> polylineCoordinate = [];
|
List<LatLng> polylineCoordinate = [];
|
||||||
|
String? cardNumber;
|
||||||
@override
|
@override
|
||||||
void onInit() async {
|
void onInit() async {
|
||||||
await getLocation();
|
await getLocation();
|
||||||
@@ -710,7 +720,7 @@ class MapController extends GetxController {
|
|||||||
addCustomPicker();
|
addCustomPicker();
|
||||||
addCustomCarIcon();
|
addCustomCarIcon();
|
||||||
startMarkerReloading();
|
startMarkerReloading();
|
||||||
|
cardNumber = await SecureStorage().readData(BoxName.cardNumber);
|
||||||
super.onInit();
|
super.onInit();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -719,8 +729,8 @@ class CarLocation {
|
|||||||
final int id;
|
final int id;
|
||||||
final double latitude;
|
final double latitude;
|
||||||
final double longitude;
|
final double longitude;
|
||||||
double distance;
|
final double distance;
|
||||||
double duration;
|
final double duration;
|
||||||
|
|
||||||
CarLocation({
|
CarLocation({
|
||||||
required this.id,
|
required this.id,
|
||||||
|
|||||||
@@ -86,7 +86,10 @@ class MyTranslation extends Translations {
|
|||||||
"هل ترغب في الانتقال إلى هذا الموقع",
|
"هل ترغب في الانتقال إلى هذا الموقع",
|
||||||
"MyLocation": "موقعي",
|
"MyLocation": "موقعي",
|
||||||
"my location": "موقعي",
|
"my location": "موقعي",
|
||||||
"Target": "هدف"
|
"Target": "هدف",
|
||||||
|
/////
|
||||||
|
///
|
||||||
|
// 'Saved Sucssefully':
|
||||||
},
|
},
|
||||||
"tr": {
|
"tr": {
|
||||||
"Choose Language": "Dil Seçin",
|
"Choose Language": "Dil Seçin",
|
||||||
|
|||||||
59
lib/controller/payment/payment_controller.dart
Normal file
@@ -0,0 +1,59 @@
|
|||||||
|
import 'dart:convert';
|
||||||
|
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:get/get.dart';
|
||||||
|
|
||||||
|
import '../../constant/box_name.dart';
|
||||||
|
import '../../constant/links.dart';
|
||||||
|
import '../../main.dart';
|
||||||
|
import '../functions/crud.dart';
|
||||||
|
|
||||||
|
class PaymentController extends GetxController {
|
||||||
|
bool isloading = false;
|
||||||
|
bool isWalletCheced = false;
|
||||||
|
bool isCashCheced = false;
|
||||||
|
final formKey = GlobalKey<FormState>();
|
||||||
|
final promo = TextEditingController();
|
||||||
|
|
||||||
|
getPassengerWallet() async {
|
||||||
|
isloading = true;
|
||||||
|
update();
|
||||||
|
if (box.read(BoxName.passengerWalletDetails) == null) {
|
||||||
|
await CRUD().get(link: AppLink.getWalletByPassenger, payload: {
|
||||||
|
'passenger_id': box.read(BoxName.pasengerID)
|
||||||
|
}).then((value) {
|
||||||
|
final total = jsonDecode(value)['message'];
|
||||||
|
|
||||||
|
box.write(BoxName.passengerWalletDetails, total);
|
||||||
|
});
|
||||||
|
isloading = false;
|
||||||
|
update();
|
||||||
|
print('from empty');
|
||||||
|
print(box.read(BoxName.passengerWalletDetails));
|
||||||
|
} else {
|
||||||
|
box.read(BoxName.passengerWalletDetails);
|
||||||
|
update();
|
||||||
|
print('from full');
|
||||||
|
print(box.read(BoxName.passengerWalletDetails));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void onChangedPymentethodWallet(bool? value) {
|
||||||
|
isWalletCheced = !isWalletCheced;
|
||||||
|
isWalletCheced ? isCashCheced = false : isCashCheced = true;
|
||||||
|
update();
|
||||||
|
}
|
||||||
|
|
||||||
|
void onChangedPymentethodCash(bool? value) {
|
||||||
|
isCashCheced = !isCashCheced;
|
||||||
|
isCashCheced ? isWalletCheced = false : isWalletCheced = true;
|
||||||
|
update();
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
void onInit() {
|
||||||
|
getPassengerWallet();
|
||||||
|
|
||||||
|
super.onInit();
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -53,6 +53,14 @@ class LoginPage extends StatelessWidget {
|
|||||||
TextInputType.emailAddress,
|
TextInputType.emailAddress,
|
||||||
controller: controller.emailController,
|
controller: controller.emailController,
|
||||||
decoration: InputDecoration(
|
decoration: InputDecoration(
|
||||||
|
focusedBorder: OutlineInputBorder(
|
||||||
|
borderSide: const BorderSide(
|
||||||
|
color: AppColor.primaryColor,
|
||||||
|
width: 2.0,
|
||||||
|
),
|
||||||
|
borderRadius:
|
||||||
|
BorderRadius.circular(10),
|
||||||
|
),
|
||||||
fillColor: AppColor.accentColor,
|
fillColor: AppColor.accentColor,
|
||||||
hoverColor: AppColor.accentColor,
|
hoverColor: AppColor.accentColor,
|
||||||
focusColor: AppColor.accentColor,
|
focusColor: AppColor.accentColor,
|
||||||
@@ -81,6 +89,14 @@ class LoginPage extends StatelessWidget {
|
|||||||
cursorColor: AppColor.accentColor,
|
cursorColor: AppColor.accentColor,
|
||||||
controller: controller.phoneController,
|
controller: controller.phoneController,
|
||||||
decoration: InputDecoration(
|
decoration: InputDecoration(
|
||||||
|
focusedBorder: OutlineInputBorder(
|
||||||
|
borderSide: const BorderSide(
|
||||||
|
color: AppColor.primaryColor,
|
||||||
|
width: 2.0,
|
||||||
|
),
|
||||||
|
borderRadius:
|
||||||
|
BorderRadius.circular(10),
|
||||||
|
),
|
||||||
focusColor: AppColor.accentColor,
|
focusColor: AppColor.accentColor,
|
||||||
fillColor: AppColor.accentColor,
|
fillColor: AppColor.accentColor,
|
||||||
border: const OutlineInputBorder(
|
border: const OutlineInputBorder(
|
||||||
@@ -109,6 +125,14 @@ class LoginPage extends StatelessWidget {
|
|||||||
controller:
|
controller:
|
||||||
controller.passwordController,
|
controller.passwordController,
|
||||||
decoration: InputDecoration(
|
decoration: InputDecoration(
|
||||||
|
focusedBorder: OutlineInputBorder(
|
||||||
|
borderSide: const BorderSide(
|
||||||
|
color: AppColor.primaryColor,
|
||||||
|
width: 2.0,
|
||||||
|
),
|
||||||
|
borderRadius:
|
||||||
|
BorderRadius.circular(10),
|
||||||
|
),
|
||||||
fillColor: AppColor.accentColor,
|
fillColor: AppColor.accentColor,
|
||||||
hoverColor: AppColor.accentColor,
|
hoverColor: AppColor.accentColor,
|
||||||
focusColor: AppColor.accentColor,
|
focusColor: AppColor.accentColor,
|
||||||
|
|||||||
@@ -44,6 +44,13 @@ class RegisterPage extends StatelessWidget {
|
|||||||
keyboardType: TextInputType.text,
|
keyboardType: TextInputType.text,
|
||||||
controller: controller.firstNameController,
|
controller: controller.firstNameController,
|
||||||
decoration: InputDecoration(
|
decoration: InputDecoration(
|
||||||
|
focusedBorder: OutlineInputBorder(
|
||||||
|
borderSide: const BorderSide(
|
||||||
|
color: AppColor.primaryColor,
|
||||||
|
width: 2.0,
|
||||||
|
),
|
||||||
|
borderRadius: BorderRadius.circular(10),
|
||||||
|
),
|
||||||
fillColor: AppColor.accentColor,
|
fillColor: AppColor.accentColor,
|
||||||
hoverColor: AppColor.accentColor,
|
hoverColor: AppColor.accentColor,
|
||||||
focusColor: AppColor.accentColor,
|
focusColor: AppColor.accentColor,
|
||||||
@@ -67,6 +74,13 @@ class RegisterPage extends StatelessWidget {
|
|||||||
keyboardType: TextInputType.text,
|
keyboardType: TextInputType.text,
|
||||||
controller: controller.lastNameController,
|
controller: controller.lastNameController,
|
||||||
decoration: InputDecoration(
|
decoration: InputDecoration(
|
||||||
|
focusedBorder: OutlineInputBorder(
|
||||||
|
borderSide: const BorderSide(
|
||||||
|
color: AppColor.primaryColor,
|
||||||
|
width: 2.0,
|
||||||
|
),
|
||||||
|
borderRadius: BorderRadius.circular(10),
|
||||||
|
),
|
||||||
focusColor: AppColor.accentColor,
|
focusColor: AppColor.accentColor,
|
||||||
fillColor: AppColor.accentColor,
|
fillColor: AppColor.accentColor,
|
||||||
border: const OutlineInputBorder(
|
border: const OutlineInputBorder(
|
||||||
@@ -92,6 +106,13 @@ class RegisterPage extends StatelessWidget {
|
|||||||
keyboardType: TextInputType.emailAddress,
|
keyboardType: TextInputType.emailAddress,
|
||||||
controller: controller.emailController,
|
controller: controller.emailController,
|
||||||
decoration: InputDecoration(
|
decoration: InputDecoration(
|
||||||
|
focusedBorder: OutlineInputBorder(
|
||||||
|
borderSide: const BorderSide(
|
||||||
|
color: AppColor.primaryColor,
|
||||||
|
width: 2.0,
|
||||||
|
),
|
||||||
|
borderRadius: BorderRadius.circular(10),
|
||||||
|
),
|
||||||
fillColor: AppColor.accentColor,
|
fillColor: AppColor.accentColor,
|
||||||
hoverColor: AppColor.accentColor,
|
hoverColor: AppColor.accentColor,
|
||||||
focusColor: AppColor.accentColor,
|
focusColor: AppColor.accentColor,
|
||||||
@@ -118,6 +139,13 @@ class RegisterPage extends StatelessWidget {
|
|||||||
keyboardType: TextInputType.emailAddress,
|
keyboardType: TextInputType.emailAddress,
|
||||||
controller: controller.passwordController,
|
controller: controller.passwordController,
|
||||||
decoration: InputDecoration(
|
decoration: InputDecoration(
|
||||||
|
focusedBorder: OutlineInputBorder(
|
||||||
|
borderSide: const BorderSide(
|
||||||
|
color: AppColor.primaryColor,
|
||||||
|
width: 2.0,
|
||||||
|
),
|
||||||
|
borderRadius: BorderRadius.circular(10),
|
||||||
|
),
|
||||||
fillColor: AppColor.accentColor,
|
fillColor: AppColor.accentColor,
|
||||||
hoverColor: AppColor.accentColor,
|
hoverColor: AppColor.accentColor,
|
||||||
focusColor: AppColor.accentColor,
|
focusColor: AppColor.accentColor,
|
||||||
@@ -147,6 +175,13 @@ class RegisterPage extends StatelessWidget {
|
|||||||
cursorColor: AppColor.accentColor,
|
cursorColor: AppColor.accentColor,
|
||||||
controller: controller.phoneController,
|
controller: controller.phoneController,
|
||||||
decoration: InputDecoration(
|
decoration: InputDecoration(
|
||||||
|
focusedBorder: OutlineInputBorder(
|
||||||
|
borderSide: const BorderSide(
|
||||||
|
color: AppColor.primaryColor,
|
||||||
|
width: 2.0,
|
||||||
|
),
|
||||||
|
borderRadius: BorderRadius.circular(10),
|
||||||
|
),
|
||||||
focusColor: AppColor.accentColor,
|
focusColor: AppColor.accentColor,
|
||||||
fillColor: AppColor.accentColor,
|
fillColor: AppColor.accentColor,
|
||||||
border: const OutlineInputBorder(
|
border: const OutlineInputBorder(
|
||||||
@@ -169,6 +204,13 @@ class RegisterPage extends StatelessWidget {
|
|||||||
keyboardType: TextInputType.text,
|
keyboardType: TextInputType.text,
|
||||||
controller: controller.siteController,
|
controller: controller.siteController,
|
||||||
decoration: InputDecoration(
|
decoration: InputDecoration(
|
||||||
|
focusedBorder: OutlineInputBorder(
|
||||||
|
borderSide: const BorderSide(
|
||||||
|
color: AppColor.primaryColor,
|
||||||
|
width: 2.0,
|
||||||
|
),
|
||||||
|
borderRadius: BorderRadius.circular(10),
|
||||||
|
),
|
||||||
focusColor: AppColor.accentColor,
|
focusColor: AppColor.accentColor,
|
||||||
fillColor: AppColor.accentColor,
|
fillColor: AppColor.accentColor,
|
||||||
border: const OutlineInputBorder(
|
border: const OutlineInputBorder(
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ import 'package:ride/views/home/map_widget.dart/cancel_raide_page.dart';
|
|||||||
import 'package:ride/views/widgets/circle_container.dart';
|
import 'package:ride/views/widgets/circle_container.dart';
|
||||||
import 'package:ride/views/widgets/mycircular.dart';
|
import 'package:ride/views/widgets/mycircular.dart';
|
||||||
|
|
||||||
|
import '../../controller/functions/toast.dart';
|
||||||
import '../../controller/home/menu_controller.dart';
|
import '../../controller/home/menu_controller.dart';
|
||||||
import 'map_widget.dart/buttom_sheet_map_show.dart';
|
import 'map_widget.dart/buttom_sheet_map_show.dart';
|
||||||
import 'map_widget.dart/cash_confirm_bottom_page.dart';
|
import 'map_widget.dart/cash_confirm_bottom_page.dart';
|
||||||
@@ -153,7 +154,7 @@ class MapPage extends StatelessWidget {
|
|||||||
child: IconButton(
|
child: IconButton(
|
||||||
onPressed: () {
|
onPressed: () {
|
||||||
controller.changeMapType();
|
controller.changeMapType();
|
||||||
controller.reloadMarkers();
|
// Toast.show(context, 'This is a toast message!');
|
||||||
},
|
},
|
||||||
icon: const Icon(
|
icon: const Icon(
|
||||||
Icons.satellite_alt,
|
Icons.satellite_alt,
|
||||||
|
|||||||
@@ -1,6 +1,11 @@
|
|||||||
|
import 'package:flutter/cupertino.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:flutter_paypal/flutter_paypal.dart';
|
||||||
import 'package:get/get.dart';
|
import 'package:get/get.dart';
|
||||||
import 'package:intl/intl.dart';
|
import 'package:intl/intl.dart';
|
||||||
|
import 'package:ride/constant/links.dart';
|
||||||
|
import 'package:ride/controller/functions/crud.dart';
|
||||||
|
import 'package:ride/controller/payment/payment_controller.dart';
|
||||||
import 'package:ride/views/widgets/elevated_btn.dart';
|
import 'package:ride/views/widgets/elevated_btn.dart';
|
||||||
|
|
||||||
import '../../../constant/colors.dart';
|
import '../../../constant/colors.dart';
|
||||||
@@ -8,6 +13,7 @@ import '../../../constant/style.dart';
|
|||||||
import '../../../controller/home/map_page_controller.dart';
|
import '../../../controller/home/map_page_controller.dart';
|
||||||
|
|
||||||
GetBuilder<MapController> buttomSheetMapPage() {
|
GetBuilder<MapController> buttomSheetMapPage() {
|
||||||
|
Get.put(PaymentController());
|
||||||
return GetBuilder<MapController>(
|
return GetBuilder<MapController>(
|
||||||
builder: (controller) => controller.isButtomSheetShown
|
builder: (controller) => controller.isButtomSheetShown
|
||||||
? Positioned(
|
? Positioned(
|
||||||
@@ -160,11 +166,28 @@ GetBuilder<MapController> buttomSheetMapPage() {
|
|||||||
color: Colors.green[400],
|
color: Colors.green[400],
|
||||||
),
|
),
|
||||||
InkWell(
|
InkWell(
|
||||||
onTap: () => controller
|
onTap: () async {
|
||||||
.changeCashConfirmPageShown(),
|
controller
|
||||||
child: Text(
|
.changeCashConfirmPageShown();
|
||||||
'CASH',
|
PaymentController()
|
||||||
style: AppStyle.title,
|
.getPassengerWallet();
|
||||||
|
},
|
||||||
|
child: GetBuilder<
|
||||||
|
PaymentController>(
|
||||||
|
builder:
|
||||||
|
(paymentController) =>
|
||||||
|
paymentController
|
||||||
|
.isCashCheced
|
||||||
|
? Text(
|
||||||
|
'CASH',
|
||||||
|
style: AppStyle
|
||||||
|
.title,
|
||||||
|
)
|
||||||
|
: Text(
|
||||||
|
'Sefer Wallet',
|
||||||
|
style: AppStyle
|
||||||
|
.title,
|
||||||
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
@@ -173,32 +196,238 @@ GetBuilder<MapController> buttomSheetMapPage() {
|
|||||||
const SizedBox(
|
const SizedBox(
|
||||||
width: 40,
|
width: 40,
|
||||||
),
|
),
|
||||||
Container(
|
GetBuilder<PaymentController>(
|
||||||
decoration: BoxDecoration(
|
builder:
|
||||||
color: AppColor.secondaryColor,
|
(paymentController) =>
|
||||||
borderRadius:
|
Container(
|
||||||
BorderRadius.circular(12),
|
decoration:
|
||||||
),
|
BoxDecoration(
|
||||||
child: Row(
|
color: AppColor
|
||||||
children: [
|
.secondaryColor,
|
||||||
Icon(
|
borderRadius:
|
||||||
Icons.qr_code_2_rounded,
|
BorderRadius
|
||||||
color: Colors.green[400],
|
.circular(12),
|
||||||
),
|
),
|
||||||
Text(
|
child: Row(
|
||||||
'Add Promo'.tr,
|
children: [
|
||||||
style: AppStyle.title,
|
Icon(
|
||||||
),
|
Icons
|
||||||
],
|
.qr_code_2_rounded,
|
||||||
),
|
color: Colors
|
||||||
),
|
.green[400],
|
||||||
|
),
|
||||||
|
InkWell(
|
||||||
|
onTap: () {
|
||||||
|
Get.defaultDialog(
|
||||||
|
title: 'Add Promo'.tr,
|
||||||
|
content: Column(
|
||||||
|
children: [
|
||||||
|
SizedBox(
|
||||||
|
width:
|
||||||
|
Get.width * .7,
|
||||||
|
child:
|
||||||
|
TextFormField(
|
||||||
|
controller:
|
||||||
|
paymentController.promo,
|
||||||
|
decoration:
|
||||||
|
InputDecoration(
|
||||||
|
labelText: 'Promo Code'.tr,
|
||||||
|
hintText: 'Enter promo code'.tr,
|
||||||
|
border: OutlineInputBorder(
|
||||||
|
borderRadius: BorderRadius.circular(10),
|
||||||
|
),
|
||||||
|
filled: true,
|
||||||
|
fillColor: Colors.grey[200],
|
||||||
|
focusedBorder: OutlineInputBorder(
|
||||||
|
borderSide: const BorderSide(
|
||||||
|
color: AppColor.primaryColor,
|
||||||
|
width: 2.0,
|
||||||
|
),
|
||||||
|
borderRadius: BorderRadius.circular(10),
|
||||||
|
),
|
||||||
|
errorBorder: OutlineInputBorder(
|
||||||
|
borderSide: const BorderSide(
|
||||||
|
color: Colors.red,
|
||||||
|
width: 2.0,
|
||||||
|
),
|
||||||
|
borderRadius: BorderRadius.circular(10),
|
||||||
|
),
|
||||||
|
enabledBorder: OutlineInputBorder(
|
||||||
|
borderSide: const BorderSide(
|
||||||
|
color: Colors.grey,
|
||||||
|
width: 1.0,
|
||||||
|
),
|
||||||
|
borderRadius: BorderRadius.circular(10),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
MyElevatedButton(
|
||||||
|
title:
|
||||||
|
'Add Promo'.tr,
|
||||||
|
onPressed:
|
||||||
|
() async {
|
||||||
|
//TAWJIHI
|
||||||
|
CRUD().get(link: AppLink.getPassengersPromo);
|
||||||
|
Get.back();
|
||||||
|
},
|
||||||
|
)
|
||||||
|
],
|
||||||
|
));
|
||||||
|
},
|
||||||
|
child: Text(
|
||||||
|
'Add Promo'.tr,
|
||||||
|
style: AppStyle
|
||||||
|
.title,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
)),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
MyElevatedButton(
|
Row(
|
||||||
title: 'Confirm Selection'.tr,
|
mainAxisAlignment:
|
||||||
onPressed: () =>
|
MainAxisAlignment.spaceBetween,
|
||||||
controller.changeConfirmRide(),
|
children: [
|
||||||
|
TextButton(
|
||||||
|
onPressed: () {
|
||||||
|
Get.defaultDialog(
|
||||||
|
title: 'How Many Passengers?'.tr,
|
||||||
|
titleStyle: AppStyle.title,
|
||||||
|
content: Column(
|
||||||
|
children: [
|
||||||
|
Text(
|
||||||
|
'Allowed up to 4 Passengers.'
|
||||||
|
.tr,
|
||||||
|
style: AppStyle.title,
|
||||||
|
),
|
||||||
|
Container(
|
||||||
|
height:
|
||||||
|
200, // Set the desired height here
|
||||||
|
child: CupertinoPicker(
|
||||||
|
itemExtent: 32,
|
||||||
|
onSelectedItemChanged:
|
||||||
|
(index) {
|
||||||
|
controller
|
||||||
|
.onChangedPassengerCount(
|
||||||
|
index + 1);
|
||||||
|
},
|
||||||
|
children: [
|
||||||
|
Text('1 Passenger'.tr),
|
||||||
|
Text('2 Passengers'.tr),
|
||||||
|
Text('3 Passengers'.tr),
|
||||||
|
Text('4 Passengers'.tr),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
MyElevatedButton(
|
||||||
|
title: 'Back',
|
||||||
|
onPressed: () => Get.back(),
|
||||||
|
)
|
||||||
|
],
|
||||||
|
),
|
||||||
|
);
|
||||||
|
},
|
||||||
|
child: Row(
|
||||||
|
mainAxisAlignment:
|
||||||
|
MainAxisAlignment.spaceBetween,
|
||||||
|
children: [
|
||||||
|
Text('How Many Passengers?'.tr,
|
||||||
|
style: AppStyle.title),
|
||||||
|
const SizedBox(
|
||||||
|
width: 10,
|
||||||
|
),
|
||||||
|
Container(
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
border: Border.all()),
|
||||||
|
child: Padding(
|
||||||
|
padding:
|
||||||
|
const EdgeInsets.all(3.0),
|
||||||
|
child: Text(
|
||||||
|
controller
|
||||||
|
.selectedPassengerCount
|
||||||
|
.toString(),
|
||||||
|
style: AppStyle.title),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
MyElevatedButton(
|
||||||
|
title: 'Confirm Selection'.tr,
|
||||||
|
onPressed: () {
|
||||||
|
controller.changeConfirmRide();
|
||||||
|
|
||||||
|
// Get.to(() => UsePaypal(
|
||||||
|
// sandboxMode: true,
|
||||||
|
// clientId:
|
||||||
|
// "AXE7bR3WzFEfAInUA2PBDOsW4zolx11Qr3jVOOjjJ7KGDLY3tnMIhZgyFT5Qkvj1NKWPaE8VZbG4UrZs",
|
||||||
|
// secretKey:
|
||||||
|
// "EJPW01FKqOm-SKKP16LQ_2cr3b124aZgmE0vi3JfbkWgLffv2xIjT4iCIfQv8RYn3W8h4DzxgZu_UxZC",
|
||||||
|
// returnURL:
|
||||||
|
// "https://samplesite.com/return",
|
||||||
|
// cancelURL:
|
||||||
|
// "https://samplesite.com/cancel",
|
||||||
|
// transactions: const [
|
||||||
|
// {
|
||||||
|
// "amount": {
|
||||||
|
// "total": '10.12',
|
||||||
|
// "currency": "USD",
|
||||||
|
// "details": {
|
||||||
|
// "subtotal": '10.12',
|
||||||
|
// "shipping": '0',
|
||||||
|
// "shipping_discount": 0
|
||||||
|
// }
|
||||||
|
// },
|
||||||
|
// "description":
|
||||||
|
// "The payment transaction description.",
|
||||||
|
// "payment_options": {
|
||||||
|
// "allowed_payment_method":
|
||||||
|
// "INSTANT_FUNDING_SOURCE"
|
||||||
|
// },
|
||||||
|
// "item_list": {
|
||||||
|
// "items": [
|
||||||
|
// {
|
||||||
|
// "name":
|
||||||
|
// "A demo product",
|
||||||
|
// "quantity": 1,
|
||||||
|
// "price": '10.12',
|
||||||
|
// "currency": "USD"
|
||||||
|
// }
|
||||||
|
// ],
|
||||||
|
// // shipping address is not required though
|
||||||
|
// "shipping_address": {
|
||||||
|
// "recipient_name":
|
||||||
|
// "Jane Foster",
|
||||||
|
// "line1": "Travis County",
|
||||||
|
// "line2": "",
|
||||||
|
// "city": "Austin",
|
||||||
|
// "country_code": "US",
|
||||||
|
// "postal_code": "73301",
|
||||||
|
// "phone": "+00000000",
|
||||||
|
// "state": "Texas"
|
||||||
|
// },
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// ],
|
||||||
|
// note:
|
||||||
|
// "Contact us for any questions on your order.",
|
||||||
|
// onSuccess: (Map params) async {
|
||||||
|
// print("onSuccess: $params");
|
||||||
|
// },
|
||||||
|
// onError: (error) {
|
||||||
|
// print("onError: $error");
|
||||||
|
// },
|
||||||
|
// onCancel: (params) {
|
||||||
|
// print('cancelled: $params');
|
||||||
|
// },
|
||||||
|
// )
|
||||||
|
// );
|
||||||
|
},
|
||||||
|
),
|
||||||
|
],
|
||||||
)
|
)
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
|||||||
@@ -1,11 +1,17 @@
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:get/get.dart';
|
import 'package:get/get.dart';
|
||||||
|
import 'package:ride/constant/box_name.dart';
|
||||||
import 'package:ride/constant/style.dart';
|
import 'package:ride/constant/style.dart';
|
||||||
|
import 'package:ride/controller/functions/secure_storage.dart';
|
||||||
import 'package:ride/controller/home/payment/payment_controller.dart';
|
import 'package:ride/controller/home/payment/payment_controller.dart';
|
||||||
|
import 'package:ride/views/widgets/circle_container.dart';
|
||||||
import 'package:ride/views/widgets/elevated_btn.dart';
|
import 'package:ride/views/widgets/elevated_btn.dart';
|
||||||
|
import 'package:ride/views/widgets/mycircular.dart';
|
||||||
|
|
||||||
import '../../../constant/colors.dart';
|
import '../../../constant/colors.dart';
|
||||||
import '../../../controller/home/map_page_controller.dart';
|
import '../../../controller/home/map_page_controller.dart';
|
||||||
|
import '../../../controller/payment/payment_controller.dart';
|
||||||
|
import '../../../main.dart';
|
||||||
|
|
||||||
class CashConfirmPageShown extends StatelessWidget {
|
class CashConfirmPageShown extends StatelessWidget {
|
||||||
const CashConfirmPageShown({
|
const CashConfirmPageShown({
|
||||||
@@ -45,36 +51,41 @@ class CashConfirmPageShown extends StatelessWidget {
|
|||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
Row(
|
GetBuilder<PaymentController>(
|
||||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
builder: (controller) => Row(
|
||||||
children: [
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
const Icon(
|
children: [
|
||||||
Icons.wallet_outlined,
|
const Icon(
|
||||||
size: 25,
|
Icons.wallet_outlined,
|
||||||
color: AppColor.redColor,
|
size: 25,
|
||||||
),
|
color: AppColor.redColor,
|
||||||
const SizedBox(
|
),
|
||||||
width: 20,
|
const SizedBox(
|
||||||
),
|
width: 20,
|
||||||
Column(
|
),
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
Column(
|
||||||
children: [
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
Text(
|
children: [
|
||||||
'Ride Wallet'.tr,
|
Text(
|
||||||
style: AppStyle.title,
|
'Ride Wallet'.tr,
|
||||||
),
|
style: AppStyle.title,
|
||||||
Text(
|
),
|
||||||
'${'Your Wallet balance is '.tr}JD 0.00',
|
Text(
|
||||||
style: AppStyle.subtitle,
|
// '${'Your Wallet balance is '.tr}JD ',
|
||||||
),
|
'${'Your Wallet balance is '.tr}JD ${box.read(BoxName.passengerWalletDetails)[0]['total'].toString()}',
|
||||||
],
|
style: AppStyle.subtitle,
|
||||||
),
|
),
|
||||||
const Spacer(),
|
],
|
||||||
Checkbox.adaptive(
|
),
|
||||||
value: false,
|
const Spacer(),
|
||||||
onChanged: (value) {},
|
Checkbox.adaptive(
|
||||||
)
|
value: controller.isWalletCheced,
|
||||||
],
|
onChanged: (value) {
|
||||||
|
controller.onChangedPymentethodWallet(value);
|
||||||
|
},
|
||||||
|
)
|
||||||
|
],
|
||||||
|
),
|
||||||
),
|
),
|
||||||
const Divider(
|
const Divider(
|
||||||
color: AppColor.accentColor,
|
color: AppColor.accentColor,
|
||||||
@@ -100,10 +111,14 @@ class CashConfirmPageShown extends StatelessWidget {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
const Spacer(),
|
const Spacer(),
|
||||||
Checkbox.adaptive(
|
GetBuilder<PaymentController>(
|
||||||
value: false,
|
builder: (controller) => Checkbox.adaptive(
|
||||||
onChanged: (value) {},
|
value: controller.isCashCheced,
|
||||||
)
|
onChanged: (value) {
|
||||||
|
controller
|
||||||
|
.onChangedPymentethodCash(value);
|
||||||
|
},
|
||||||
|
))
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
const Divider(
|
const Divider(
|
||||||
@@ -112,12 +127,16 @@ class CashConfirmPageShown extends StatelessWidget {
|
|||||||
height: 2,
|
height: 2,
|
||||||
indent: 1,
|
indent: 1,
|
||||||
),
|
),
|
||||||
MyElevatedButton(
|
controller.cardNumber == null ||
|
||||||
title: 'Add Payment Method'.tr,
|
controller.cardNumber!.isEmpty
|
||||||
onPressed: () {
|
? MyElevatedButton(
|
||||||
controller.changePaymentMethodPageShown();
|
title: 'Add Payment Method'.tr,
|
||||||
CreditCardController().openPayment();
|
onPressed: () {
|
||||||
})
|
controller.changePaymentMethodPageShown();
|
||||||
|
CreditCardController().openPayment();
|
||||||
|
},
|
||||||
|
)
|
||||||
|
: const SizedBox()
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ import 'package:ride/views/widgets/elevated_btn.dart';
|
|||||||
|
|
||||||
import '../../../constant/colors.dart';
|
import '../../../constant/colors.dart';
|
||||||
import '../../../constant/style.dart';
|
import '../../../constant/style.dart';
|
||||||
|
import '../../../controller/functions/toast.dart';
|
||||||
import '../../../controller/home/map_page_controller.dart';
|
import '../../../controller/home/map_page_controller.dart';
|
||||||
import '../../../main.dart';
|
import '../../../main.dart';
|
||||||
|
|
||||||
@@ -61,10 +62,10 @@ GetBuilder<MapController> formSearchPlaces() {
|
|||||||
middleText: '',
|
middleText: '',
|
||||||
confirm: MyElevatedButton(
|
confirm: MyElevatedButton(
|
||||||
title: 'Confirm'.tr,
|
title: 'Confirm'.tr,
|
||||||
onPressed: () {
|
onPressed: () async {
|
||||||
controller.clearpolyline();
|
controller.clearpolyline();
|
||||||
controller.data = [];
|
controller.data = [];
|
||||||
controller.getMap(
|
await controller.getMap(
|
||||||
'${controller.mylocation.latitude.toString()},${controller.mylocation.longitude.toString()}',
|
'${controller.mylocation.latitude.toString()},${controller.mylocation.longitude.toString()}',
|
||||||
"${res['geometry']['location']['lat']},${res['geometry']['location']['lng']}");
|
"${res['geometry']['location']['lat']},${res['geometry']['location']['lng']}");
|
||||||
controller.places = [];
|
controller.places = [];
|
||||||
@@ -100,6 +101,10 @@ GetBuilder<MapController> formSearchPlaces() {
|
|||||||
'name': res['name'].toString(),
|
'name': res['name'].toString(),
|
||||||
'rate': res['rating'].toString(),
|
'rate': res['rating'].toString(),
|
||||||
}, TableName.placesFavorite);
|
}, TableName.placesFavorite);
|
||||||
|
Toast.show(
|
||||||
|
context,
|
||||||
|
'${res['name']} ${'Saved Sucssefully'.tr}',
|
||||||
|
AppColor.primaryColor);
|
||||||
},
|
},
|
||||||
icon: const Icon(Icons.favorite_border),
|
icon: const Icon(Icons.favorite_border),
|
||||||
),
|
),
|
||||||
|
|||||||
@@ -10,6 +10,7 @@ import 'package:ride/views/widgets/elevated_btn.dart';
|
|||||||
|
|
||||||
import '../../../constant/colors.dart';
|
import '../../../constant/colors.dart';
|
||||||
import '../../../constant/table_names.dart';
|
import '../../../constant/table_names.dart';
|
||||||
|
import '../../../controller/functions/toast.dart';
|
||||||
|
|
||||||
class MainBottomMenuMap extends StatelessWidget {
|
class MainBottomMenuMap extends StatelessWidget {
|
||||||
const MainBottomMenuMap({super.key});
|
const MainBottomMenuMap({super.key});
|
||||||
@@ -74,12 +75,12 @@ class MainBottomMenuMap extends StatelessWidget {
|
|||||||
animatedTexts: [
|
animatedTexts: [
|
||||||
ScaleAnimatedText(
|
ScaleAnimatedText(
|
||||||
'${'Where to'.tr} ${box.read(BoxName.name)}'),
|
'${'Where to'.tr} ${box.read(BoxName.name)}'),
|
||||||
// WavyAnimatedText(
|
WavyAnimatedText(
|
||||||
// '${'Where to'.tr} ${box.read(BoxName.name)}'),
|
'${'Where to'.tr} ${box.read(BoxName.name)}'),
|
||||||
// FlickerAnimatedText(
|
FlickerAnimatedText(
|
||||||
// '${'Where to'.tr} ${box.read(BoxName.name)}'),
|
'${'Where to'.tr} ${box.read(BoxName.name)}'),
|
||||||
// WavyAnimatedText(
|
WavyAnimatedText(
|
||||||
// '${'Where to'.tr} ${box.read(BoxName.name)}'),
|
'${'Where to'.tr} ${box.read(BoxName.name)}'),
|
||||||
],
|
],
|
||||||
isRepeatingAnimation: true,
|
isRepeatingAnimation: true,
|
||||||
onTap: () {
|
onTap: () {
|
||||||
@@ -87,9 +88,11 @@ class MainBottomMenuMap extends StatelessWidget {
|
|||||||
},
|
},
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
Text('Nearst Car for you about '.tr +
|
Text('Nearest Car for you about '.tr +
|
||||||
controller.nearestCar!.duration
|
(controller.nearestCar != null
|
||||||
.toString())
|
? controller.nearestCar!.duration
|
||||||
|
.toString()
|
||||||
|
: 'N/A'))
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
@@ -193,10 +196,15 @@ class FavioratePlacesDialogu extends StatelessWidget {
|
|||||||
TableName.placesFavorite,
|
TableName.placesFavorite,
|
||||||
favoritePlaces[index]['id']);
|
favoritePlaces[index]['id']);
|
||||||
Get.back();
|
Get.back();
|
||||||
Get.snackbar('Deleted'.tr,
|
// ignore: use_build_context_synchronously
|
||||||
|
Toast.show(
|
||||||
|
context,
|
||||||
'${'You are Delete'.tr} ${favoritePlaces[index]['name']} from your list',
|
'${'You are Delete'.tr} ${favoritePlaces[index]['name']} from your list',
|
||||||
backgroundColor:
|
AppColor.redColor);
|
||||||
AppColor.accentColor);
|
// Get.snackbar('Deleted'.tr,
|
||||||
|
// '${'You are Delete'.tr} ${favoritePlaces[index]['name']} from your list',
|
||||||
|
// backgroundColor:
|
||||||
|
// AppColor.accentColor);
|
||||||
},
|
},
|
||||||
icon:
|
icon:
|
||||||
const Icon(Icons.favorite_outlined),
|
const Icon(Icons.favorite_outlined),
|
||||||
|
|||||||
@@ -85,18 +85,24 @@ class PaymentMethodPage extends StatelessWidget {
|
|||||||
MyElevatedButton(
|
MyElevatedButton(
|
||||||
title: 'Add Credit Card'.tr,
|
title: 'Add Credit Card'.tr,
|
||||||
onPressed: () async {
|
onPressed: () async {
|
||||||
SecureStorage().saveData(
|
if (controller.formKey.currentState!
|
||||||
BoxName.cardNumber,
|
.validate()) {
|
||||||
controller.cardNumberController.text);
|
SecureStorage().saveData(
|
||||||
SecureStorage().saveData(
|
BoxName.cardNumber,
|
||||||
BoxName.cardHolderName,
|
controller
|
||||||
controller
|
.cardNumberController.text);
|
||||||
.cardHolderNameController.text);
|
SecureStorage().saveData(
|
||||||
SecureStorage().saveData(BoxName.cvvCode,
|
BoxName.cardHolderName,
|
||||||
controller.cvvCodeController.text);
|
controller
|
||||||
SecureStorage().saveData(
|
.cardHolderNameController.text);
|
||||||
BoxName.expiryDate,
|
SecureStorage().saveData(
|
||||||
controller.expiryDateController.text);
|
BoxName.cvvCode,
|
||||||
|
controller.cvvCodeController.text);
|
||||||
|
SecureStorage().saveData(
|
||||||
|
BoxName.expiryDate,
|
||||||
|
controller
|
||||||
|
.expiryDateController.text);
|
||||||
|
}
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
|
|||||||
56
pubspec.lock
@@ -230,6 +230,14 @@ packages:
|
|||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "7.0.0+1"
|
version: "7.0.0+1"
|
||||||
|
flutter_paypal:
|
||||||
|
dependency: "direct main"
|
||||||
|
description:
|
||||||
|
name: flutter_paypal
|
||||||
|
sha256: "783d52ca84528b4b7a1213db5195e6946a2d27b2192f4fcd6d0b04b8c37e359e"
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "0.2.0"
|
||||||
flutter_plugin_android_lifecycle:
|
flutter_plugin_android_lifecycle:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
@@ -286,6 +294,14 @@ packages:
|
|||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.0.0"
|
version: "2.0.0"
|
||||||
|
flutter_spinkit:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: flutter_spinkit
|
||||||
|
sha256: b39c753e909d4796906c5696a14daf33639a76e017136c8d82bf3e620ce5bb8e
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "5.2.0"
|
||||||
flutter_test:
|
flutter_test:
|
||||||
dependency: "direct dev"
|
dependency: "direct dev"
|
||||||
description: flutter
|
description: flutter
|
||||||
@@ -488,6 +504,14 @@ packages:
|
|||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "0.13.6"
|
version: "0.13.6"
|
||||||
|
http_auth:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: http_auth
|
||||||
|
sha256: b63ab2b2874970e92b76b7d23c805e74d7c534e8528088da75cf32c18e9abe25
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "1.0.3"
|
||||||
http_parser:
|
http_parser:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
@@ -877,6 +901,38 @@ packages:
|
|||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "0.1.4-beta"
|
version: "0.1.4-beta"
|
||||||
|
webview_flutter:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: webview_flutter
|
||||||
|
sha256: "04a0782fb058b7c71f2048935583488f4d32e9147ca403abc4e58f1de9964629"
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "4.2.3"
|
||||||
|
webview_flutter_android:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: webview_flutter_android
|
||||||
|
sha256: bca797abba472868655b5f1a6029c1132385685ee9db4713cb0e7f33076210c6
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "3.9.3"
|
||||||
|
webview_flutter_platform_interface:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: webview_flutter_platform_interface
|
||||||
|
sha256: "0ca3cfcc6781a7de701d580917af4a9efc4e3e129f8ead95a80587f0a749480a"
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "2.5.0"
|
||||||
|
webview_flutter_wkwebview:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: webview_flutter_wkwebview
|
||||||
|
sha256: ed749f94ac9e814d04a258a9255cf69cfa4cc6006ff59542aea7fb4590144972
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "3.7.3"
|
||||||
win32:
|
win32:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
|
|||||||
@@ -56,6 +56,7 @@ dependencies:
|
|||||||
flutter_secure_storage: ^8.0.0
|
flutter_secure_storage: ^8.0.0
|
||||||
credit_card_scanner: ^1.0.5
|
credit_card_scanner: ^1.0.5
|
||||||
geolocator: ^10.0.0
|
geolocator: ^10.0.0
|
||||||
|
flutter_paypal: ^0.2.0
|
||||||
|
|
||||||
dev_dependencies:
|
dev_dependencies:
|
||||||
flutter_test:
|
flutter_test:
|
||||||
|
|||||||