9/8/1-captin

This commit is contained in:
Hamza-Ayed
2023-09-08 18:25:14 +03:00
parent c2600c5938
commit a626915f45
69 changed files with 1808 additions and 316 deletions

View File

@@ -4,7 +4,7 @@
<uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
<application android:label="SEFER" android:name="${applicationName}" android:icon="@mipmap/ic_launcher">
<application android:label="SEFER" android:name="${applicationName}" android:icon="@mipmap/launcher_icon">
<activity android:name=".MainActivity" android:exported="true" android:launchMode="singleTop" android:theme="@style/LaunchTheme" android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode" android:hardwareAccelerated="true" android:windowSoftInputMode="adjustResize">
<!-- Specifies an Android theme to apply to this Activity as soon as
the Android process has started. This theme is visible to the user

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 945 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 48 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 407 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 792 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 559 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 792 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 958 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.7 KiB

View File

@@ -2,18 +2,27 @@ class BoxName {
static const String driverID = "driverID";
static const String lang = "lang";
static const String passwoerd = "passwoerd";
static const String password = "password";
static const String passwordDriver = "passwordDriver";
static const String agreeTerms = "agreeTerms";
static const String pasengerID = "pasengerID";
static const String phone = "phone";
static const String phoneDriver = "phoneDriver";
static const String name = "name";
static const String nameDriver = "nameDriver";
static const String email = "email";
static const String emailDriver = "emailDriver";
static const String tokens = "tokens";
static const String tokenFCM = "tokenFCM";
static const String tokenDriver = "tokenDriver";
static const String cardNumber = "cardNumber";
static const String cardNumberDriver = "cardNumberDriver";
static const String cardHolderName = "cardHolderName";
static const String cardHolderNameDriver = "cardHolderNameDriver";
static const String expiryDate = "expiryDate";
static const String expiryDateDriver = "expiryDateDriver";
static const String cvvCode = "cvvCode";
static const String cvvCodeDriver = "cvvCodeDriver";
static const String passengerWalletDetails = "passengerWalletDetails";
static const String passengerWalletTotal = "passengerWalletTotal";
static const String passengerWalletFound = "passengerWalletFound";

View File

@@ -6,6 +6,7 @@ class AppLink {
//===============firebase==========================
static const String getTokens = "$server/ride/firebase/get.php";
static const String addTokens = "$server/ride/firebase/add.php";
static const String addTokensDriver = "$server/ride/firebase/addDriver.php";
//=======================Wallet===================
static const String wallet = '$server/ride/passengerWallet/';
@@ -20,6 +21,7 @@ class AppLink {
//=======================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 getPromoBytody = "$promo/getPromoBytody.php";
static const String addPassengersPromo = "$promo/add.php";
static const String deletePassengersPromo = "$promo/delete.php";
static const String updatePassengersPromo = "$promo/update.php";
@@ -59,9 +61,16 @@ class AppLink {
static const String updateprofile = "$profile/update.php";
//===================Auth============
static const String auth = 'https://ride.mobile-app.store/auth';
static const String login = "$auth/login.php";
static const String signUp = "$auth/signup.php";
static const String sendVerifyEmail = "$auth/sendVerifyEmail.php";
static const String verifyEmail = "$auth/verifyEmail.php";
//===================Auth Captin============
static const String authCaptin = 'https://ride.mobile-app.store/auth/captin';
static const String loginCaptin = "$authCaptin/login.php";
static const String signUpCaptin = "$authCaptin/register.php";
static const String sendVerifyEmailCaptin = "$authCaptin/sendVerifyEmail.php";
static const String verifyEmailCaptin = "$authCaptin/verifyEmail.php";
}

View File

@@ -0,0 +1,112 @@
import 'dart:convert';
import 'dart:math';
import 'package:flutter/material.dart';
import 'package:flutter_secure_storage/flutter_secure_storage.dart';
import 'package:get/get.dart';
import 'package:ride/constant/box_name.dart';
import 'package:ride/constant/links.dart';
import 'package:ride/controller/functions/crud.dart';
import 'package:ride/controller/functions/secure_storage.dart';
import 'package:ride/main.dart';
import 'package:ride/views/auth/verify_email_page.dart';
import 'package:ride/views/home/map_page.dart';
class LoginCaptinController extends GetxController {
final formKey = GlobalKey<FormState>();
TextEditingController emailController = TextEditingController();
TextEditingController phoneController = TextEditingController();
TextEditingController passwordController = TextEditingController();
bool isAgreeTerms = false;
bool isloading = false;
final FlutterSecureStorage _storage = const FlutterSecureStorage();
void changeAgreeTerm() {
isAgreeTerms = !isAgreeTerms;
print(isAgreeTerms);
update();
}
void saveAgreementTerms() {
box.write(BoxName.agreeTerms, 'agreed');
update();
}
void login() async {
isloading = true;
update();
var res = await CRUD().get(link: AppLink.loginCaptin, payload: {
'email': emailController.text,
'phone': phoneController.text,
'password': passwordController.text
});
print(res);
if (res == 'Failure') {
isloading = false;
update();
Get.snackbar('Failure', '', backgroundColor: Colors.red);
} else {
var jsonDecoeded = jsonDecode(res);
// print(jsonDecoeded);
if (jsonDecoeded.isNotEmpty) {
if (jsonDecoeded['status'] == 'success') {
print(jsonDecoeded['data'][0]['verified']);
if (jsonDecoeded['data'][0]['verified'] == 1) {
box.write(BoxName.driverID, jsonDecoeded['data'][0]['id']);
box.write(BoxName.emailDriver, jsonDecoeded['data'][0]['email']);
box.write(
BoxName.nameDriver, jsonDecoeded['data'][0]['first_name']);
box.write(BoxName.phoneDriver, jsonDecoeded['data'][0]['phone']);
SecureStorage()
.saveData(BoxName.passwordDriver, passwordController.text);
Get.offAll(() => const MapPage());
isloading = false;
update();
print(box.read(BoxName.driverID).toString());
print(box.read(BoxName.tokenDriver));
await CRUD().post(link: AppLink.addTokensDriver, payload: {
'token': box.read(BoxName.tokenDriver),
'captain_id': box.read(BoxName.driverID).toString()
}).then((value) => print('cccc'));
} else {
isloading = false;
update();
Get.defaultDialog(
title: 'You must Verify email !.'.tr,
middleText: '',
backgroundColor: Colors.yellow[300],
onConfirm: () async {
int randomNumber = Random().nextInt(100000) + 1;
await CRUD().post(link: AppLink.sendVerifyEmail, payload: {
'email': emailController.text,
'token': randomNumber.toString(),
}).then((value) => print(value));
Get.to(() => const VerifyEmailPage());
},
);
}
} else if (jsonDecoeded['status'] == 'Failure') {
Get.snackbar(jsonDecoeded['status'], jsonDecoeded['data'],
backgroundColor: Colors.redAccent);
isloading = false;
update();
}
} else {
print('res is null');
isloading = false;
update();
}
}
}
// goToMapPage() {
// if (box.read(BoxName.email) != null) {
// Get.offAll(() => const MapPage());
// }
// }
@override
void onInit() {
super.onInit();
}
}

View File

@@ -12,8 +12,6 @@ import 'package:ride/main.dart';
import 'package:ride/views/auth/verify_email_page.dart';
import 'package:ride/views/home/map_page.dart';
import '../firebase/firbase_messge.dart';
class LoginController extends GetxController {
final formKey = GlobalKey<FormState>();
TextEditingController emailController = TextEditingController();
@@ -57,8 +55,7 @@ class LoginController extends GetxController {
box.write(BoxName.email, jsonDecoeded['data'][0]['email']);
box.write(BoxName.name, jsonDecoeded['data'][0]['first_name']);
box.write(BoxName.phone, jsonDecoeded['data'][0]['phone']);
SecureStorage()
.saveData(BoxName.passwoerd, passwordController.text);
SecureStorage().saveData(BoxName.password, passwordController.text);
Get.offAll(() => MapPage());
isloading = false;
update();

View File

@@ -9,12 +9,14 @@ import 'package:ride/constant/style.dart';
import 'package:ride/controller/functions/crud.dart';
import 'package:ride/controller/functions/launch.dart';
import 'package:ride/controller/functions/toast.dart';
import 'package:ride/views/home/profile/promos_passenger_page.dart';
import 'package:ride/views/widgets/elevated_btn.dart';
import '../../constant/box_name.dart';
import '../../constant/credential.dart';
import '../../constant/links.dart';
import '../../main.dart';
import '../../views/orderCaptin/order_request_page.dart';
class FirebasMessagesController extends GetxController {
final fcmToken = FirebaseMessaging.instance;
@@ -92,15 +94,127 @@ class FirebasMessagesController extends GetxController {
Future getToken() async {
fcmToken.getToken().then((token) {
box.write(BoxName.tokenFCM, token);
box.write(BoxName.tokenDriver, token);
print(token);
});
FirebaseMessaging.onMessage.listen((RemoteMessage message) {
if (message.data.isNotEmpty) {
if (message.notification!.title!.contains('Order')) {
var myListString = message.data['myList'];
var myList = jsonDecode(myListString) as List<dynamic>;
Get.to(() => const OrderRequestPage(), arguments: {
'myListString': myListString,
'myList': myList,
'body': message.notification!.body
});
// Get.defaultDialog(
// barrierDismissible: false,
// title: message.notification!.title.toString(),
// content: Column(
// crossAxisAlignment: CrossAxisAlignment.start,
// children: [
// // Text(message.notification!.body.toString()),
// Padding(
// padding: const EdgeInsets.all(8.0),
// child: TextButton.icon(
// onPressed: () {
// String mapUrl =
// 'https://www.google.com/maps/dir/${myList[0]}/${myList[1]}/';
// print(mapUrl);
// launchUrl1(mapUrl);
// },
// icon: const Icon(Icons.map),
// label: Text('Rouats of Trip'.tr)),
// ),
// Padding(
// padding: const EdgeInsets.all(8.0),
// child: Text(
// 'Tatal From Passenger is '.tr +
// double.parse(myList[2]).toStringAsFixed(2),
// style: AppStyle.title,
// ),
// ),
// Padding(
// padding: const EdgeInsets.all(8.0),
// child: Text(
// 'Tatal For You is '.tr +
// double.parse(myList[3]).toStringAsFixed(2),
// style: AppStyle.title,
// ),
// ),
// Padding(
// padding: const EdgeInsets.all(8.0),
// child: Text(
// 'Distance is '.tr + myList[5].toString() + ' KM'.tr,
// style: AppStyle.title,
// ),
// ),
// Padding(
// padding: const EdgeInsets.all(8.0),
// child: Text(
// 'Duration of Trip is '.tr +
// myList[4].toString() +
// ' Minutes'.tr,
// style: AppStyle.title,
// ),
// ),
// Padding(
// padding: const EdgeInsets.all(8.0),
// child: Row(
// mainAxisAlignment: MainAxisAlignment.spaceBetween,
// children: [
// MyElevatedButton(
// title: 'Apply Order'.tr,
// onPressed: () async {
// await CRUD().postFromDialogue(
// link: AppLink.addDriverOrder,
// payload: {
// 'driver_id': myList[6].toString(),
// // box.read(BoxName.driverID).toString(),
// 'order_id':
// message.notification!.body.toString(),
// 'status': 'Apply'
// });
// },
// ),
// MyElevatedButton(
// title: 'Refuse Order'.tr,
// onPressed: () async {
// await CRUD().postFromDialogue(
// link: AppLink.addDriverOrder,
// payload: {
// 'driver_id': myList[6].toString(),
// // box.read(BoxName.driverID).toString(),
// 'order_id':
// message.notification!.body.toString(),
// 'status': 'Refused'
// });
// },
// kolor: AppColor.redColor,
// ),
// ],
// ),
// )
// ],
// ));
} else if (message.notification!.title!.contains('Promo')) {
Get.to(const PromosPassengerPage());
}
}
});
FirebaseMessaging.onMessageOpenedApp.listen((RemoteMessage message) {
print(
'onMessageOpenedApp: ${message.notification!.title} ${message.notification!.body}');
RemoteNotification? notification = message.notification;
if (message.data.isNotEmpty) {
if (message.notification!.title!.contains('Order')) {
var myListString = message.data['myList'];
var myList = jsonDecode(myListString) as List<dynamic>;
Get.defaultDialog(
barrierDismissible: true,
title: message.notification!.title.toString(),
content: Column(
crossAxisAlignment: CrossAxisAlignment.start,
@@ -111,7 +225,7 @@ class FirebasMessagesController extends GetxController {
child: TextButton.icon(
onPressed: () {
String mapUrl =
'https://www.google.com/maps/dir/${myList[0]}/${myList[0]}/';
'https://www.google.com/maps/dir/${myList[0]}/${myList[1]}/';
print(mapUrl);
launchUrl1(mapUrl);
},
@@ -191,19 +305,7 @@ class FirebasMessagesController extends GetxController {
],
));
} else if (message.notification!.title!.contains('Promo')) {
// Get.to(page)
}
}
});
FirebaseMessaging.onMessageOpenedApp.listen((RemoteMessage message) {
print(
'onMessageOpenedApp: ${message.notification!.title} ${message.notification!.body}');
RemoteNotification? notification = message.notification;
if (notification != null) {
print('onMessageOpenedApp: ${notification.title} ${notification.body}');
if (message.notification!.title!.contains('SEFER')) {
Get.snackbar('SEFER', 'message', backgroundColor: AppColor.redColor);
Get.to(const PromosPassengerPage());
}
}
});
@@ -306,8 +408,8 @@ class FirebasMessagesController extends GetxController {
// });
// }
void sendNotificationDriverId(String title, body, Strin1, Strin2, Strin3,
Strin4, Strin5, Strin6, String7, token) async {
void sendNotificationDriverId(String title, body, strin1, strin2, strin3,
strin4, strin5, strin6, string7, string8, token) async {
http
.post(Uri.parse('https://fcm.googleapis.com/fcm/send'),
headers: <String, String>{
@@ -321,8 +423,16 @@ class FirebasMessagesController extends GetxController {
'sound': 'true'
},
'data': {
'myList': jsonEncode(
[Strin1, Strin2, Strin3, Strin4, Strin5, Strin6, String7]),
'myList': jsonEncode([
strin1,
strin2,
strin3,
strin4,
strin5,
strin6,
string7,
string8
]),
},
'priority': 'high',
'to': token,

View File

@@ -0,0 +1,84 @@
import 'dart:async';
import 'package:get/get.dart';
import 'package:google_maps_flutter/google_maps_flutter.dart';
import 'package:location/location.dart';
import 'package:ride/constant/box_name.dart';
import 'package:ride/constant/links.dart';
import 'package:ride/controller/functions/crud.dart';
import 'package:ride/main.dart';
class LocationController extends GetxController {
LocationData? _currentLocation;
late Location location;
bool isloading = false;
LatLng mylocation = const LatLng(32.3, 36.3);
LocationData? get currentLocation => _currentLocation;
Timer? _locationTimer;
@override
void onInit() {
super.onInit();
location = Location();
getLocation();
startLocationUpdates();
}
void startLocationUpdates() async {
// Start the timer to get location every 20 seconds
_locationTimer = Timer.periodic(const Duration(seconds: 20), (timer) async {
await getLocation();
await CRUD().post(link: AppLink.addCarsLocationByPassenger, payload: {
'driver_id': box.read(BoxName.driverID).toString(),
'latitude': mylocation!.latitude.toString(),
'longitude': mylocation!.longitude.toString(),
});
});
}
Future<void> getLocation() async {
isloading = true;
update();
bool serviceEnabled;
PermissionStatus permissionGranted;
// Check if location services are enabled
serviceEnabled = await location.serviceEnabled();
if (!serviceEnabled) {
serviceEnabled = await location.requestService();
if (!serviceEnabled) {
// Location services are still not enabled, handle the error
return;
}
}
// Check if the app has permission to access location
permissionGranted = await location.hasPermission();
if (permissionGranted == PermissionStatus.denied) {
permissionGranted = await location.requestPermission();
if (permissionGranted != PermissionStatus.granted) {
// Location permission is still not granted, handle the error
return;
}
}
// Configure location accuracy
// LocationAccuracy desiredAccuracy = LocationAccuracy.high;
// Get the current location
LocationData _locationData = await location.getLocation();
mylocation =
(_locationData.latitude != null && _locationData.longitude != null
? LatLng(_locationData.latitude!, _locationData.longitude!)
: null)!;
// Print location details
print('Accuracy: ${_locationData.accuracy}');
print('Latitude: ${_locationData.latitude}');
print('Longitude: ${_locationData.longitude}');
print('Time: ${_locationData.time}');
isloading = false;
update();
}
}

View File

@@ -130,10 +130,11 @@ class MapController extends GetxController {
print('rideConfirm= $rideConfirm');
await CRUD().post(link: AppLink.addRides, payload: {
"start_location":
'${data[0]["start_location"]['lat']},${data[0]["start_location"]['lng']}',
"end_location":
'${data[0]["end_location"]['lat']},${data[0]["end_location"]['lng']}',
"start_location": '${data[0]['start_address']}',
// '${data[0]["start_location"]['lat']},${data[0]["start_location"]['lng']}',
"end_location": '${data[0]['end_address']}',
// '${data[0]["end_location"]['lat']},${data[0]["end_location"]['lng']}',
"date": DateTime.now().toString(),
"time": DateTime.now().toString(),
"endtime": durationToAdd.toString(),
@@ -147,13 +148,16 @@ class MapController extends GetxController {
}).then((value) {
// print(jsonDecode(value)['message']);
List<String> body = [
// '${data[0]['start_address']}',
// '${data[0]['end_address']}',
'${data[0]["start_location"]['lat']},${data[0]["start_location"]['lng']}',
'${data[0]["end_location"]['lat']},${data[0]["end_location"]['lng']}',
totalPassenger.toString(),
totalDriver.toString(),
duration.toString(),
distance.toString(),
dataCarsLocationByPassenger['message'][0]['id'].toString()
dataCarsLocationByPassenger['message'][0]['id'].toString(),
box.read(BoxName.pasengerID).toString()
];
FirebasMessagesController().sendNotificationDriverId(
'Order',
@@ -165,7 +169,7 @@ class MapController extends GetxController {
body[4],
body[5],
body[6],
body[7],
box.read(BoxName.tokenFCM).toString(), //TODO change to Driver
);
});
@@ -307,7 +311,7 @@ class MapController extends GetxController {
}
// Configure location accuracy
// LocationAccuracy desiredAccuracy = LocationAccuracy.high;
LocationAccuracy desiredAccuracy = LocationAccuracy.high;
// Get the current location
LocationData _locationData = await location.getLocation();
@@ -808,8 +812,8 @@ class MapController extends GetxController {
@override
void onInit() async {
await getLocation();
// await getCarsLocationByPassenger();
// getNearestDriverByPassengerLocation();
await getCarsLocationByPassenger();
getNearestDriverByPassengerLocation();
addCustomPicker();
addCustomCarIcon();
startMarkerReloading();
@@ -819,7 +823,7 @@ class MapController extends GetxController {
}
class CarLocation {
final int id;
final String id;
final double latitude;
final double longitude;
final double distance;

View File

@@ -28,7 +28,7 @@ class OrderHistoryController extends GetxController {
var jsonDecoded = jsonDecode(res);
orderHistoryListPassenger = jsonDecoded['data'];
print(orderHistoryListPassenger);
// print(orderHistoryListPassenger);
isloading = false;
update();
}

View File

@@ -0,0 +1,32 @@
import 'dart:convert';
import 'package:get/get.dart';
import 'package:ride/constant/links.dart';
import 'package:ride/controller/functions/crud.dart';
class PromosController extends GetxController {
List<dynamic> promoList = [];
bool isloading = true;
@override
void onInit() {
getPromoBytody();
super.onInit();
}
Future getPromoBytody() async {
var res = await CRUD().get(link: AppLink.getPromoBytody, payload: {});
if (res.toString() == 'failure') {
Get.snackbar('failure', 'message');
isloading = false;
update();
} else {
var jsonDecoded = jsonDecode(res);
promoList = jsonDecoded['message'];
print(promoList);
isloading = false;
update();
}
}
}

View File

@@ -14,26 +14,33 @@ class PaymentController extends GetxController {
bool isWalletCheced = true;
bool isCashCheced = false;
bool isWalletFound = false;
bool isPromoSheetDialogue = false;
final formKey = GlobalKey<FormState>();
final promo = TextEditingController();
double totalPassenger = MapController().totalPassenger;
int? selectedAmount;
List<dynamic> totalPassengerWalletDetails = [];
String passengerTotalWalletAmount = '';
void updateSelectedAmount(int value) {
selectedAmount = value;
update();
}
void changePromoSheetDialogue() {
isPromoSheetDialogue = !isPromoSheetDialogue;
update();
}
getPassengerWallet() async {
isloading = true;
update();
// box.write(BoxName.passengerWalletFound, isWalletFound);
// totalPassengerWalletDetails = box.read(BoxName.passengerWalletDetails);
// if (box.read(BoxName.passengerWalletTotal).toString().isEmpty) {
await CRUD().get(
link: AppLink.getWalletByPassenger,
payload: {'passenger_id': box.read(BoxName.pasengerID)}).then((value) {
box.write(BoxName.passengerWalletTotal,
jsonDecode(value)['message'][0]['total'].toString());
});
// }
isloading = false;
update();

View File

@@ -5,12 +5,15 @@ import 'package:firebase_messaging/firebase_messaging.dart';
import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:get_storage/get_storage.dart';
import 'package:ride/views/auth/captin/login_captin.dart';
import 'package:ride/views/auth/login_page.dart';
import 'package:ride/views/home/Captin/home_captin.dart';
import 'package:ride/views/lang/languages.dart';
import 'constant/box_name.dart';
import 'controller/firebase/firbase_messge.dart';
import 'controller/functions/location_permission.dart';
import 'controller/functions/locaton_controller.dart';
import 'controller/local/local_controller.dart';
import 'controller/local/translations.dart';
import 'firebase_options.dart';
@@ -24,7 +27,7 @@ Future<void> backgroundMessageHandler(RemoteMessage message) async {
await Firebase.initializeApp();
print('===========back===${message.notification?.title}');
if (message.notification!.title == 'ride') {
if (message.notification!.title == 'Sefer') {
// SendGpsNow().getSiteNotification();
}
}
@@ -44,7 +47,9 @@ void main() async {
await FirebasMessagesController().getTokens();
LocationPermissions().locationPermissions();
FirebaseMessaging.onBackgroundMessage(backgroundMessageHandler);
// if (box.read(BoxName.driverID) != null) {
// LocationController().startLocationUpdates();
// }
runApp(const MyApp());
}
@@ -68,8 +73,10 @@ class MyApp extends StatelessWidget {
home: box.read(BoxName.lang).toString() != 'ar' &&
box.read(BoxName.lang).toString() != 'en'
? const Language()
: box.read(BoxName.email) == null
? LoginPage()
: const MapPage());
: box.read(BoxName.email) != null
? const MapPage()
: box.read(BoxName.emailDriver) == null
? LoginCaptin()
: const HomeCaptin());
}
}

View File

View File

@@ -0,0 +1,259 @@
import 'package:animated_text_kit/animated_text_kit.dart';
import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:ride/constant/box_name.dart';
import 'package:ride/constant/colors.dart';
import 'package:ride/constant/style.dart';
import 'package:ride/controller/auth/captin/login_captin_controller.dart';
import 'package:ride/main.dart';
import 'package:ride/views/widgets/elevated_btn.dart';
import 'package:ride/views/widgets/my_scafold.dart';
import '../../../controller/auth/login_controller.dart';
import '../../widgets/mycircular.dart';
import '../register_page.dart';
class LoginCaptin extends StatelessWidget {
final controller = Get.put(LoginController());
LoginCaptin({super.key});
@override
Widget build(BuildContext context) {
Get.put(LoginCaptinController());
return GetBuilder<LoginCaptinController>(
builder: (controller) => MyScafolld(
title: 'Login Captin'.tr,
isleading: true,
body: [
if (box.read(BoxName.agreeTerms) != 'agreed')
agreedPage()
else
SingleChildScrollView(
child: Column(
children: [
Padding(
padding: const EdgeInsets.all(25),
child: Container(
decoration: const BoxDecoration(
boxShadow: [
BoxShadow(
offset: Offset(3, 3),
color: AppColor.accentColor,
blurRadius: 3)
],
color: AppColor.secondaryColor,
),
child: Form(
key: controller.formKey,
child: Padding(
padding: const EdgeInsets.all(16.0),
child: SingleChildScrollView(
child: Column(
children: [
TextFormField(
keyboardType: TextInputType.emailAddress,
controller: controller.emailController,
decoration: InputDecoration(
focusedBorder: OutlineInputBorder(
borderSide: const BorderSide(
color: AppColor.primaryColor,
width: 2.0,
),
borderRadius: BorderRadius.circular(10),
),
fillColor: AppColor.accentColor,
hoverColor: AppColor.accentColor,
focusColor: AppColor.accentColor,
border: const OutlineInputBorder(
borderRadius: BorderRadius.all(
Radius.circular(12))),
labelText: 'Email'.tr,
hintText: 'Enter your email address'.tr,
),
validator: (value) {
if (value!.isEmpty ||
(!value.contains('@') ||
!value.contains('.'))) {
return 'Please enter Your Email.'.tr;
}
return null;
},
),
const SizedBox(
height: 30,
),
TextFormField(
keyboardType: TextInputType.phone,
cursorColor: AppColor.accentColor,
controller: controller.phoneController,
decoration: InputDecoration(
focusedBorder: OutlineInputBorder(
borderSide: const BorderSide(
color: AppColor.primaryColor,
width: 2.0,
),
borderRadius: BorderRadius.circular(10),
),
focusColor: AppColor.accentColor,
fillColor: AppColor.accentColor,
border: const OutlineInputBorder(
borderRadius: BorderRadius.all(
Radius.circular(12))),
labelText: 'Phone'.tr,
hintText: 'Enter your phone number'.tr,
),
validator: (value) {
if (value!.isEmpty ||
value.length != 10) {
return 'Please enter your phone number.'
.tr;
}
return null;
},
),
const SizedBox(
height: 15,
),
TextFormField(
obscureText: true,
keyboardType: TextInputType.emailAddress,
controller: controller.passwordController,
decoration: InputDecoration(
focusedBorder: OutlineInputBorder(
borderSide: const BorderSide(
color: AppColor.primaryColor,
width: 2.0,
),
borderRadius: BorderRadius.circular(10),
),
fillColor: AppColor.accentColor,
hoverColor: AppColor.accentColor,
focusColor: AppColor.accentColor,
border: const OutlineInputBorder(
borderRadius: BorderRadius.all(
Radius.circular(12))),
labelText: 'Password'.tr,
hintText:
'Please enter your phone number.'.tr,
),
validator: (value) {
if (value!.isEmpty ||
(value.length > 6)) {
return 'Please enter Your Password.'.tr;
}
return null;
},
),
GetBuilder<LoginCaptinController>(
builder: (controller) => controller
.isloading
? const MyCircularProgressIndicator()
: MyElevatedButton(
onPressed: () {
if (controller
.formKey.currentState!
.validate()) {
controller.login();
}
},
title: 'Submit'.tr,
),
)
],
),
),
),
),
)),
Text(
'if you dont have account'.tr,
style: AppStyle.subtitle,
),
AnimatedTextKit(
onTap: () => Get.to(() => const RegisterPage()),
animatedTexts: [
TypewriterAnimatedText(
'Register'.tr,
textStyle: AppStyle.headtitle2,
speed: const Duration(milliseconds: 200),
),
],
totalRepeatCount: 4,
pause: const Duration(milliseconds: 200),
displayFullTextOnTap: true,
stopPauseOnTap: true,
),
],
),
)
],
),
);
}
Padding agreedPage() {
return Padding(
padding: const EdgeInsets.all(16),
child: Column(
children: [
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Image.asset(
'assets/images/notepad.png',
width: Get.width * .2,
),
SizedBox(
width: Get.width * .7,
child: Text(
'Accept Ride\'s Terms & Review Privacy Notice'.tr,
style: AppStyle.headtitle2,
),
),
],
),
const SizedBox(
height: 30,
),
Text(
'By selecting "I Agree" below, I have reviewed and agree to the Terms of Use and acknowledge the Privacy Notice. I am at least 18 years of age.'
.tr,
style: AppStyle.title,
),
const SizedBox(
height: 100,
),
GetBuilder<LoginController>(
builder: (controller) => Column(
children: [
Row(
children: [
Checkbox.adaptive(
autofocus: true,
tristate: true,
splashRadius: 25,
activeColor: AppColor.primaryColor,
value: controller.isAgreeTerms,
onChanged: (value) => controller.changeAgreeTerm(),
),
Text(
'I Agree'.tr,
style: controller.isAgreeTerms
? AppStyle.title
: AppStyle.title
.copyWith(color: AppColor.accentColor),
),
],
),
MyElevatedButton(
title: 'Submit'.tr,
onPressed: () => controller.saveAgreementTerms())
],
),
)
],
),
);
}
}

View File

@@ -0,0 +1,16 @@
import 'package:flutter/material.dart';
import 'package:get/get.dart';
class RegisterCaptin extends StatelessWidget {
const RegisterCaptin({super.key});
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text('Register Captin'.tr),
),
body: Container(),
);
}
}

View File

View File

@@ -5,6 +5,7 @@ import 'package:ride/constant/box_name.dart';
import 'package:ride/constant/colors.dart';
import 'package:ride/constant/style.dart';
import 'package:ride/main.dart';
import 'package:ride/views/auth/captin/login_captin.dart';
import 'package:ride/views/widgets/elevated_btn.dart';
import 'package:ride/views/widgets/my_scafold.dart';
@@ -21,184 +22,184 @@ class LoginPage extends StatelessWidget {
Widget build(BuildContext context) {
Get.put(LoginController());
return GetBuilder<LoginController>(
builder: (controller) =>
MyScafolld(title: 'Login'.tr, isleading: false, body: [
if (box.read(BoxName.agreeTerms) != 'agreed')
agreedpage()
else
SingleChildScrollView(
child: Column(
children: [
Padding(
padding: const EdgeInsets.all(25),
child: Container(
decoration: const BoxDecoration(
boxShadow: [
BoxShadow(
offset: Offset(3, 3),
color: AppColor.accentColor,
blurRadius: 3)
],
color: AppColor.secondaryColor,
),
child: Form(
key: controller.formKey,
child: Padding(
padding: const EdgeInsets.all(16.0),
child: SingleChildScrollView(
child: Column(
children: [
TextFormField(
keyboardType:
TextInputType.emailAddress,
controller: controller.emailController,
decoration: InputDecoration(
focusedBorder: OutlineInputBorder(
borderSide: const BorderSide(
color: AppColor.primaryColor,
width: 2.0,
),
borderRadius:
BorderRadius.circular(10),
),
fillColor: AppColor.accentColor,
hoverColor: AppColor.accentColor,
focusColor: AppColor.accentColor,
border: const OutlineInputBorder(
borderRadius: BorderRadius.all(
Radius.circular(12))),
labelText: 'Email'.tr,
hintText:
'Enter your email address'.tr,
builder: (controller) => MyScafolld(
title: 'Login'.tr,
isleading: false,
body: [
if (box.read(BoxName.agreeTerms) != 'agreed')
agreedPage()
else
SingleChildScrollView(
child: Column(
children: [
Padding(
padding: const EdgeInsets.all(25),
child: Container(
decoration: const BoxDecoration(
boxShadow: [
BoxShadow(
offset: Offset(3, 3),
color: AppColor.accentColor,
blurRadius: 3)
],
color: AppColor.secondaryColor,
),
child: Form(
key: controller.formKey,
child: Padding(
padding: const EdgeInsets.all(16.0),
child: SingleChildScrollView(
child: Column(
children: [
TextFormField(
keyboardType: TextInputType.emailAddress,
controller: controller.emailController,
decoration: InputDecoration(
focusedBorder: OutlineInputBorder(
borderSide: const BorderSide(
color: AppColor.primaryColor,
width: 2.0,
),
validator: (value) {
if (value!.isEmpty ||
(!value.contains('@') ||
!value.contains('.'))) {
return 'Please enter Your Email.'
.tr;
}
return null;
},
borderRadius: BorderRadius.circular(10),
),
const SizedBox(
height: 30,
),
TextFormField(
keyboardType: TextInputType.phone,
cursorColor: AppColor.accentColor,
controller: controller.phoneController,
decoration: InputDecoration(
focusedBorder: OutlineInputBorder(
borderSide: const BorderSide(
color: AppColor.primaryColor,
width: 2.0,
),
borderRadius:
BorderRadius.circular(10),
),
focusColor: AppColor.accentColor,
fillColor: AppColor.accentColor,
border: const OutlineInputBorder(
borderRadius: BorderRadius.all(
Radius.circular(12))),
labelText: 'Phone'.tr,
hintText:
'Enter your phone number'.tr,
),
validator: (value) {
if (value!.isEmpty ||
value.length != 10) {
return 'Please enter your phone number.'
.tr;
}
return null;
},
),
const SizedBox(
height: 15,
),
TextFormField(
obscureText: true,
keyboardType:
TextInputType.emailAddress,
controller:
controller.passwordController,
decoration: InputDecoration(
focusedBorder: OutlineInputBorder(
borderSide: const BorderSide(
color: AppColor.primaryColor,
width: 2.0,
),
borderRadius:
BorderRadius.circular(10),
),
fillColor: AppColor.accentColor,
hoverColor: AppColor.accentColor,
focusColor: AppColor.accentColor,
border: const OutlineInputBorder(
borderRadius: BorderRadius.all(
Radius.circular(12))),
labelText: 'Password'.tr,
hintText:
'Please enter your phone number.'
.tr,
),
validator: (value) {
if (value!.isEmpty ||
(value.length > 6)) {
return 'Please enter Your Password.'
.tr;
}
return null;
},
),
GetBuilder<LoginController>(
builder: (controller) => controller
.isloading
? const MyCircularProgressIndicator()
: MyElevatedButton(
onPressed: () {
if (controller
.formKey.currentState!
.validate()) {
controller.login();
}
},
title: 'Submit'.tr,
),
)
],
fillColor: AppColor.accentColor,
hoverColor: AppColor.accentColor,
focusColor: AppColor.accentColor,
border: const OutlineInputBorder(
borderRadius: BorderRadius.all(
Radius.circular(12))),
labelText: 'Email'.tr,
hintText: 'Enter your email address'.tr,
),
validator: (value) {
if (value!.isEmpty ||
(!value.contains('@') ||
!value.contains('.'))) {
return 'Please enter Your Email.'.tr;
}
return null;
},
),
),
const SizedBox(
height: 30,
),
TextFormField(
keyboardType: TextInputType.phone,
cursorColor: AppColor.accentColor,
controller: controller.phoneController,
decoration: InputDecoration(
focusedBorder: OutlineInputBorder(
borderSide: const BorderSide(
color: AppColor.primaryColor,
width: 2.0,
),
borderRadius: BorderRadius.circular(10),
),
focusColor: AppColor.accentColor,
fillColor: AppColor.accentColor,
border: const OutlineInputBorder(
borderRadius: BorderRadius.all(
Radius.circular(12))),
labelText: 'Phone'.tr,
hintText: 'Enter your phone number'.tr,
),
validator: (value) {
if (value!.isEmpty ||
value.length != 10) {
return 'Please enter your phone number.'
.tr;
}
return null;
},
),
const SizedBox(
height: 15,
),
TextFormField(
obscureText: true,
keyboardType: TextInputType.emailAddress,
controller: controller.passwordController,
decoration: InputDecoration(
focusedBorder: OutlineInputBorder(
borderSide: const BorderSide(
color: AppColor.primaryColor,
width: 2.0,
),
borderRadius: BorderRadius.circular(10),
),
fillColor: AppColor.accentColor,
hoverColor: AppColor.accentColor,
focusColor: AppColor.accentColor,
border: const OutlineInputBorder(
borderRadius: BorderRadius.all(
Radius.circular(12))),
labelText: 'Password'.tr,
hintText:
'Please enter your phone number.'.tr,
),
validator: (value) {
if (value!.isEmpty ||
(value.length > 6)) {
return 'Please enter Your Password.'.tr;
}
return null;
},
),
GetBuilder<LoginController>(
builder: (controller) => controller
.isloading
? const MyCircularProgressIndicator()
: MyElevatedButton(
onPressed: () {
if (controller
.formKey.currentState!
.validate()) {
controller.login();
}
},
title: 'Submit'.tr,
),
)
],
),
),
)),
Text(
'if you dont have account'.tr,
style: AppStyle.subtitle,
),
AnimatedTextKit(
onTap: () => Get.to(() => const RegisterPage()),
animatedTexts: [
TypewriterAnimatedText(
'Register'.tr,
textStyle: AppStyle.headtitle2,
speed: const Duration(milliseconds: 200),
),
],
totalRepeatCount: 4,
pause: const Duration(milliseconds: 200),
displayFullTextOnTap: true,
stopPauseOnTap: true,
)
],
),
)),
Text(
'if you dont have account'.tr,
style: AppStyle.subtitle,
),
)
]));
AnimatedTextKit(
onTap: () => Get.to(() => const RegisterPage()),
animatedTexts: [
TypewriterAnimatedText(
'Register'.tr,
textStyle: AppStyle.headtitle2,
speed: const Duration(milliseconds: 200),
),
],
totalRepeatCount: 4,
pause: const Duration(milliseconds: 200),
displayFullTextOnTap: true,
stopPauseOnTap: true,
),
GestureDetector(
onTap: () => Get.to(LoginCaptin()),
child: Text(
'If You Want be Captin Click Here.'.tr,
style: AppStyle.headtitle2,
),
)
],
),
)
],
),
);
}
Padding agreedpage() {
Padding agreedPage() {
return Padding(
padding: const EdgeInsets.all(16),
child: Column(

View File

@@ -0,0 +1,44 @@
import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:ride/constant/style.dart';
import 'package:ride/views/widgets/mycircular.dart';
import '../../../controller/functions/locaton_controller.dart';
import '../../widgets/my_scafold.dart';
class HomeCaptin extends StatelessWidget {
const HomeCaptin({super.key});
@override
Widget build(BuildContext context) {
Get.put(LocationController());
return MyScafolld(
title: 'Captin Home'.tr,
action: GetBuilder<LocationController>(
builder: (locationController) => locationController.isloading
? const SizedBox(
height: 2, width: 2, child: CircularProgressIndicator())
: const SizedBox(),
),
body: [
GetBuilder<LocationController>(
builder: (locationController) => Padding(
padding: const EdgeInsets.all(8.0),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Text(
'${locationController.mylocation}',
style: AppStyle.subtitle,
),
Text(
'${DateTime.now()}',
style: AppStyle.subtitle,
)
],
),
))
],
isleading: true);
}
}

View File

@@ -2,7 +2,7 @@ import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:ride/constant/box_name.dart';
import 'package:ride/constant/style.dart';
import 'package:ride/controller/home/payment/payment_controller.dart';
import 'package:ride/controller/home/payment/credit_card_Controller.dart';
import 'package:ride/views/widgets/elevated_btn.dart';
import '../../../constant/colors.dart';
@@ -125,16 +125,16 @@ class CashConfirmPageShown extends StatelessWidget {
height: 2,
indent: 1,
),
controller.cardNumber == null ||
controller.cardNumber!.isEmpty
? MyElevatedButton(
title: 'Add Payment Method'.tr,
onPressed: () {
controller.changePaymentMethodPageShown();
CreditCardController().openPayment();
},
)
: const SizedBox()
// controller.cardNumber == null ||
// controller.cardNumber!.isEmpty
// ? MyElevatedButton(
// title: 'Add Payment Method'.tr,
// onPressed: () {
// controller.changePaymentMethodPageShown();
// CreditCardController().openPayment();
// },
// )
// : const SizedBox()
],
),
),

View File

@@ -5,6 +5,7 @@ import 'package:ride/constant/style.dart';
import 'package:ride/controller/home/profile/order_history_controller.dart';
import 'package:ride/views/home/my_wallet/passenger_wallet.dart';
import 'package:ride/views/home/profile/order_history.dart';
import 'package:ride/views/home/profile/promos_passenger_page.dart';
import '../../../constant/colors.dart';
import '../../../controller/home/map_page_controller.dart';
@@ -181,7 +182,9 @@ class MapMenuWidget extends StatelessWidget {
icon: Icons.feedback,
),
IconMainPageMap(
onTap: () {},
onTap: () {
Get.to(() => const PromosPassengerPage());
},
title: 'Promos',
icon: Icons.monetization_on,
),

View File

@@ -3,7 +3,7 @@ import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:ride/constant/box_name.dart';
import 'package:ride/controller/functions/secure_storage.dart';
import 'package:ride/controller/home/payment/payment_controller.dart';
import 'package:ride/controller/home/payment/credit_card_Controller.dart';
import 'package:ride/views/widgets/elevated_btn.dart';
import '../../../constant/colors.dart';
@@ -126,6 +126,7 @@ class CreditCardWidget extends StatelessWidget {
return GetBuilder<CreditCardController>(
builder: (controller) => Container(
height: Get.height * .3,
width: Get.width * .9,
decoration: const BoxDecoration(
color: AppColor.secondaryColor,
borderRadius: BorderRadius.all(Radius.circular(15)),
@@ -147,6 +148,7 @@ class CreditCardWidget extends StatelessWidget {
child: Padding(
padding: const EdgeInsets.all(8.0),
child: Column(
mainAxisAlignment: MainAxisAlignment.spaceAround,
children: [
SizedBox(
child: Row(

View File

@@ -1,12 +1,19 @@
import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:ride/constant/links.dart';
import 'package:ride/constant/style.dart';
import 'package:ride/controller/functions/crud.dart';
import 'package:ride/controller/payment/payment_controller.dart';
import 'package:ride/views/widgets/my_scafold.dart';
import 'package:flutter_paypal/flutter_paypal.dart';
import '../../../constant/box_name.dart';
import '../../../constant/colors.dart';
import '../../../controller/functions/secure_storage.dart';
import '../../../controller/home/payment/credit_card_Controller.dart';
import '../../../main.dart';
import '../../widgets/elevated_btn.dart';
import '../map_widget.dart/payment_method.page.dart';
class PassengerWallet extends StatelessWidget {
const PassengerWallet({super.key});
@@ -14,6 +21,7 @@ class PassengerWallet extends StatelessWidget {
@override
Widget build(BuildContext context) {
Get.put(PaymentController());
Get.put(CreditCardController());
return MyScafolld(
title: 'My Wallet',
isleading: true,
@@ -21,39 +29,449 @@ class PassengerWallet extends StatelessWidget {
GetBuilder<PaymentController>(
builder: (controller) => Column(
children: [
Row(
mainAxisAlignment: MainAxisAlignment.center,
Column(
children: [
Container(
decoration: const BoxDecoration(
borderRadius: BorderRadius.all(Radius.circular(12)),
color: AppColor.secondaryColor,
boxShadow: [
BoxShadow(
color: AppColor.accentColor,
offset: Offset(-1, -1),
blurRadius: 0,
spreadRadius: 0,
blurStyle: BlurStyle.normal),
BoxShadow(
color: AppColor.accentColor,
offset: Offset(3, 3),
blurRadius: 1,
spreadRadius: 0,
blurStyle: BlurStyle.normal)
]),
child: Padding(
padding: const EdgeInsets.all(10),
child: Text(
'You Have ${box.read(BoxName.passengerWalletTotal).toString()} JD in SEFER Wallet',
style: AppStyle.title,
Column(
children: [
Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Container(
decoration: const BoxDecoration(
borderRadius:
BorderRadius.all(Radius.circular(12)),
color: AppColor.secondaryColor,
boxShadow: [
BoxShadow(
color: AppColor.accentColor,
offset: Offset(-1, -1),
blurRadius: 0,
spreadRadius: 0,
blurStyle: BlurStyle.normal),
BoxShadow(
color: AppColor.accentColor,
offset: Offset(3, 3),
blurRadius: 1,
spreadRadius: 0,
blurStyle: BlurStyle.normal)
]),
child: Padding(
padding: const EdgeInsets.all(10),
child: Text(
'You Have ${box.read(BoxName.passengerWalletTotal).toString()} JD in SEFER Wallet',
style: AppStyle.title,
),
),
),
],
),
),
const SizedBox(
height: 30,
),
const CreditCardWidget(),
const SizedBox(
height: 10,
),
GetBuilder<CreditCardController>(
builder: (reditCardControllerc) => Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
MyElevatedButton(
title: 'Save Credit Card'.tr,
onPressed: () async {
if (controller.formKey.currentState!
.validate()) {
SecureStorage().saveData(
BoxName.cardNumber,
reditCardControllerc
.cardNumberController.text);
SecureStorage().saveData(
BoxName.cardHolderName,
reditCardControllerc
.cardHolderNameController.text);
SecureStorage().saveData(
BoxName.cvvCode,
reditCardControllerc
.cvvCodeController.text);
SecureStorage().saveData(
BoxName.expiryDate,
reditCardControllerc
.expiryDateController.text);
}
},
),
],
)),
// MyElevatedButton(
// title: 'Charge your Wallet',
// onPressed: () {
// Get.defaultDialog(
// title: 'Choose amount you will Charge?'.tr,
// content: Column(
// crossAxisAlignment: CrossAxisAlignment.center,
// children: [
// Row(
// children: [
// Radio(
// value: 10,
// groupValue: controller.selectedAmount,
// onChanged: (value) {
// controller.selectedAmount =
// value as String?;
// },
// ),
// Text('10 and get 4% discount'.tr),
// ],
// ),
// Row(
// children: [
// Radio(
// value: 20,
// groupValue: controller.selectedAmount,
// onChanged: (value) {
// controller.selectedAmount =
// value as String?;
// },
// ),
// Text('20 and get 6% discount'.tr),
// ],
// ),
// Row(
// children: [
// Radio(
// value: 40,
// groupValue: controller.selectedAmount,
// onChanged: (value) {
// controller.selectedAmount =
// value as String?;
// },
// ),
// Text('40 and get 8% discount'.tr),
// ],
// ),
// Row(
// children: [
// Radio(
// value: 100,
// groupValue: controller.selectedAmount,
// onChanged: (value) {
// controller.selectedAmount =
// value as String?;
// },
// ),
// Text('100 and get 11% discount'.tr),
// ],
// ),
// ],
// ));
// },
// )
],
),
],
),
],
),
),
GetBuilder<PaymentController>(
builder: (controller) => controller.isPromoSheetDialogue
? Container(
color: AppColor.accentColor.withOpacity(.91),
)
: const SizedBox()),
GetBuilder<PaymentController>(
builder: (controller) => Positioned(
bottom: Get.height * .3,
left: Get.width * .3,
right: Get.width * .3,
child: MyElevatedButton(
title: 'Show Promos',
onPressed: () {
controller.changePromoSheetDialogue();
},
),
)),
GetBuilder<PaymentController>(
builder: (controller) => Positioned(
top: Get.height * .2,
right: Get.width * .15,
left: Get.width * .15,
bottom: Get.height * .2,
child: controller.isPromoSheetDialogue
? Container(
decoration: const BoxDecoration(
borderRadius: BorderRadius.all(Radius.circular(12)),
color: AppColor.secondaryColor,
boxShadow: [
BoxShadow(
color: AppColor.accentColor,
offset: Offset(-1, -1),
blurRadius: 0,
spreadRadius: 0,
blurStyle: BlurStyle.normal),
BoxShadow(
color: AppColor.accentColor,
offset: Offset(3, 3),
blurRadius: 1,
spreadRadius: 0,
blurStyle: BlurStyle.normal)
]),
child: Padding(
padding: const EdgeInsets.all(6),
child: Column(
crossAxisAlignment: CrossAxisAlignment.center,
children: [
GestureDetector(
onTap: () {
controller.updateSelectedAmount(10);
},
child: Row(
children: [
Radio(
value: 10,
groupValue: controller.selectedAmount,
onChanged: (value) {
controller
.updateSelectedAmount(value as int);
},
),
Text(
'10 and get 4% discount'.tr,
style: AppStyle.title,
),
],
),
),
GestureDetector(
onTap: () {
controller.updateSelectedAmount(20);
},
child: Row(
children: [
Radio(
value: 20,
groupValue: controller.selectedAmount,
onChanged: (value) {
controller
.updateSelectedAmount(value as int);
},
),
Text(
'20 and get 6% discount'.tr,
style: AppStyle.title,
),
],
)),
GestureDetector(
onTap: () {
controller.updateSelectedAmount(40);
},
child: Row(
children: [
Radio(
value: 40,
groupValue: controller.selectedAmount,
onChanged: (value) {
controller
.updateSelectedAmount(value as int);
},
),
Text(
'40 and get 8% discount'.tr,
style: AppStyle.title,
),
],
)),
GestureDetector(
onTap: () {
controller.updateSelectedAmount(100);
},
child: Row(
children: [
Radio(
value: 100,
groupValue: controller.selectedAmount,
onChanged: (value) {
controller
.updateSelectedAmount(value as int);
},
),
Text(
'100 and get 11% discount'.tr,
style: AppStyle.title,
),
],
)),
const Spacer(),
MyElevatedButton(
title: 'Pay with Your PayPal',
onPressed: () {
Navigator.of(context).push(
MaterialPageRoute(
builder: (BuildContext context) =>
UsePaypal(
sandboxMode: true,
clientId:
"AW1TdvpSGbIM5iP4HJNI5TyTmwpY9Gv9dYw8_8yW5lYIbCqf326vrkrp0ce9TAqjEGMHiV3OqJM_aRT0",
secretKey:
"EHHtTDjnmTZATYBPiGzZC_AZUfMpMAzj2VZUeqlFUrRJA_C0pQNCxDccB5qoRQSEdcOnnKQhycuOWdP9",
returnURL:
"https://samplesite.com/return",
cancelURL:
"https://samplesite.com/cancel",
transactions: [
{
"amount": {
//sb-opsju26682403@personal.example.com
"total":
'${controller.selectedAmount}',
"currency": "USD",
"details": {
"subtotal":
'${controller.selectedAmount}',
"shipping": '0',
"shipping_discount": 0
}
},
"description":
"The payment transaction description.",
"payment_options": const {
"allowed_payment_method":
"INSTANT_FUNDING_SOURCE"
},
"item_list": {
"items": [
{
"name": "Sefer Wallet ",
"quantity": 1,
"price":
'${controller.selectedAmount}',
"currency": "USD"
}
],
// shipping address is not required though
"shipping_address": const {
"recipient_name":
"SEFER Wallet",
"line1": "Shafa Badran",
"line2": "",
"city": "Amman",
"country_code": "JO",
"postal_code": "13112",
"phone": "+962798583052",
"state": "Amman"
},
}
}
],
note:
"Contact us for any questions on your order.",
onSuccess: (Map params) async {
print("onSuccess: $params");
await CRUD().post(
link: AppLink
.addPassengersWallet,
payload: {
'passenger_id': box
.read(
BoxName.pasengerID)
.toString(),
'balance': controller
.selectedAmount
.toString()
});
controller
.changePromoSheetDialogue();
await controller
.getPassengerWallet();
},
onError: (error) {
print("onError: $error");
},
onCancel: (params) {
print('cancelled: $params');
}),
),
);
// controller.changePromoSheetDialogue();
// 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');
// });
// });
},
),
MyElevatedButton(
title: 'Cancel',
kolor: AppColor.redColor,
onPressed: () {
controller.changePromoSheetDialogue();
},
),
],
),
))
: const SizedBox()),
)
],
);

View File

@@ -1,8 +1,11 @@
import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:ride/constant/style.dart';
import 'package:ride/views/widgets/my_scafold.dart';
import 'package:ride/views/widgets/mycircular.dart';
import '../../../constant/colors.dart';
import '../../../controller/functions/launch.dart';
import '../../../controller/home/profile/order_history_controller.dart';
class OrderHistory extends StatelessWidget {
@@ -24,8 +27,75 @@ class OrderHistory extends StatelessWidget {
itemCount:
orderHistoryController.orderHistoryListPassenger.length,
itemBuilder: (BuildContext context, int index) {
return Text(orderHistoryController
.orderHistoryListPassenger[0]['date']);
final rides =
orderHistoryController.orderHistoryListPassenger[index];
return Padding(
padding: const EdgeInsets.all(8.0),
child: Container(
decoration: const BoxDecoration(
borderRadius: BorderRadius.all(Radius.circular(12)),
color: AppColor.secondaryColor,
boxShadow: [
BoxShadow(
color: AppColor.accentColor,
offset: Offset(-3, -3),
blurRadius: 0,
spreadRadius: 0,
blurStyle: BlurStyle.outer),
BoxShadow(
color: AppColor.accentColor,
offset: Offset(3, 3),
blurRadius: 0,
spreadRadius: 0,
blurStyle: BlurStyle.outer)
]),
child: Padding(
padding: const EdgeInsets.all(8.0),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
InkWell(
onTap: () {
String mapUrl =
'https://www.google.com/maps/dir/${rides['start_location']}/${rides['end_location']}/';
print(mapUrl);
launchUrl1(mapUrl);
},
child: Column(
children: [
Text(rides['start_location']),
Text(rides['end_location']),
],
),
),
Column(
children: [
Text(
rides['date'],
style: AppStyle.subtitle,
),
Text(
rides['time'],
style: AppStyle.subtitle,
),
Text(
rides['status'],
style: rides['status'] != 'Canceled'
? AppStyle.subtitle
: AppStyle.subtitle
.copyWith(color: AppColor.redColor),
),
Text(
rides['price'],
style: AppStyle.subtitle,
),
],
),
],
),
),
),
);
},
),
)

View File

@@ -0,0 +1,114 @@
import 'package:animated_text_kit/animated_text_kit.dart';
import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:ride/controller/home/profile/promos_controller.dart';
import 'package:ride/views/widgets/my_scafold.dart';
import '../../../constant/colors.dart';
import '../../../constant/style.dart';
import '../../widgets/mycircular.dart';
class PromosPassengerPage extends StatelessWidget {
const PromosPassengerPage({super.key});
@override
Widget build(BuildContext context) {
Get.put(PromosController());
return MyScafolld(
title: 'Promos For today'.tr,
isleading: true,
body: [
GetBuilder<PromosController>(
builder: (orderHistoryController) => orderHistoryController.isloading
? const MyCircularProgressIndicator()
: ListView.builder(
itemCount: orderHistoryController.promoList.length,
itemBuilder: (BuildContext context, int index) {
final rides = orderHistoryController.promoList[index];
return Padding(
padding: const EdgeInsets.all(8.0),
child: Container(
decoration: const BoxDecoration(
borderRadius: BorderRadius.all(Radius.circular(12)),
color: AppColor.secondaryColor,
boxShadow: [
BoxShadow(
color: AppColor.accentColor,
offset: Offset(-3, -3),
blurRadius: 0,
spreadRadius: 0,
blurStyle: BlurStyle.outer),
BoxShadow(
color: AppColor.accentColor,
offset: Offset(3, 3),
blurRadius: 0,
spreadRadius: 0,
blurStyle: BlurStyle.outer)
]),
child: Padding(
padding: const EdgeInsets.all(8.0),
child: Column(
children: [
Row(
mainAxisAlignment:
MainAxisAlignment.spaceBetween,
children: [
Column(
crossAxisAlignment:
CrossAxisAlignment.start,
children: [
AnimatedTextKit(
animatedTexts: [
ScaleAnimatedText(rides['promo_code'],
textStyle: AppStyle.title),
WavyAnimatedText(rides['promo_code'],
textStyle: AppStyle.title),
FlickerAnimatedText(
rides['promo_code'],
textStyle: AppStyle.title),
WavyAnimatedText(rides['promo_code'],
textStyle: AppStyle.title),
],
isRepeatingAnimation: true,
onTap: () {
print("Tap Event");
},
),
Text(
rides['description'],
style: AppStyle.title,
),
],
),
Column(
children: [
Text(
rides['validity_start_date'],
style: AppStyle.title,
),
Text(
rides['validity_end_date'],
style: AppStyle.title,
),
],
),
],
),
Text(
'Copy this Promo to use it in your Ride!'.tr,
textAlign: TextAlign.center,
style: AppStyle.headtitle2
.copyWith(color: AppColor.accentColor),
)
],
),
),
),
);
},
),
)
],
);
}
}

View File

@@ -0,0 +1,113 @@
import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:ride/views/widgets/my_scafold.dart';
import '../../constant/colors.dart';
import '../../constant/links.dart';
import '../../constant/style.dart';
import '../../controller/functions/crud.dart';
import '../../controller/functions/launch.dart';
import '../widgets/elevated_btn.dart';
class OrderRequestPage extends StatelessWidget {
const OrderRequestPage({super.key});
@override
Widget build(BuildContext context) {
final arguments = Get.arguments;
final myListString = arguments['myListString'];
final myList = arguments['myList'];
final body = arguments['body'];
return MyScafolld(
title: 'Order Request Page',
body: [
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
// Text(message.notification!.body.toString()),
Padding(
padding: const EdgeInsets.all(8.0),
child: TextButton.icon(
onPressed: () {
String mapUrl =
'https://www.google.com/maps/dir/${myList[0]}/${myList[1]}/';
print(mapUrl);
launchUrl1(mapUrl);
},
icon: const Icon(Icons.map),
label: Text('Rouats of Trip'.tr)),
),
Padding(
padding: const EdgeInsets.all(8.0),
child: Text(
'Tatal From Passenger is '.tr +
double.parse(myList[2]).toStringAsFixed(2),
style: AppStyle.title,
),
),
Padding(
padding: const EdgeInsets.all(8.0),
child: Text(
'Tatal For You is '.tr +
double.parse(myList[3]).toStringAsFixed(2),
style: AppStyle.title,
),
),
Padding(
padding: const EdgeInsets.all(8.0),
child: Text(
'Distance is '.tr + myList[5].toString() + ' KM'.tr,
style: AppStyle.title,
),
),
Padding(
padding: const EdgeInsets.all(8.0),
child: Text(
'Duration of Trip is '.tr +
myList[4].toString() +
' Minutes'.tr,
style: AppStyle.title,
),
),
Padding(
padding: const EdgeInsets.all(8.0),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
MyElevatedButton(
title: 'Apply Order'.tr,
onPressed: () async {
await CRUD().postFromDialogue(
link: AppLink.addDriverOrder,
payload: {
'driver_id': myList[6].toString(),
// box.read(BoxName.driverID).toString(),
'order_id': body.toString(),
'status': 'Apply'
});
},
),
MyElevatedButton(
title: 'Refuse Order'.tr,
onPressed: () async {
await CRUD().postFromDialogue(
link: AppLink.addDriverOrder,
payload: {
'driver_id': myList[6].toString(),
// box.read(BoxName.driverID).toString(),
'order_id': body.toString(),
'status': 'Refused'
});
},
kolor: AppColor.redColor,
),
],
),
)
],
)
],
isleading: true);
}
}

View File

@@ -1 +1,64 @@
{"images":[{"size":"60x60","expected-size":"180","filename":"180.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"iphone","scale":"3x"},{"size":"40x40","expected-size":"80","filename":"80.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"iphone","scale":"2x"},{"size":"40x40","expected-size":"120","filename":"120.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"iphone","scale":"3x"},{"size":"60x60","expected-size":"120","filename":"120.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"iphone","scale":"2x"},{"size":"57x57","expected-size":"57","filename":"57.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"iphone","scale":"1x"},{"size":"29x29","expected-size":"58","filename":"58.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"iphone","scale":"2x"},{"size":"29x29","expected-size":"29","filename":"29.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"iphone","scale":"1x"},{"size":"29x29","expected-size":"87","filename":"87.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"iphone","scale":"3x"},{"size":"57x57","expected-size":"114","filename":"114.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"iphone","scale":"2x"},{"size":"20x20","expected-size":"40","filename":"40.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"iphone","scale":"2x"},{"size":"20x20","expected-size":"60","filename":"60.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"iphone","scale":"3x"},{"size":"1024x1024","filename":"1024.png","expected-size":"1024","idiom":"ios-marketing","folder":"Assets.xcassets/AppIcon.appiconset/","scale":"1x"},{"size":"40x40","expected-size":"80","filename":"80.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"ipad","scale":"2x"},{"size":"72x72","expected-size":"72","filename":"72.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"ipad","scale":"1x"},{"size":"76x76","expected-size":"152","filename":"152.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"ipad","scale":"2x"},{"size":"50x50","expected-size":"100","filename":"100.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"ipad","scale":"2x"},{"size":"29x29","expected-size":"58","filename":"58.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"ipad","scale":"2x"},{"size":"76x76","expected-size":"76","filename":"76.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"ipad","scale":"1x"},{"size":"29x29","expected-size":"29","filename":"29.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"ipad","scale":"1x"},{"size":"50x50","expected-size":"50","filename":"50.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"ipad","scale":"1x"},{"size":"72x72","expected-size":"144","filename":"144.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"ipad","scale":"2x"},{"size":"40x40","expected-size":"40","filename":"40.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"ipad","scale":"1x"},{"size":"83.5x83.5","expected-size":"167","filename":"167.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"ipad","scale":"2x"},{"size":"20x20","expected-size":"20","filename":"20.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"ipad","scale":"1x"},{"size":"20x20","expected-size":"40","filename":"40.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"ipad","scale":"2x"},{"size":"128x128","expected-size":"128","filename":"128.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"mac","scale":"1x"},{"size":"256x256","expected-size":"256","filename":"256.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"mac","scale":"1x"},{"size":"128x128","expected-size":"256","filename":"256.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"mac","scale":"2x"},{"size":"256x256","expected-size":"512","filename":"512.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"mac","scale":"2x"},{"size":"32x32","expected-size":"32","filename":"32.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"mac","scale":"1x"},{"size":"512x512","expected-size":"512","filename":"512.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"mac","scale":"1x"},{"size":"16x16","expected-size":"16","filename":"16.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"mac","scale":"1x"},{"size":"16x16","expected-size":"32","filename":"32.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"mac","scale":"2x"},{"size":"32x32","expected-size":"64","filename":"64.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"mac","scale":"2x"},{"size":"512x512","expected-size":"1024","filename":"1024.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"mac","scale":"2x"}]}
{
"images": [
{
"size": "16x16",
"idiom": "mac",
"filename": "app_icon_16.png",
"scale": "1x"
},
{
"size": "16x16",
"idiom": "mac",
"filename": "app_icon_32.png",
"scale": "2x"
},
{
"size": "32x32",
"idiom": "mac",
"filename": "app_icon_32.png",
"scale": "1x"
},
{
"size": "32x32",
"idiom": "mac",
"filename": "app_icon_64.png",
"scale": "2x"
},
{
"size": "128x128",
"idiom": "mac",
"filename": "app_icon_128.png",
"scale": "1x"
},
{
"size": "128x128",
"idiom": "mac",
"filename": "app_icon_256.png",
"scale": "2x"
},
{
"size": "256x256",
"idiom": "mac",
"filename": "app_icon_256.png",
"scale": "1x"
},
{
"size": "256x256",
"idiom": "mac",
"filename": "app_icon_512.png",
"scale": "2x"
},
{
"size": "512x512",
"idiom": "mac",
"filename": "app_icon_512.png",
"scale": "1x"
},
{
"size": "512x512",
"idiom": "mac",
"filename": "app_icon_1024.png",
"scale": "2x"
}
]
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 101 KiB

After

Width:  |  Height:  |  Size: 48 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.5 KiB

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 520 B

After

Width:  |  Height:  |  Size: 370 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 6.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.0 KiB

After

Width:  |  Height:  |  Size: 630 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 36 KiB

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.2 KiB

After

Width:  |  Height:  |  Size: 1.2 KiB

View File

@@ -57,6 +57,22 @@ packages:
url: "https://pub.dev"
source: hosted
version: "1.3.0"
checked_yaml:
dependency: transitive
description:
name: checked_yaml
sha256: feb6bed21949061731a7a75fc5d2aa727cf160b91af9a3e464c5e3a32e28b5ff
url: "https://pub.dev"
source: hosted
version: "2.0.3"
cli_util:
dependency: transitive
description:
name: cli_util
sha256: b8db3080e59b2503ca9e7922c3df2072cf13992354d5e944074ffa836fba43b7
url: "https://pub.dev"
source: hosted
version: "0.4.0"
clock:
dependency: transitive
description:
@@ -198,14 +214,22 @@ packages:
description: flutter
source: sdk
version: "0.0.0"
flutter_launcher_icons:
dependency: "direct main"
description:
name: flutter_launcher_icons
sha256: "526faf84284b86a4cb36d20a5e45147747b7563d921373d4ee0559c54fcdbcea"
url: "https://pub.dev"
source: hosted
version: "0.13.1"
flutter_lints:
dependency: "direct dev"
description:
name: flutter_lints
sha256: "2118df84ef0c3ca93f96123a616ae8540879991b8b57af2f81b76a7ada49b2a4"
sha256: b543301ad291598523947dc534aaddc5aaad597b709d2426d3a0e0d44c5cb493
url: "https://pub.dev"
source: hosted
version: "2.0.2"
version: "1.0.4"
flutter_local_notifications:
dependency: "direct main"
description:
@@ -520,6 +544,14 @@ packages:
url: "https://pub.dev"
source: hosted
version: "4.0.2"
image:
dependency: transitive
description:
name: image
sha256: a72242c9a0ffb65d03de1b7113bc4e189686fc07c7147b8b41811d0dd0e0d9bf
url: "https://pub.dev"
source: hosted
version: "4.0.17"
intl:
dependency: "direct main"
description:
@@ -544,14 +576,22 @@ packages:
url: "https://pub.dev"
source: hosted
version: "0.7.4"
json_annotation:
dependency: transitive
description:
name: json_annotation
sha256: b10a7b2ff83d83c777edba3c6a0f97045ddadd56c944e1a23a3fdf43a1bf4467
url: "https://pub.dev"
source: hosted
version: "4.8.1"
lints:
dependency: transitive
description:
name: lints
sha256: "0a217c6c989d21039f1498c3ed9f3ed71b354e69873f13a8dfc3c9fe76f1b452"
sha256: a2c3d198cb5ea2e179926622d433331d8b58374ab8f29cdda6e863bd62fd369c
url: "https://pub.dev"
source: hosted
version: "2.1.1"
version: "1.0.1"
location:
dependency: "direct main"
description:
@@ -957,6 +997,14 @@ packages:
url: "https://pub.dev"
source: hosted
version: "6.3.0"
yaml:
dependency: transitive
description:
name: yaml
sha256: "75769501ea3489fca56601ff33454fe45507ea3bfb014161abc3b43ae25989d5"
url: "https://pub.dev"
source: hosted
version: "3.1.2"
sdks:
dart: ">=3.1.0-185.0.dev <4.0.0"
flutter: ">=3.10.0"

View File

@@ -1,39 +1,16 @@
name: ride
description: A new Flutter project.
# The following line prevents the package from being accidentally published to
# pub.dev using `flutter pub publish`. This is preferred for private packages.
publish_to: 'none' # Remove this line if you wish to publish to pub.dev
# The following defines the version and build number for your application.
# A version number is three numbers separated by dots, like 1.2.43
# followed by an optional build number separated by a +.
# Both the version and the builder number may be overridden in flutter
# build by specifying --build-name and --build-number, respectively.
# In Android, build-name is used as versionName while build-number used as versionCode.
# Read more about Android versioning at https://developer.android.com/studio/publish/versioning
# In iOS, build-name is used as CFBundleShortVersionString while build-number is used as CFBundleVersion.
# Read more about iOS versioning at
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
# In Windows, build-name is used as the major, minor, and patch parts
# of the product and file versions while build-number is used as the build suffix.
version: 1.0.0+1
environment:
sdk: '>=3.0.5 <4.0.0'
# Dependencies specify other packages that your package needs in order to work.
# To automatically upgrade your package dependencies to the latest versions
# consider running `flutter pub upgrade --major-versions`. Alternatively,
# dependencies can be manually updated by changing the version numbers below to
# the latest version available on pub.dev. To see which dependencies have newer
# versions available, run `flutter pub outdated`.
dependencies:
flutter:
sdk: flutter
# The following adds the Cupertino Icons font to your application.
# Use with the CupertinoIcons class for iOS style icons.
cupertino_icons: ^1.0.2
firebase_messaging: ^14.6.5
firebase_core: ^2.15.0
@@ -57,46 +34,39 @@ dependencies:
credit_card_scanner: ^1.0.5
geolocator: ^10.0.0
flutter_paypal: ^0.2.0
flutter_launcher_icons: ^0.13.1
dev_dependencies:
flutter_test:
sdk: flutter
flutter_lints: ^1.0.0
# The "flutter_lints" package below contains a set of recommended lints to
# encourage good coding practices. The lint set provided by the package is
# activated in the `analysis_options.yaml` file located at the root of your
# package. See that file for information about deactivating specific lint
# rules and activating additional ones.
flutter_lints: ^2.0.0
flutter_launcher_icons:
android: "launcher_icon"
ios: true
image_path: "assets/images/logo.png"
min_sdk_android: 21
web:
generate: true
image_path: "assets/images/logo.png"
background_color: "#hexcode"
theme_color: "#hexcode"
windows:
generate: true
image_path: "assets/images/logo.png"
icon_size: 48
macos:
generate: true
image_path: "assets/images/logo.png"
# For information on the generic Dart part of this file, see the
# following page: https://dart.dev/tools/pub/pubspec
# The following section is specific to Flutter packages.
flutter:
# The following line ensures that the Material Icons font is
# included with your application, so that you can use the icons in
# the material Icons class.
uses-material-design: true
# To add assets to your application, add an assets section, like this:
assets:
- assets/images/
- assets/lottie/
- assets/fonts/
fonts:
- family: digital-counter-7
fonts:
- asset: assets/fonts/digital-counter-7.regular.ttf
# style: italic
# - family: Trajan Pro
# fonts:
# - asset: fonts/TrajanPro.ttf
# - asset: fonts/TrajanPro_Bold.ttf
# weight: 700
#
# For details regarding fonts from package dependencies,
# see https://flutter.dev/custom-fonts/#from-packages
- family: digital-counter-7
fonts:
- asset: assets/fonts/digital-counter-7.regular.ttf

Binary file not shown.

Before

Width:  |  Height:  |  Size: 917 B

After

Width:  |  Height:  |  Size: 370 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 21 KiB

After

Width:  |  Height:  |  Size: 4.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 33 KiB

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 21 KiB

After

Width:  |  Height:  |  Size: 4.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 38 KiB

After

Width:  |  Height:  |  Size: 19 KiB

View File

@@ -3,8 +3,8 @@
"short_name": "ride",
"start_url": ".",
"display": "standalone",
"background_color": "#0175C2",
"theme_color": "#0175C2",
"background_color": "#hexcode",
"theme_color": "#hexcode",
"description": "A new Flutter project.",
"orientation": "portrait-primary",
"prefer_related_applications": false,
@@ -32,4 +32,4 @@
"purpose": "maskable"
}
]
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 967 B