This commit is contained in:
Hamza-Ayed
2024-05-29 16:09:37 +03:00
parent 058fb67a41
commit 4af52f4392
44 changed files with 9509 additions and 2044 deletions

1
.env
View File

@@ -32,3 +32,4 @@ ocpApimSubscriptionKey=17373j50x53u07q0830634f512j731yuXrXlBl
smsPasswordEgypt="J)Vh=qb/@MXrXlBl" smsPasswordEgypt="J)Vh=qb/@MXrXlBl"
chatGPTkeySeferNew4=zg-vlie-2l1ZlpxiLJ6wQOvbb4TnC9XrxgUEyVQIu6TID4qP4FUUqoS5XrXlBl chatGPTkeySeferNew4=zg-vlie-2l1ZlpxiLJ6wQOvbb4TnC9XrxgUEyVQIu6TID4qP4FUUqoS5XrXlBl
anthropicAIkeySeferNew=zg-qbc-qvo39-n4VdMQ5nuJeIYhMN4PDYr7qox3-t2i1Lh7aNTDfYF-Gf8whUJZCs47EeelKn8_UcmUMmiSLaf0UJg0DvUlQrDt-76CRrkQQXrXlBl anthropicAIkeySeferNew=zg-qbc-qvo39-n4VdMQ5nuJeIYhMN4PDYr7qox3-t2i1Lh7aNTDfYF-Gf8whUJZCs47EeelKn8_UcmUMmiSLaf0UJg0DvUlQrDt-76CRrkQQXrXlBl
llama3Key=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

View File

@@ -55,8 +55,8 @@ android {
// For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-gradle-build-configuration. // For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-gradle-build-configuration.
minSdkVersion 22 minSdkVersion 22
targetSdkVersion flutter.targetSdkVersion targetSdkVersion flutter.targetSdkVersion
versionCode 24 versionCode 28
versionName '1.4.8' versionName '1.4.93'
// manifestPlaceholders = [mapsApiKey: 'android/app/src/main/AndroidManifest.xml'] // manifestPlaceholders = [mapsApiKey: 'android/app/src/main/AndroidManifest.xml']
} }

BIN
assets/fonts/digit.ttf Normal file

Binary file not shown.

BIN
assets/fonts/josefin.ttf Normal file

Binary file not shown.

BIN
assets/fonts/mohanad.ttf Normal file

Binary file not shown.

View File

@@ -16,6 +16,9 @@ class BoxName {
static const String agreeTerms = "agreeTerms"; static const String agreeTerms = "agreeTerms";
static const String addWork = 'addWork'; static const String addWork = 'addWork';
static const String addHome = 'addHome'; static const String addHome = 'addHome';
static const String durationData = 'durationData';
static const String rideStaticDriverData = 'rideStaticDriverData';
static const String lastTimeStaticThrottle = 'lastTimeStaticThrottle';
static const String tipPercentage = 'tipPercentage'; static const String tipPercentage = 'tipPercentage';
static const String accountIdStripeConnect = "accountIdStripeConnect"; static const String accountIdStripeConnect = "accountIdStripeConnect";
static const String faceDetectTimes = "faceDetectTimes"; static const String faceDetectTimes = "faceDetectTimes";

View File

@@ -1,13 +1,30 @@
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
class AppColor { class AppColor {
static const Color primaryColor = Colors.black; static const Color primaryColor = Colors.black; // Slightly softer red
static const Color secondaryColor = Colors.white; static const Color secondaryColor = Colors.white;
static const Color accentColor = Colors.grey; static const Color accentColor = Color(0xFFD81F26); // Google Green
static const Color backgroundColor =
Color(0xFFF5F5F5); // Light grey background
static const Color redColor = Color(0xFFEA4335); // Google Red static const Color redColor = Color(0xFFEA4335); // Google Red
static const Color greenColor = Color(0xFF34A853); // Google Green static const Color greenColor = Color(0xFF34A853); // Google Green
static const Color blueColor = Color(0xFF4285F4); // Google Blue static const Color blueColor = Color(0xFF4285F4); // Google Blue
static const Color yellowColor = Color(0xFFFBBC05); // Google Yellow static const Color yellowColor = Color(0xFFFBBC05); // Google Yellow
static Color deepPurpleAccent = static Color deepPurpleAccent =
const Color.fromARGB(255, 123, 76, 254).withOpacity(0.3); const Color.fromARGB(255, 123, 76, 254).withOpacity(0.3);
static const Color greyColor =
Color(0xFF9E9E9E); // Light grey for text and dividers
static const Color darkGreyColor =
Color(0xFF333333); // Dark grey for headings
// For dynamic elements like gradients
static List<Color> gradientStartEnd = [
const Color(0xFFD81F26), // Start with primary color
const Color(0xFFEF5350), // End with a slightly darker shade
];
static List<Color> secondaryGradientStartEnd = [
const Color(0xFF34A853), // Start with green
const Color(0xFF4CAF50), // End with a slightly darker shade of green
];
} }

View File

@@ -10,6 +10,7 @@ class AppLink {
static String test = "$server/test.php"; static String test = "$server/test.php";
//===============firebase========================== //===============firebase==========================
static String getTokens = "$server/ride/firebase/get.php"; static String getTokens = "$server/ride/firebase/get.php";
static String getDriverToken = "$server/ride/firebase/getDriverToken.php";
static String addTokens = "$server/ride/firebase/add.php"; static String addTokens = "$server/ride/firebase/add.php";
static String addTokensDriver = "$server/ride/firebase/addDriver.php"; static String addTokensDriver = "$server/ride/firebase/addDriver.php";
@@ -27,6 +28,9 @@ class AppLink {
static String updatePassengersWallet = "$wallet/update.php"; static String updatePassengersWallet = "$wallet/update.php";
static String getWalletByDriver = "$walletDriver/getWalletByDriver.php"; static String getWalletByDriver = "$walletDriver/getWalletByDriver.php";
static String driverStatistic = "$walletDriver/driverStatistic.php";
static String getDriverWeekPaymentMove =
"$walletDriver/getDriverWeekPaymentMove.php";
static String getDriversWallet = "$walletDriver/get.php"; static String getDriversWallet = "$walletDriver/get.php";
static String addDriversWalletPoints = "$walletDriver/add.php"; static String addDriversWalletPoints = "$walletDriver/add.php";
static String deleteDriversWallet = "$walletDriver/delete.php"; static String deleteDriversWallet = "$walletDriver/delete.php";
@@ -163,6 +167,7 @@ class AppLink {
static String deleteCarsLocationByPassenger = "$location/delete.php"; static String deleteCarsLocationByPassenger = "$location/delete.php";
static String updateCarsLocationByPassenger = "$location/update.php"; static String updateCarsLocationByPassenger = "$location/update.php";
static String getTotalDriverDuration = "$location/getTotalDriverDuration.php"; static String getTotalDriverDuration = "$location/getTotalDriverDuration.php";
static String getRidesDriverByDay = "$location/getRidesDriverByDay.php";
static String getTotalDriverDurationToday = static String getTotalDriverDurationToday =
"$location/getTotalDriverDurationToday.php"; "$location/getTotalDriverDurationToday.php";

View File

@@ -1,7 +1,6 @@
import 'package:SEFER/constant/box_name.dart'; import 'package:SEFER/constant/box_name.dart';
import 'package:SEFER/main.dart'; import 'package:SEFER/main.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:google_fonts/google_fonts.dart';
import 'colors.dart'; import 'colors.dart';
class AppStyle { class AppStyle {
@@ -9,61 +8,39 @@ class AppStyle {
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
fontSize: 40, fontSize: 40,
color: AppColor.accentColor, color: AppColor.accentColor,
fontFamily: box.read(BoxName.lang) == 'en' fontFamily: box.read(BoxName.lang) == 'ar' ? 'mohanad' : 'josefin');
? GoogleFonts.josefinSans().fontFamily
: box.read(BoxName.lang) == 'ar'
? GoogleFonts.amiri().fontFamily
: GoogleFonts.josefinSans().fontFamily);
static TextStyle headTitle2 = TextStyle( static TextStyle headTitle2 = TextStyle(
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
fontSize: 26, fontSize: 26,
color: AppColor.primaryColor, color: AppColor.primaryColor,
fontFamily: box.read(BoxName.lang) == 'en' fontFamily: box.read(BoxName.lang) == 'ar' ? 'mohanad' : 'josefin');
? GoogleFonts.josefinSans().fontFamily
: box.read(BoxName.lang) == 'ar'
? GoogleFonts.amiri().fontFamily
: GoogleFonts.josefinSans().fontFamily);
static TextStyle title = TextStyle( static TextStyle title = TextStyle(
fontWeight: FontWeight.bold, fontWeight: FontWeight.normal,
fontSize: 16, fontSize: box.read(BoxName.lang) == 'ar' ? 14 : 16,
color: AppColor.primaryColor, color: AppColor.primaryColor,
fontFamily: box.read(BoxName.lang) == 'en' fontFamily: box.read(BoxName.lang) == 'ar' ? 'mohanad' : 'josefin');
? GoogleFonts.josefinSans().fontFamily
: box.read(BoxName.lang) == 'ar'
? GoogleFonts.amiri().fontFamily
: GoogleFonts.josefinSans().fontFamily);
static TextStyle subtitle = TextStyle( static TextStyle subtitle = TextStyle(
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
fontSize: 13, fontSize: 13,
color: AppColor.primaryColor, color: AppColor.primaryColor,
fontFamily: box.read(BoxName.lang) == 'en' fontFamily: box.read(BoxName.lang) == 'ar' ? 'mohanad' : 'josefin');
? GoogleFonts.josefinSans().fontFamily static TextStyle number = const TextStyle(
: box.read(BoxName.lang) == 'ar'
? GoogleFonts.amiri().fontFamily
: GoogleFonts.josefinSans().fontFamily);
static TextStyle number = TextStyle(
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
fontSize: 14, fontSize: 14,
color: AppColor.primaryColor, color: AppColor.primaryColor,
fontFamily: GoogleFonts.averiaSansLibre().fontFamily); fontFamily: 'digit');
static BoxDecoration boxDecoration = const BoxDecoration( static BoxDecoration boxDecoration = const BoxDecoration(
borderRadius: BorderRadius.all(Radius.circular(12)),
color: AppColor.secondaryColor,
boxShadow: [ boxShadow: [
BoxShadow( BoxShadow(
color: AppColor.accentColor, color: AppColor.accentColor, blurRadius: 5, offset: Offset(2, 4)),
offset: Offset(-3, -3),
blurRadius: 0,
spreadRadius: 0,
blurStyle: BlurStyle.outer),
BoxShadow( BoxShadow(
color: AppColor.accentColor, color: AppColor.accentColor, blurRadius: 5, offset: Offset(-2, -2))
offset: Offset(3, 3), ],
blurRadius: 0, color: AppColor.secondaryColor,
spreadRadius: 0, borderRadius: BorderRadius.all(
blurStyle: BlurStyle.outer) Radius.elliptical(15, 30),
]); ));
static BoxDecoration boxDecoration1 = const BoxDecoration( static BoxDecoration boxDecoration1 = const BoxDecoration(
boxShadow: [ boxShadow: [
BoxShadow( BoxShadow(

View File

@@ -0,0 +1,35 @@
import 'package:firebase_auth/firebase_auth.dart';
import 'package:get/get.dart';
import 'package:sign_in_with_apple/sign_in_with_apple.dart';
class AuthController extends GetxController {
final FirebaseAuth _auth = FirebaseAuth.instance;
Future<User?> signInWithApple() async {
try {
final appleCredential = await SignInWithApple.getAppleIDCredential(
scopes: [
AppleIDAuthorizationScopes.email,
AppleIDAuthorizationScopes.fullName,
],
);
final oAuthProvider = OAuthProvider('apple.com');
final credential = oAuthProvider.credential(
idToken: appleCredential.identityToken,
accessToken: appleCredential.authorizationCode,
);
UserCredential userCredential =
await _auth.signInWithCredential(credential);
return userCredential.user;
} catch (error) {
print("Error during Apple sign-in: $error");
return null;
}
}
void signOut() async {
await _auth.signOut();
}
}

View File

@@ -16,6 +16,8 @@ import 'package:SEFER/views/auth/captin/verify_email_captain.dart';
import 'package:SEFER/views/home/Captin/home_captain/home_captin.dart'; import 'package:SEFER/views/home/Captin/home_captain/home_captin.dart';
import 'package:location/location.dart'; import 'package:location/location.dart';
import '../../firebase/firbase_messge.dart';
class LoginCaptinController extends GetxController { class LoginCaptinController extends GetxController {
final formKey = GlobalKey<FormState>(); final formKey = GlobalKey<FormState>();
TextEditingController emailController = TextEditingController(); TextEditingController emailController = TextEditingController();
@@ -115,7 +117,7 @@ class LoginCaptinController extends GetxController {
} }
} }
void loginFromSignInGoogle(String driverID, email) async { loginFromSignInGoogle(String driverID, email) async {
isloading = true; isloading = true;
update(); update();
var res = await CRUD().get(link: AppLink.loginFromGoogleCaptin, payload: { var res = await CRUD().get(link: AppLink.loginFromGoogleCaptin, payload: {
@@ -125,7 +127,7 @@ class LoginCaptinController extends GetxController {
print(res); print(res);
if (res == 'Failure') { if (res == 'Failure') {
//Failure //Failure
Get.offAll(SmsSignupEgypt()); Get.offAll(() => SmsSignupEgypt());
isloading = false; isloading = false;
update(); update();
// Get.snackbar('Failure', '', backgroundColor: Colors.red); // Get.snackbar('Failure', '', backgroundColor: Colors.red);
@@ -139,9 +141,36 @@ class LoginCaptinController extends GetxController {
box.write(BoxName.phoneVerified, box.write(BoxName.phoneVerified,
jsonDecoeded['data'][0]['is_verified'].toString()); jsonDecoeded['data'][0]['is_verified'].toString());
box.write(BoxName.phoneDriver, jsonDecoeded['data'][0]['phone']); box.write(BoxName.phoneDriver, jsonDecoeded['data'][0]['phone']);
Get.off(HomeCaptain()); box.write(
BoxName.nameDriver,
'${jsonDecoeded['data'][0]['first_name']}'
' ${jsonDecoeded['data'][0]['last_name']}');
print(box.read(BoxName.tokenDriver));
var token = await CRUD().get(
link: AppLink.getDriverToken,
payload: {'captain_id': box.read(BoxName.driverID).toString()});
print(token);
print(box.read(BoxName.tokenDriver));
if (token != 'failure') {
if (jsonDecode(token)['data'][0]['token'] !=
box.read(BoxName.tokenDriver)) {
Get.put(FirebaseMessagesController())
.sendNotificationToAnyWithoutData(
'token change',
'change device',
jsonDecode(token)['data'][0]['token'].toString(),
);
await CRUD().post(link: AppLink.addTokensDriver, payload: {
'token': box.read(BoxName.tokenDriver),
'captain_id': box.read(BoxName.driverID).toString()
}).then((value) => print('cccc'));
}
}
Get.off(() => HomeCaptain());
} else { } else {
Get.offAll(SmsSignupEgypt()); Get.offAll(() => SmsSignupEgypt());
// Get.snackbar(jsonDecoeded['status'], jsonDecoeded['data'], // Get.snackbar(jsonDecoeded['status'], jsonDecoeded['data'],
// backgroundColor: Colors.redAccent); // backgroundColor: Colors.redAccent);
isloading = false; isloading = false;

View File

@@ -109,13 +109,14 @@ class RegisterCaptainController extends GetxController {
if (res != 'failure') { if (res != 'failure') {
// var dec = jsonDecode(res); // var dec = jsonDecode(res);
box.write(BoxName.phoneDriver, '+2${phoneController.text}'); box.write(BoxName.phoneDriver, '+2${phoneController.text}');
box.write(BoxName.phoneVerified, '1'); box.write(BoxName.phoneVerified, 1);
// var res1 = await CRUD().post(
// link: AppLink.updateAccountBank, var res1 = await CRUD().post(
// payload: {'phone': '+2${phoneController.text}'}); link: AppLink.updateAccountBank,
// if (jsonDecode(res1)['status'] == 'success') { payload: {'phone': '+2${phoneController.text}'});
Get.to(EgyptCardAI()); if (jsonDecode(res1)['status'] == 'success') {
// } Get.to(EgyptCardAI());
}
} }
} }
} }

View File

@@ -16,6 +16,7 @@ import '../../main.dart';
import '../../views/home/Captin/home_captain/home_captin.dart'; import '../../views/home/Captin/home_captain/home_captin.dart';
import '../../views/home/Captin/orderCaptin/order_speed_request.dart'; import '../../views/home/Captin/orderCaptin/order_speed_request.dart';
import '../../views/home/Captin/orderCaptin/order_request_page.dart'; import '../../views/home/Captin/orderCaptin/order_request_page.dart';
import '../auth/google_sign.dart';
import 'local_notification.dart'; import 'local_notification.dart';
class FirebaseMessagesController extends GetxController { class FirebaseMessagesController extends GetxController {
@@ -64,11 +65,8 @@ class FirebaseMessagesController extends GetxController {
Future getToken() async { Future getToken() async {
fcmToken.getToken().then((token) { fcmToken.getToken().then((token) {
if (box.read(BoxName.email) == null) { box.write(BoxName.tokenDriver, token);
box.write(BoxName.tokenDriver, token);
} else {
box.write(BoxName.tokenFCM, token);
}
print(token); print(token);
}); });
@@ -122,6 +120,10 @@ class FirebaseMessagesController extends GetxController {
NotificationController().showNotification( NotificationController().showNotification(
'Cancel Trip'.tr, 'Passenger Cancel Trip'.tr, 'cancel'); 'Cancel Trip'.tr, 'Passenger Cancel Trip'.tr, 'cancel');
cancelTripDialog(); cancelTripDialog();
} else if (message.notification!.title! == 'token change') {
NotificationController()
.showNotification('token change', 'token change', 'cancel');
GoogleSignInHelper.signOut();
} else if (message.notification!.title! == 'message From passenger') { } else if (message.notification!.title! == 'message From passenger') {
NotificationController() NotificationController()
.showNotification('message From passenger'.tr, ''.tr, 'tone2'); .showNotification('message From passenger'.tr, ''.tr, 'tone2');

View File

@@ -7,9 +7,7 @@ import 'package:http/http.dart' as http;
import 'package:SEFER/env/env.dart'; import 'package:SEFER/env/env.dart';
import '../../constant/api_key.dart'; import '../../constant/api_key.dart';
import '../../constant/colors.dart';
import 'gemeni.dart'; import 'gemeni.dart';
import 'llama_ai.dart';
import 'upload_image.dart'; import 'upload_image.dart';
class CRUD { class CRUD {
@@ -36,7 +34,7 @@ class CRUD {
// print(response.body); // print(response.body);
var jsonData = jsonDecode(response.body); var jsonData = jsonDecode(response.body);
if (jsonData['status'] == 'success') { if (jsonData['status'] == 'success') {
// print(jsonData); print(jsonData);
return response.body; return response.body;
} }
@@ -248,8 +246,8 @@ class CRUD {
return response.body; return response.body;
} else { } else {
String errorMessage = jsonData['message']; String errorMessage = jsonData['message'];
Get.snackbar('Erroe'.tr, errorMessage.tr, // Get.snackbar('Error'.tr, errorMessage.tr,
backgroundColor: AppColor.redColor); // backgroundColor: AppColor.redColor);
print(errorMessage.tr); print(errorMessage.tr);
return (jsonData['status']); return (jsonData['status']);
} }

View File

@@ -195,11 +195,11 @@ class AI extends GetxController {
); );
} else { } else {
await addDriverEgypt(); await addDriverEgypt();
// await addRegistrationCarEgypt(); await addRegistrationCarEgypt();
if (isCarSaved && isDriverSaved) { if (isCarSaved && isDriverSaved) {
DeviceController().getDeviceSerialNumber(); DeviceController().getDeviceSerialNumber();
box.write(BoxName.phoneVerified, '1'); box.write(BoxName.phoneVerified, 1);
Get.offAll(() => HomeCaptain()); Get.offAll(() => HomeCaptain());
// Get.offAll(() => HomeCaptain()); // Get.offAll(() => HomeCaptain());
} }

View File

@@ -12,15 +12,42 @@ class DurationController extends GetxController {
final data = DurationData; final data = DurationData;
// late AnimationController animationController; // late AnimationController animationController;
late List<MonthlyDataModel> rideData; late List<MonthlyDataModel> rideData;
late List<MonthlyRideModel> rideCountData;
late List<MonthlyPriceDriverModel> ridePriceDriverData;
Map<String, dynamic> jsonData1 = {}; Map<String, dynamic> jsonData1 = {};
Map<String, dynamic> jsonData2 = {};
bool isLoading = false; bool isLoading = false;
String totalDurationToday = ''; String totalDurationToday = '';
var chartData; var chartData;
var chartRideCount;
var chartRidePriceDriver;
List monthlyList = [];
@override @override
void onInit() async { void onInit() async {
super.onInit(); super.onInit();
await fetchData(); await fetchData();
await fetchRideDriver();
await getStaticDriver();
}
getStaticDriver() async {
isLoading = true;
update();
var res = await CRUD().get(
link: AppLink.driverStatistic,
payload: {'driverID': box.read(BoxName.driverID)});
if (res == 'failure') {
monthlyList = [];
print('monthlyList $monthlyList');
isLoading = false;
update();
} else {
monthlyList = jsonDecode(res)['message'];
print(monthlyList);
isLoading = false;
update();
}
} }
Future<void> fetchData() async { Future<void> fetchData() async {
@@ -50,6 +77,44 @@ class DurationController extends GetxController {
update(); // Notify the observers about the data and loading state change update(); // Notify the observers about the data and loading state change
} }
Future<void> fetchRideDriver() async {
isLoading = true;
update(); // Notify the observers about the loading state change
var res = await CRUD().get(
link: AppLink.getRidesDriverByDay,
payload: {'driver_id': box.read(BoxName.driverID)},
);
jsonData2 = jsonDecode(res);
var jsonResponse = jsonDecode(res) as Map<String, dynamic>;
isLoading = false;
// print(jsonResponse);
final List<dynamic> jsonData = jsonResponse['message'];
rideCountData = jsonData.map<MonthlyRideModel>((item) {
return MonthlyRideModel.fromJson(item);
}).toList();
ridePriceDriverData = jsonData.map<MonthlyPriceDriverModel>((item) {
return MonthlyPriceDriverModel.fromJson(item);
}).toList();
final List<FlSpot> spots = rideCountData
.map((data) => FlSpot(
data.day.toDouble(),
data.countRide.toDouble(),
))
.toList();
chartRideCount = spots;
final List<FlSpot> spotsDriverPrices = ridePriceDriverData
.map((data) => FlSpot(
data.day.toDouble(),
data.pricePerDay.toDouble(),
))
.toList();
chartRidePriceDriver = spotsDriverPrices;
update(); // Notify the observers about the data and loading state change
}
List<DurationData> parseData(List<dynamic> json) { List<DurationData> parseData(List<dynamic> json) {
return json.map((entry) { return json.map((entry) {
final Map<String, dynamic> entryMap = entry; final Map<String, dynamic> entryMap = entry;

View File

@@ -445,11 +445,12 @@ class MapDriverController extends GetxController {
isRideFinished = true; isRideFinished = true;
isRideStarted = false; isRideStarted = false;
isPriceWindow = false; isPriceWindow = false;
totalCost = carType != 'Comfort' && carType != 'Mashwari' totalCost =
? totalPassenger carType != 'Comfort' && carType != 'Mashwari' && carType != 'Lady'
: price < double.parse(totalPassenger)
? totalPassenger ? totalPassenger
: price.toStringAsFixed(2); : price < double.parse(totalPassenger)
? totalPassenger
: price.toStringAsFixed(2);
paymentAmount = totalCost; paymentAmount = totalCost;
box.write(BoxName.statusDriverLocation, 'off'); box.write(BoxName.statusDriverLocation, 'off');
// changeRideToBeginToPassenger(); // changeRideToBeginToPassenger();
@@ -574,14 +575,18 @@ class MapDriverController extends GetxController {
? (i ~/ 60) + ? (i ~/ 60) +
(recentDistanceToDash * (recentDistanceToDash *
Get.find<HomeCaptainController>().speedPrice) Get.find<HomeCaptainController>().speedPrice)
: carType == 'Mashwari' : carType == 'Lady'
? (i ~/ 60) + ? (i ~/ 60) +
(recentDistanceToDash * (recentDistanceToDash *
Get.find<HomeCaptainController>().deliveryPrice) Get.find<HomeCaptainController>().comfortPrice)
: (i ~/ 60) + : carType == 'Mashwari'
(recentDistanceToDash * ? (i ~/ 60) +
Get.find<HomeCaptainController>() (recentDistanceToDash *
.mashwariPrice); // $1 for each minute + $4 for each km Get.find<HomeCaptainController>().deliveryPrice)
: (i ~/ 60) +
(recentDistanceToDash *
Get.find<HomeCaptainController>()
.mashwariPrice); // $1 for each minute + $4 for each km
price = (price * .10) + price; // Add 10% tax price = (price * .10) + price; // Add 10% tax
speed = Get.find<LocationController>().speed * 3.6; speed = Get.find<LocationController>().speed * 3.6;
progressTimerRideBegin = i / durationOfRide; progressTimerRideBegin = i / durationOfRide;
@@ -827,6 +832,8 @@ class MapDriverController extends GetxController {
int minutes = 0; int minutes = 0;
late String carType; late String carType;
late String kazan; late String kazan;
late String startNameLocation;
late String endNameLocation;
@override @override
void onInit() async { void onInit() async {
mapAPIKEY = await storage.read(key: BoxName.mapAPIKEY); mapAPIKEY = await storage.read(key: BoxName.mapAPIKEY);
@@ -860,6 +867,8 @@ class MapDriverController extends GetxController {
timeOfOrder = Get.arguments['timeOfOrder']; timeOfOrder = Get.arguments['timeOfOrder'];
carType = Get.arguments['carType']; carType = Get.arguments['carType'];
kazan = Get.arguments['kazan']; kazan = Get.arguments['kazan'];
startNameLocation = Get.arguments['startNameLocation'];
endNameLocation = Get.arguments['endNameLocation'];
var coords = passengerLocation.split(','); var coords = passengerLocation.split(',');
var coordDestination = passengerDestination.split(','); var coordDestination = passengerDestination.split(',');

View File

@@ -42,18 +42,18 @@ class SplashScreenController extends GetxController
startTimer(); startTimer();
} }
void startTimer() { void startTimer() async {
Timer(const Duration(seconds: 5), () { debugPrint('onBoarding: ${box.read(BoxName.onBoarding)}');
debugPrint('emailDriver: ${box.read(BoxName.emailDriver)}');
debugPrint('phoneDriver: ${box.read(BoxName.phoneDriver)}');
debugPrint('phoneVerified: ${box.read(BoxName.phoneVerified)}');
Timer(const Duration(seconds: 5), () async {
box.read(BoxName.onBoarding) == null box.read(BoxName.onBoarding) == null
? Get.off(() => OnBoardingPage()) ? Get.off(() => OnBoardingPage())
: box.read(BoxName.emailDriver) != null : box.read(BoxName.emailDriver) != null &&
// todo
&&
box.read(BoxName.phoneDriver) != null && box.read(BoxName.phoneDriver) != null &&
box.read(BoxName.phoneVerified) == '1' box.read(BoxName.phoneVerified) == '1'
// ? Get.off(() => SmsSignupEgypt()) ? await Get.put(LoginCaptinController()).loginFromSignInGoogle(
// ? Get.off(() => HomeCaptain())
? Get.put(LoginCaptinController()).loginFromSignInGoogle(
box.read(BoxName.driverID).toString(), box.read(BoxName.driverID).toString(),
box.read(BoxName.emailDriver)) box.read(BoxName.emailDriver))
: Get.off(() => LoginCaptin()); : Get.off(() => LoginCaptin());

View File

@@ -32,15 +32,59 @@ class LocaleController extends GetxController {
appTheme = themeEnglish; appTheme = themeEnglish;
box.write(BoxName.lang, 'tr'); box.write(BoxName.lang, 'tr');
break; break;
case "fr":
locale = const Locale("fr");
appTheme = themeEnglish;
box.write(BoxName.lang, 'fr');
break;
case "it":
locale = const Locale("it");
appTheme = themeEnglish;
box.write(BoxName.lang, 'it');
break;
case "de":
locale = const Locale("de");
appTheme = themeEnglish;
box.write(BoxName.lang, 'de');
break;
case "el":
locale = const Locale("el");
appTheme = themeEnglish;
box.write(BoxName.lang, 'el');
break;
case "es":
locale = const Locale("es");
appTheme = themeEnglish;
box.write(BoxName.lang, 'es');
break;
case "fa":
locale = const Locale("fa");
appTheme = themeEnglish;
box.write(BoxName.lang, 'fa');
break;
case "zh":
locale = const Locale("zh");
appTheme = themeEnglish;
box.write(BoxName.lang, 'zh');
break;
case "ru":
locale = const Locale("ru");
appTheme = themeEnglish;
box.write(BoxName.lang, 'ru');
break;
case "hi":
locale = const Locale("hi");
appTheme = themeEnglish;
box.write(BoxName.lang, 'hi');
break;
default: default:
locale = Locale(Get.deviceLocale!.languageCode); locale = Locale(Get.deviceLocale!.languageCode);
box.write(BoxName.lang, 'en'); box.write(BoxName.lang, Get.deviceLocale!.languageCode);
appTheme = themeEnglish; appTheme = themeEnglish;
break; break;
} }
box.write(BoxName.lang, langcode); box.write(BoxName.lang, langcode);
// box.write(BoxName.lang, langcode);
Get.changeTheme(appTheme); Get.changeTheme(appTheme);
Get.updateLocale(locale); Get.updateLocale(locale);
restartApp(); restartApp();
@@ -63,6 +107,42 @@ class LocaleController extends GetxController {
language = const Locale("tr"); language = const Locale("tr");
appTheme = themeEnglish; appTheme = themeEnglish;
break; break;
case "fr":
language = const Locale("fr");
appTheme = themeEnglish;
break;
case "it":
language = const Locale("it");
appTheme = themeEnglish;
break;
case "de":
language = const Locale("de");
appTheme = themeEnglish;
break;
case "el":
language = const Locale("el");
appTheme = themeEnglish;
break;
case "es":
language = const Locale("es");
appTheme = themeEnglish;
break;
case "fa":
language = const Locale("fa");
appTheme = themeArabic;
break;
case "zh":
language = const Locale("zh");
appTheme = themeEnglish;
break;
case "ru":
language = const Locale("ru");
appTheme = themeEnglish;
break;
case "hi":
language = const Locale("hi");
appTheme = themeEnglish;
break;
default: default:
language = Locale(Get.deviceLocale!.languageCode); language = Locale(Get.deviceLocale!.languageCode);
appTheme = themeEnglish; appTheme = themeEnglish;

File diff suppressed because it is too large Load Diff

View File

@@ -10,6 +10,7 @@ import 'package:SEFER/main.dart';
class DriverWalletHistoryController extends GetxController { class DriverWalletHistoryController extends GetxController {
bool isLoading = false; bool isLoading = false;
List archive = []; List archive = [];
List weeklyList = [];
getArchivePayment() async { getArchivePayment() async {
isLoading = true; isLoading = true;
@@ -36,9 +37,35 @@ class DriverWalletHistoryController extends GetxController {
update(); update();
} }
getWeekllyArchivePayment() async {
isLoading = true;
update();
var res = await CRUD().get(
link: AppLink.getDriverWeekPaymentMove,
payload: {'driverID': box.read(BoxName.driverID)});
print(res);
if (res == 'failure') {
Get.defaultDialog(
barrierDismissible: false,
title: 'There is no data yet.'.tr,
middleText: '',
confirm: MyElevatedButton(
title: 'Back'.tr,
onPressed: () {
Get.back();
Get.back();
},
));
}
weeklyList = jsonDecode(res)['message'];
print(archive);
isLoading = false;
update();
}
@override @override
void onInit() { void onInit() {
getArchivePayment(); // getArchivePayment();
super.onInit(); super.onInit();
} }
} }

View File

@@ -62,6 +62,8 @@ class CaptainProfileController extends GetxController {
Map captainProfileData = {}; Map captainProfileData = {};
Future getProfileData() async { Future getProfileData() async {
isLoading = true;
update();
var res = await CRUD().get( var res = await CRUD().get(
link: AppLink.getCaptainProfile, link: AppLink.getCaptainProfile,
payload: {'id': box.read(BoxName.driverID)}); payload: {'id': box.read(BoxName.driverID)});
@@ -69,7 +71,7 @@ class CaptainProfileController extends GetxController {
var d = jsonDecode(res); var d = jsonDecode(res);
captainProfileData = d['message']; captainProfileData = d['message'];
update(); update();
print(d['message']); print(captainProfileData);
box.write(BoxName.sexDriver, d['message']['gender']); box.write(BoxName.sexDriver, d['message']['gender']);
box.write(BoxName.dobDriver, d['message']['birthdate']); box.write(BoxName.dobDriver, d['message']['birthdate']);
box.write(BoxName.vin, d['message']['vin']); box.write(BoxName.vin, d['message']['vin']);
@@ -80,7 +82,7 @@ class CaptainProfileController extends GetxController {
box.write(BoxName.year, d['message']['year']); box.write(BoxName.year, d['message']['year']);
box.write(BoxName.expirationDate, d['message']['expiration_date']); box.write(BoxName.expirationDate, d['message']['expiration_date']);
// box.write(BoxName.acc, d['message']['accountBank']); // box.write(BoxName.acc, d['message']['accountBank']);
isLoading = false;
update(); update();
} }
} }

View File

@@ -61,6 +61,10 @@ class RateController extends GetxController {
'duration': Get.find<MapDriverController>().duration.toString(), 'duration': Get.find<MapDriverController>().duration.toString(),
'phone': Get.find<MapDriverController>().passengerPhone.toString(), 'phone': Get.find<MapDriverController>().passengerPhone.toString(),
'email': Get.find<MapDriverController>().passengerEmail.toString(), 'email': Get.find<MapDriverController>().passengerEmail.toString(),
'startNameLocation':
Get.find<MapDriverController>().startNameLocation.toString(),
'endNameLocation':
Get.find<MapDriverController>().endNameLocation.toString(),
}); });
// homeCaptainController.isActive = true; // homeCaptainController.isActive = true;
// update(); // update();

View File

@@ -38,7 +38,7 @@ ThemeData themeEnglish = ThemeData(
); );
ThemeData themeArabic = ThemeData( ThemeData themeArabic = ThemeData(
fontFamily: "Cairo", fontFamily: 'mohanad',
textTheme: const TextTheme( textTheme: const TextTheme(
displayLarge: TextStyle( displayLarge: TextStyle(
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,

View File

@@ -16,8 +16,6 @@ import 'constant/credential.dart';
import 'constant/info.dart'; import 'constant/info.dart';
import 'controller/firebase/firbase_messge.dart'; import 'controller/firebase/firbase_messge.dart';
import 'controller/firebase/local_notification.dart'; import 'controller/firebase/local_notification.dart';
import 'controller/functions/device_info.dart';
import 'controller/functions/location_background_controller.dart';
import 'controller/functions/location_controller.dart'; import 'controller/functions/location_controller.dart';
import 'controller/local/local_controller.dart'; import 'controller/local/local_controller.dart';
import 'controller/local/translations.dart'; import 'controller/local/translations.dart';

View File

@@ -10,3 +10,34 @@ class MonthlyDataModel {
totalDuration: totalDuration:
int.parse(json['total_duration'].toString().split(':')[0])); int.parse(json['total_duration'].toString().split(':')[0]));
} }
class MonthlyRideModel {
int day;
int countRide;
int totalCount;
MonthlyRideModel(
{required this.day, required this.countRide, required this.totalCount});
factory MonthlyRideModel.fromJson(Map<String, dynamic> json) =>
MonthlyRideModel(
day: int.parse(json['day'].toString().split('-')[2]),
countRide: int.parse(json['countRide'].toString()),
totalCount: int.parse(json['totalCount'].toString()),
);
}
class MonthlyPriceDriverModel {
int day;
// int price;
double pricePerDay;
MonthlyPriceDriverModel({required this.day, required this.pricePerDay});
factory MonthlyPriceDriverModel.fromJson(Map<String, dynamic> json) =>
MonthlyPriceDriverModel(
day: int.parse(json['day'].toString().split('-')[2]),
// price: int.parse(json['price'].toString()),
pricePerDay: double.parse(json['pricePerDay'].toString()),
);
}

View File

@@ -6,6 +6,7 @@ import 'package:SEFER/constant/info.dart';
import 'package:SEFER/constant/style.dart'; import 'package:SEFER/constant/style.dart';
import 'package:SEFER/views/widgets/my_scafold.dart'; import 'package:SEFER/views/widgets/my_scafold.dart';
import 'package:SEFER/views/widgets/mycircular.dart'; import 'package:SEFER/views/widgets/mycircular.dart';
import 'package:intl/intl.dart';
import '../../controller/home/captin/duration_controller .dart'; import '../../controller/home/captin/duration_controller .dart';
class RideCalculateDriver extends StatelessWidget { class RideCalculateDriver extends StatelessWidget {
@@ -22,83 +23,269 @@ class RideCalculateDriver extends StatelessWidget {
child: GetBuilder<DurationController>( child: GetBuilder<DurationController>(
builder: (durationController) => durationController.isLoading builder: (durationController) => durationController.isLoading
? const Center(child: MyCircularProgressIndicator()) ? const Center(child: MyCircularProgressIndicator())
: Column( : ListView(
mainAxisAlignment: MainAxisAlignment.start, // mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.center, // crossAxisAlignment: CrossAxisAlignment.center,
children: [ children: [
Text( Text(
'${'Average of Hours of'.tr} ${AppInformation.appName}${' is ON for this month'.tr}${' ${durationController.jsonData1['message'][0]['day'].toString().split('-')[1]}'.tr}', '${'Average of Hours of'.tr} ${AppInformation.appName}${' is ON for this month'.tr}${' ${durationController.jsonData1['message'][0]['day'].toString().split('-')[1]}'.tr}',
style: AppStyle.title, style: AppStyle.title,
textAlign: TextAlign.center, textAlign: TextAlign.center,
), ),
SizedBox( Padding(
height: Get.height * .4, padding: const EdgeInsets.all(6),
child: LineChart( child: Container(
duration: const Duration(milliseconds: 150), decoration: AppStyle.boxDecoration1,
curve: Curves.ease, height: Get.height * .4,
LineChartData( child: LineChart(
lineBarsData: [ duration: const Duration(milliseconds: 150),
LineChartBarData( curve: Curves.ease,
spots: durationController.chartData, LineChartData(
isCurved: true, lineBarsData: [
color: Colors.deepPurpleAccent, // Custom color LineChartBarData(
barWidth: 3, // Thinner line isStepLineChart: true,
dotData: const FlDotData( spots: durationController.chartData,
show: true), // Show dots on each point isCurved: true,
belowBarData: BarAreaData( color:
// Add gradient fill below the line Colors.deepPurpleAccent, // Custom color
show: true, barWidth: 3, // Thinner line
color: AppColor.deepPurpleAccent, dotData: const FlDotData(
show: true), // Show dots on each point
belowBarData: BarAreaData(
// Add gradient fill below the line
show: true,
color: AppColor.deepPurpleAccent,
),
isStrokeJoinRound: true,
shadow: const BoxShadow(
color: AppColor.yellowColor,
blurRadius: 4,
offset: Offset(2, 2),
),
), ),
isStrokeJoinRound: true, ],
shadow: const BoxShadow( showingTooltipIndicators: const [],
color: AppColor.yellowColor, titlesData: FlTitlesData(
blurRadius: 4, show: true,
offset: Offset(2, 2), topTitles: AxisTitles(
),
),
],
showingTooltipIndicators: const [],
titlesData: FlTitlesData(
show: true,
topTitles: AxisTitles(
axisNameWidget: Text( axisNameWidget: Text(
'Days'.tr, 'Days'.tr,
style: AppStyle.title, style: AppStyle.title,
), ),
axisNameSize: 30, axisNameSize: 30,
sideTitles: const SideTitles( ),
reservedSize: 30, showTitles: true)), bottomTitles: AxisTitles(
bottomTitles: AxisTitles( axisNameWidget: Text(
axisNameWidget: Text( 'Total Hours on month'.tr,
'Total Hours on month'.tr, style: AppStyle.title,
style: AppStyle.title, ),
), axisNameSize: 30,
axisNameSize: 30, sideTitles: const SideTitles(
sideTitles: const SideTitles( reservedSize: 30, showTitles: true)),
reservedSize: 30, showTitles: true)), leftTitles: AxisTitles(
leftTitles: AxisTitles( axisNameWidget: Text(
axisNameWidget: Text( 'Counts of Hours on days'.tr,
'Counts of Hours on days'.tr, style: AppStyle.title,
style: AppStyle.title, ),
), axisNameSize: 30,
axisNameSize: 30, sideTitles: const SideTitles(
sideTitles: const SideTitles( reservedSize: 30, showTitles: true)),
reservedSize: 30, showTitles: true)), ),
), gridData: const FlGridData(
gridData: const FlGridData( show: true,
show: true, ),
), borderData: FlBorderData(
borderData: FlBorderData( show: true,
show: true, border: const Border(
border: const Border( bottom:
bottom: BorderSide(color: AppColor.accentColor), BorderSide(color: AppColor.accentColor),
left: BorderSide(color: AppColor.accentColor), left: BorderSide(color: AppColor.accentColor),
),
), ),
), ),
), ),
), ),
), ),
const SizedBox(
height: 5,
),
Padding(
padding: const EdgeInsets.all(6),
child: Container(
decoration: AppStyle.boxDecoration1,
height: Get.height * .4,
child: LineChart(
duration: const Duration(milliseconds: 150),
curve: Curves.ease,
LineChartData(
lineBarsData: [
LineChartBarData(
spots: durationController.chartRideCount,
// isCurved: true,
color:
Colors.deepPurpleAccent, // Custom color
barWidth: 3, // Thinner line
dotData: const FlDotData(
show: true), // Show dots on each point
belowBarData: BarAreaData(
// Add gradient fill below the line
show: true,
color: AppColor.deepPurpleAccent,
),
isStrokeJoinRound: true,
shadow: const BoxShadow(
color: AppColor.yellowColor,
blurRadius: 4,
offset: Offset(2, 2),
),
),
],
showingTooltipIndicators: const [],
titlesData: FlTitlesData(
show: true,
topTitles: AxisTitles(
axisNameWidget: Text(
'Days'.tr,
style: AppStyle.title,
),
axisNameSize: 30,
// sideTitles: const SideTitles(
// reservedSize: 30, showTitles: true),
),
bottomTitles: AxisTitles(
axisNameWidget: Text(
'${"Total rides on month".tr} = ${durationController.jsonData2['message'][0]['totalCount'].toString()}'
.tr,
style: AppStyle.title,
),
axisNameSize: 30,
sideTitles: const SideTitles(
reservedSize: 30, showTitles: true)),
leftTitles: AxisTitles(
axisNameWidget: Text(
'Counts of rides on days'.tr,
style: AppStyle.title,
),
axisNameSize: 30,
sideTitles: const SideTitles(
reservedSize: 30, showTitles: true)),
),
gridData: const FlGridData(
show: true,
),
borderData: FlBorderData(
show: true,
border: const Border(
bottom:
BorderSide(color: AppColor.accentColor),
left: BorderSide(color: AppColor.accentColor),
),
),
),
),
),
),
const SizedBox(
height: 5,
),
Padding(
padding: const EdgeInsets.all(6),
child: Container(
decoration: AppStyle.boxDecoration1,
height: Get.height * .4,
child: LineChart(
duration: const Duration(milliseconds: 150),
curve: Curves.ease,
LineChartData(
lineBarsData: [
LineChartBarData(
isStepLineChart: true,
spots:
durationController.chartRidePriceDriver,
isCurved: true,
isStrokeCapRound: true,
preventCurveOverShooting: true,
color:
Colors.deepPurpleAccent, // Custom color
barWidth: 3, // Thinner line
dotData: const FlDotData(
show: true), // Show dots on each point
belowBarData: BarAreaData(
// Add gradient fill below the line
show: true,
color: AppColor.deepPurpleAccent,
),
isStrokeJoinRound: true,
shadow: const BoxShadow(
color: AppColor.yellowColor,
blurRadius: 4,
offset: Offset(2, 2),
),
),
],
showingTooltipIndicators: const [],
titlesData: FlTitlesData(
show: true,
topTitles: AxisTitles(
axisNameWidget: Text(
'Days'.tr,
style: AppStyle.title,
),
axisNameSize: 30,
// sideTitles: const SideTitles(
// reservedSize: 30, showTitles: true),
),
bottomTitles: AxisTitles(
axisNameWidget: Text(
'${"Total rides on month".tr} = ${durationController.jsonData2['message'][0]['totalCount'].toString()}'
.tr,
style: AppStyle.title,
),
axisNameSize: 30,
sideTitles: const SideTitles(
reservedSize: 30, showTitles: true)),
leftTitles: AxisTitles(
axisNameWidget: Text(
'Counts of rides on days'.tr,
style: AppStyle.title,
),
axisNameSize: 30,
sideTitles: const SideTitles(
reservedSize: 30, showTitles: true)),
),
gridData: const FlGridData(
show: true,
),
borderData: FlBorderData(
show: true,
border: const Border(
bottom:
BorderSide(color: AppColor.accentColor),
left: BorderSide(color: AppColor.accentColor),
),
),
),
),
),
),
Padding(
padding: const EdgeInsets.all(8.0),
child: Container(
decoration: AppStyle.boxDecoration1,
child: durationController.monthlyList.isEmpty
? SizedBox(
height: Get.height * .2,
child: Center(
child: Text(
"No data yet".tr,
style: AppStyle.title,
),
),
)
: DriverStatsTable(
monthlyList:
durationController.monthlyList,
)))
], ],
), ),
) )
@@ -109,103 +296,172 @@ class RideCalculateDriver extends StatelessWidget {
} }
} }
// class BarChartWidget extends StatelessWidget { class DriverStatsTable extends StatelessWidget {
// const BarChartWidget({super.key}); final List monthlyList;
// @override const DriverStatsTable({Key? key, required this.monthlyList})
// Widget build(BuildContext context) { : super(key: key);
// final durationController = Get.put(DurationController());
// return Obx(() {
// final data = durationController.data;
// double maxDuration = 0;
// // Find the maximum duration to determine the maximum height of the bars @override
// for (final entry in data) { Widget build(BuildContext context) {
// final durationInHours = entry.totalDuration.inHours.toDouble(); return Container(
// if (durationInHours > maxDuration) { decoration: BoxDecoration(
// maxDuration = durationInHours; borderRadius: BorderRadius.circular(10),
// } color: Colors.white,
// } boxShadow: [
BoxShadow(
color: Colors.grey.withOpacity(0.5),
spreadRadius: 2,
blurRadius: 5,
offset: const Offset(0, 3),
),
],
),
padding: const EdgeInsets.all(16),
child: DataTable(
columnSpacing: 12,
columns: [
DataColumn(label: Text('Statistic'.tr)),
DataColumn(label: Text('Value'.tr)),
],
rows: _buildRows(),
),
);
}
// return durationController.isLoading List<DataRow> _buildRows() {
// ? const Center( return [
// child: MyCircularProgressIndicator(), DataRow(cells: [
// ) DataCell(Text(
// : Column( 'Total Orders'.tr,
// children: [ style: AppStyle.title,
// Text( )),
// 'Average of Hours of ${AppInformation.appName} is ON for this month' DataCell(Text(
// .tr, monthlyList[0]['total_orders'].toString(),
// style: AppStyle.title, style: AppStyle.number,
// ), )),
// Padding( ]),
// padding: const EdgeInsets.all(8.0), DataRow(cells: [
// child: Container( DataCell(Text(
// height: Get.height * .7, 'Completed'.tr,
// decoration: AppStyle.boxDecoration, style: AppStyle.title,
// child: ListView.builder( )),
// scrollDirection: Axis.horizontal, DataCell(Text(
// itemCount: data.length, monthlyList[0]['completed_orders'].toString(),
// itemBuilder: (context, index) { style: AppStyle.number,
// final entry = data[index]; )),
// final durationInHours = ]),
// entry.totalDuration.inHours.toDouble(); DataRow(cells: [
// final dayLabel = entry.day.day.toString(); DataCell(Text(
'Canceled Orders'.tr,
style: AppStyle.title,
)),
DataCell(Text(
monthlyList[0]['canceled_orders'].toString(),
style: AppStyle.number,
)),
]),
DataRow(cells: [
DataCell(Text(
'Rejected Orders'.tr,
style: AppStyle.title,
)),
DataCell(Text(
monthlyList[0]['rejected_orders'].toString(),
style: AppStyle.number,
)),
]),
DataRow(cells: [
DataCell(Text(
'Percent Rejected'.tr,
style: AppStyle.title,
)),
DataCell(Text(
'${(monthlyList[0]['percent_rejected']).toString()}%',
style: AppStyle.number.copyWith(
color: double.parse(monthlyList[0]['percent_canceled']) < .3
? AppColor.greenColor
: AppColor.redColor),
)),
]),
DataRow(cells: [
DataCell(Text(
'Percent Canceled'.tr,
style: AppStyle.title,
)),
DataCell(Text(
'${(monthlyList[0]['percent_canceled']).toString()}%',
style: AppStyle.number.copyWith(
color: double.parse(monthlyList[0]['percent_canceled']) < .3
? AppColor.greenColor
: AppColor.redColor),
)),
]),
DataRow(cells: [
DataCell(Text(
'Percent Completed'.tr,
style: AppStyle.title,
)),
DataCell(Text(
'${(monthlyList[0]['percent_completed']).toString()}%',
style: AppStyle.number.copyWith(
color: double.parse(monthlyList[0]['percent_completed']) > .7
? AppColor.greenColor
: AppColor.redColor),
)),
]),
];
}
}
// return Padding( class StaticDriverOrder extends StatelessWidget {
// padding: const EdgeInsets.symmetric(horizontal: 4), const StaticDriverOrder({
// child: AnimatedBuilder( Key? key,
// // animation: durationController.animationController, required this.title,
// builder: (context, child) { required this.jsonTitle,
// final animationValue = }) : super(key: key);
// durationController.animationController.value;
// final animatedValue =
// (durationInHours / maxDuration) *
// animationValue;
// return Column( final String title, jsonTitle;
// mainAxisAlignment: MainAxisAlignment.end,
// children: [ @override
// Transform( Widget build(BuildContext context) {
// transform: Matrix4.identity() return Container(
// ..setEntry(3, 2, margin: const EdgeInsets.all(8.0),
// 0.001) // Apply perspective for a 3D effect padding: const EdgeInsets.all(16.0),
// ..rotateX(-0.5 * decoration: BoxDecoration(
// animatedValue), // Rotate around X-axis color: Colors.white,
// alignment: Alignment.bottomCenter, borderRadius: BorderRadius.circular(10.0),
// child: Container( boxShadow: [
// width: 20, BoxShadow(
// height: color: Colors.grey.withOpacity(0.3),
// (durationInHours / maxDuration) * 400, spreadRadius: 3,
// color: durationInHours > 8 blurRadius: 5,
// ? AppColor.greenColor offset: const Offset(0, 3), // changes position of shadow
// : AppColor.yellowColor, ),
// child: Center( ],
// child: Text( ),
// durationInHours.toStringAsFixed( child: Column(
// 0, mainAxisAlignment: MainAxisAlignment.center,
// ), // Display the duration value inside the bar children: [
// style: const TextStyle( Text(
// color: Colors.white, title,
// fontWeight: FontWeight.bold, style: const TextStyle(
// ), fontSize: 16,
// ), fontWeight: FontWeight.bold,
// ), color: Colors.black54,
// ), ),
// ), ),
// const SizedBox(height: 4), const SizedBox(height: 8.0),
// Text(dayLabel), Text(
// ], jsonTitle,
// ); style: const TextStyle(
// }, fontSize: 18,
// ), fontWeight: FontWeight.bold,
// ); color: Colors.black,
// }, ),
// ), ),
// ), ],
// ), ),
// ], );
// ); }
// }); }
// }
// }

View File

@@ -1,3 +1,6 @@
import 'dart:io';
import 'package:firebase_auth/firebase_auth.dart';
import 'package:flutter/gestures.dart'; import 'package:flutter/gestures.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter_widget_from_html/flutter_widget_from_html.dart'; import 'package:flutter_widget_from_html/flutter_widget_from_html.dart';
@@ -7,9 +10,9 @@ import '../../../constant/box_name.dart';
import '../../../constant/colors.dart'; import '../../../constant/colors.dart';
import '../../../constant/info.dart'; import '../../../constant/info.dart';
import '../../../constant/style.dart'; import '../../../constant/style.dart';
import '../../../controller/auth/apple_sigin.dart';
import '../../../controller/auth/captin/login_captin_controller.dart'; import '../../../controller/auth/captin/login_captin_controller.dart';
import '../../../controller/auth/google_sign.dart'; import '../../../controller/auth/google_sign.dart';
import '../../../controller/functions/location_background_controller.dart';
import '../../../main.dart'; import '../../../main.dart';
import '../../widgets/elevated_btn.dart'; import '../../widgets/elevated_btn.dart';
import '../../widgets/my_scafold.dart'; import '../../widgets/my_scafold.dart';
@@ -19,7 +22,7 @@ class LoginCaptin extends StatelessWidget {
// final controller = Get.put(LoginCaptinController()); // final controller = Get.put(LoginCaptinController());
LoginCaptin({super.key}); LoginCaptin({super.key});
final AuthController authController = Get.put(AuthController());
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
Get.put(LoginCaptinController()); Get.put(LoginCaptinController());
@@ -177,7 +180,7 @@ class LoginCaptin extends StatelessWidget {
Center( Center(
child: Container( child: Container(
decoration: AppStyle.boxDecoration1, decoration: AppStyle.boxDecoration1,
height: Get.height * .6, height: Get.height * .7,
width: Get.width * .9, width: Get.width * .9,
child: Column( child: Column(
mainAxisAlignment: MainAxisAlignment.spaceAround, mainAxisAlignment: MainAxisAlignment.spaceAround,
@@ -208,6 +211,35 @@ class LoginCaptin extends StatelessWidget {
}, },
kolor: AppColor.redColor, kolor: AppColor.redColor,
), ),
!Platform.isAndroid
? MyElevatedButton(
title: 'Sign In by Apple'.tr,
onPressed: () async {
User? user = await authController
.signInWithApple();
if (user != null) {
print(
"Successfully signed in: ${user.email}");
print(
"Successfully signed in: ${user.uid}");
box.write(BoxName.driverID, user.uid);
box.write(
BoxName.emailDriver, user.email);
Get.find<LoginCaptinController>()
.loginFromSignInGoogle(
box.read(BoxName.driverID).toString(),
box
.read(BoxName.emailDriver)
.toString(),
);
// Navigate to another screen or perform other actions
} else {
print("Sign-in failed");
}
},
kolor: AppColor.primaryColor,
)
: const SizedBox(),
// MyElevatedButton( // MyElevatedButton(
// title: 'Sign In by Google'.tr, // title: 'Sign In by Google'.tr,
// onPressed: () async { // onPressed: () async {
@@ -297,7 +329,7 @@ class LoginCaptin extends StatelessWidget {
RichText( RichText(
text: TextSpan( text: TextSpan(
text: text:
'By selecting "I Agree" below, I have reviewed and agree to the Terms of Use and acknowledge the ' "By selecting 'I Agree' below, I have reviewed and agree to the Terms of Use and acknowledge the "
.tr, .tr,
style: AppStyle.title, style: AppStyle.title,
children: <TextSpan>[ children: <TextSpan>[
@@ -318,8 +350,8 @@ class LoginCaptin extends StatelessWidget {
), ),
)); ));
}), }),
const TextSpan( TextSpan(
text: '. I am at least 18 years of age.', text: '. I am at least 18 years of age.'.tr,
), ),
], ],
), ),

View File

@@ -1,4 +1,5 @@
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter/widgets.dart';
import 'package:get/get.dart'; import 'package:get/get.dart';
import 'package:SEFER/constant/colors.dart'; import 'package:SEFER/constant/colors.dart';
import 'package:SEFER/constant/style.dart'; import 'package:SEFER/constant/style.dart';
@@ -20,14 +21,17 @@ class HelpCaptain extends StatelessWidget {
body: [ body: [
Column( Column(
children: [ children: [
Card( Padding(
color: AppColor.yellowColor, padding: const EdgeInsets.all(8.0),
child: Padding( child: Container(
padding: const EdgeInsets.all(8.0), decoration: AppStyle.boxDecoration1,
child: Text( child: Padding(
'If you need any help or have question this is right site to do that and your welcome' padding: const EdgeInsets.all(8.0),
.tr, child: Text(
style: AppStyle.title, 'If you need any help or have question this is right site to do that and your welcome'
.tr,
style: AppStyle.title,
),
), ),
), ),
), ),
@@ -80,70 +84,84 @@ class HelpCaptain extends StatelessWidget {
), ),
)), )),
GetBuilder<HelpController>( GetBuilder<HelpController>(
builder: (helpController) => Container( builder: (helpController) => Padding(
height: 400, padding: const EdgeInsets.all(10),
decoration: AppStyle.boxDecoration, child: Container(
child: ListView.builder( height: Get.height * .45,
itemCount: helpController.helpQuestionDate['message'] != decoration: AppStyle.boxDecoration,
null child: ListView.builder(
? helpController.helpQuestionDate['message'].length itemCount:
: 0, helpController.helpQuestionDate['message'] != null
itemBuilder: (BuildContext context, int index) { ? helpController
// if (helpController.helpQuestionDate['message'] == .helpQuestionDate['message'].length
// null) { : 0,
// return const CircularProgressIndicator(); itemBuilder: (BuildContext context, int index) {
// } // if (helpController.helpQuestionDate['message'] ==
var list = // null) {
helpController.helpQuestionDate['message'][index]; // return const CircularProgressIndicator();
return Padding( // }
padding: const EdgeInsets.all(3), var list = helpController
child: Container( .helpQuestionDate['message'][index];
decoration: BoxDecoration( return helpController
border: Border.all( .helpQuestionDate['message'].length ==
color: AppColor.greenColor, 0
width: 3, ? Center(
), child: Text(
borderRadius: BorderRadius.circular(11)), 'text',
// elevation: 3, style: AppStyle.title,
// color: AppColor.greenColor, ),
child: GestureDetector( )
onTap: () { : Padding(
print(list['id']); padding: const EdgeInsets.all(3),
helpController.getindex( child: Container(
list['id'], list['helpQuestion']); decoration: BoxDecoration(
helpController border: Border.all(
.getHelpRepley(list['id'].toString()); color: AppColor.greenColor,
Get.to( width: 3,
() => const HelpDetailsReplayPage(), ),
borderRadius:
BorderRadius.circular(11)),
// elevation: 3,
// color: AppColor.greenColor,
child: GestureDetector(
onTap: () {
print(list['id']);
helpController.getindex(
list['id'], list['helpQuestion']);
helpController.getHelpRepley(
list['id'].toString());
Get.to(
() => const HelpDetailsReplayPage(),
);
},
child: Padding(
padding: const EdgeInsets.all(2),
child: Row(
mainAxisAlignment:
MainAxisAlignment.spaceBetween,
children: [
SizedBox(
width: Get.width * .6,
child: Text(
list['helpQuestion'],
style: AppStyle.title,
),
),
SizedBox(
width: Get.width * .3,
child: Text(
list['datecreated'],
style: AppStyle.subtitle,
),
),
],
),
),
),
),
); );
}, },
child: Padding( ),
padding: const EdgeInsets.all(2),
child: Row(
mainAxisAlignment:
MainAxisAlignment.spaceBetween,
children: [
SizedBox(
width: Get.width * .6,
child: Text(
list['helpQuestion'],
style: AppStyle.title,
),
),
SizedBox(
width: Get.width * .3,
child: Text(
list['datecreated'],
style: AppStyle.subtitle,
),
),
],
),
),
),
),
);
},
), ),
)), )),
], ],

View File

@@ -1,4 +1,3 @@
import 'package:SEFER/controller/payment/paymob.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:get/get.dart'; import 'package:get/get.dart';
import 'package:google_maps_flutter/google_maps_flutter.dart'; import 'package:google_maps_flutter/google_maps_flutter.dart';
@@ -13,6 +12,7 @@ import '../../../../constant/table_names.dart';
import '../../../../controller/functions/location_controller.dart'; import '../../../../controller/functions/location_controller.dart';
import '../../../../controller/home/captin/home_captain_controller.dart'; import '../../../../controller/home/captin/home_captain_controller.dart';
import '../../../../controller/home/captin/order_request_controller.dart'; import '../../../../controller/home/captin/order_request_controller.dart';
import '../../../widgets/circle_container.dart';
import 'widget/connect.dart'; import 'widget/connect.dart';
import 'widget/left_menu_map_captain.dart'; import 'widget/left_menu_map_captain.dart';
import '../../../../controller/home/payment/captain_wallet_controller.dart'; import '../../../../controller/home/payment/captain_wallet_controller.dart';
@@ -30,37 +30,26 @@ class HomeCaptain extends StatelessWidget {
Get.put(HomeCaptainController()); Get.put(HomeCaptainController());
return Scaffold( return Scaffold(
appBar: AppBar( appBar: AppBar(
backgroundColor: AppColor.greenColor, // backgroundColor: AppColor.accentColor,
elevation: 0, elevation: 1,
title: Text('Home'.tr), title: Text('Home'.tr),
actions: [ actions: [
GetBuilder<LocationController>( GetBuilder<OrderRequestController>(
builder: (locationController) => locationController.isLoading builder: (orderRequestController) => MyCircleContainer(
? const SizedBox( child: Text(
height: 1, orderRequestController.countRefuse.toString(),
width: 1, style: AppStyle.title,
child: CircularProgressIndicator.adaptive()) ))),
: const SizedBox(),
),
IconButton( IconButton(
// onPressed: () => box.remove(BoxName.periods), // onPressed: () => box.remove(BoxName.periods),
onPressed: () => sql.deleteAllData(TableName.driverOrdersRefuse), onPressed: () => sql.deleteAllData(TableName.driverOrdersRefuse),
icon: const Icon(Icons.remove)), icon: const Icon(Icons.remove)),
GetBuilder<OrderRequestController>( // GetBuilder<OrderRequestController>(
builder: (orderRequestController) => IconButton( // builder: (orderRequestController) => IconButton(
onPressed: () => // onPressed: () =>
orderRequestController.getRefusedOrderByCaptain(), // orderRequestController.getRefusedOrderByCaptain(),
icon: const Icon(Icons.get_app)), // icon: const Icon(Icons.get_app)),
), // ),
IconButton(
onPressed: () {
PaymobManager().getPaymentKey(100, 'EGP');
},
icon: const Icon(
Icons.call,
size: 29,
),
),
], ],
), ),
drawer: DrawerCaptain(), drawer: DrawerCaptain(),
@@ -134,7 +123,7 @@ class HomeCaptain extends StatelessWidget {
color: AppColor.yellowColor, color: AppColor.yellowColor,
), ),
Text( Text(
'${' You Have in'.tr} ${AppInformation.appName} is ${homeCaptainController.totalMoneyInSEFER} ', '${' You Have in'.tr} ${AppInformation.appName} ${homeCaptainController.totalMoneyInSEFER} ',
style: AppStyle.title, style: AppStyle.title,
), ),
], ],
@@ -143,7 +132,7 @@ class HomeCaptain extends StatelessWidget {
mainAxisAlignment: MainAxisAlignment.spaceAround, mainAxisAlignment: MainAxisAlignment.spaceAround,
children: [ children: [
Text( Text(
'Total points is '.tr + 'Total Budget is '.tr +
Get.find<CaptainWalletController>().totalPoints, Get.find<CaptainWalletController>().totalPoints,
style: AppStyle.title, style: AppStyle.title,
), ),

View File

@@ -1,3 +1,5 @@
import 'package:SEFER/constant/box_name.dart';
import 'package:SEFER/main.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter_font_icons/flutter_font_icons.dart'; import 'package:flutter_font_icons/flutter_font_icons.dart';
import 'package:get/get.dart'; import 'package:get/get.dart';
@@ -13,43 +15,43 @@ import '../../../../../controller/functions/location_controller.dart';
GetBuilder<HomeCaptainController> leftMainMenuCaptainIcons() { GetBuilder<HomeCaptainController> leftMainMenuCaptainIcons() {
return GetBuilder<HomeCaptainController>( return GetBuilder<HomeCaptainController>(
builder: (controller) => Positioned( builder: (controller) => Positioned(
bottom: Get.height * .17, bottom: Get.height * .2,
left: 6, left: 6,
child: Column( child: Column(
children: [ children: [
AnimatedContainer( // AnimatedContainer(
duration: const Duration(microseconds: 200), // duration: const Duration(microseconds: 200),
width: controller.widthMapTypeAndTraffic, // width: controller.widthMapTypeAndTraffic,
decoration: BoxDecoration( // decoration: BoxDecoration(
border: Border.all(), // border: Border.all(),
color: AppColor.secondaryColor, // color: AppColor.secondaryColor,
borderRadius: BorderRadius.circular(15)), // borderRadius: BorderRadius.circular(15)),
child: IconButton( // child: IconButton(
onPressed: () { // onPressed: () {
AC credentials = AC(); // AC credentials = AC();
String apiKey = '21010e54b50f41a4904708c526e102df'; // String apiKey = '21010e54b50f41a4904708c526e102df';
String convertedStringN = credentials.c( // String convertedStringN = credentials.c(
credentials.c(credentials.c(apiKey, cs), cC), cn); // credentials.c(credentials.c(apiKey, cs), cC), cn);
print('Converted v: $convertedStringN'); // print('Converted v: $convertedStringN');
String retrievedStringS = credentials.r( // String retrievedStringS = credentials.r(
credentials.r(credentials.r(convertedStringN, cn), cC), // credentials.r(credentials.r(convertedStringN, cn), cC),
cs); // cs);
print('Retrieved String: $retrievedStringS'); // print('Retrieved String: $retrievedStringS');
// // //
if (retrievedStringS == apiKey) { // if (retrievedStringS == apiKey) {
print('same'); // print('same');
} // }
}, // },
icon: const Icon( // icon: const Icon(
FontAwesome.map_signs, // FontAwesome.map_signs,
size: 24, // size: 24,
color: Colors.black, // color: Colors.black,
)), // )),
), // ),
const SizedBox( // const SizedBox(
height: 5, // height: 5,
), // ),
AnimatedContainer( AnimatedContainer(
duration: const Duration(microseconds: 200), duration: const Duration(microseconds: 200),
width: controller.widthMapTypeAndTraffic, width: controller.widthMapTypeAndTraffic,
@@ -113,6 +115,9 @@ GetBuilder<HomeCaptainController> leftMainMenuCaptainIcons() {
), ),
), ),
), ),
const SizedBox(
height: 5,
),
AnimatedContainer( AnimatedContainer(
duration: const Duration(microseconds: 200), duration: const Duration(microseconds: 200),
width: controller.widthMapTypeAndTraffic, width: controller.widthMapTypeAndTraffic,
@@ -122,7 +127,25 @@ GetBuilder<HomeCaptainController> leftMainMenuCaptainIcons() {
borderRadius: BorderRadius.circular(15)), borderRadius: BorderRadius.circular(15)),
child: IconButton( child: IconButton(
onPressed: () { onPressed: () {
Get.to(() => RideCalculateDriver()); final now = DateTime.now();
DateTime? lastRequestTime =
box.read(BoxName.lastTimeStaticThrottle);
if (lastRequestTime == null ||
now.difference(lastRequestTime).inMinutes >= 15) {
// Update the last request time to now
lastRequestTime = now;
box.write(BoxName.lastTimeStaticThrottle, lastRequestTime);
// Navigate to the RideCalculateDriver page
Get.to(() => RideCalculateDriver());
} else {
// Optionally show a message or handle the throttling case
final minutesLeft =
15 - now.difference(lastRequestTime).inMinutes;
Get.snackbar(
'Please wait $minutesLeft minutes before trying again.',
'');
}
}, },
icon: const Icon(FontAwesome5.chart_bar), icon: const Icon(FontAwesome5.chart_bar),
), ),

View File

@@ -47,8 +47,8 @@ GetBuilder<MapDriverController> driverEndRideBar() {
const Icon(Icons.timelapse), const Icon(Icons.timelapse),
Text( Text(
mapDriverController.hours > 1 mapDriverController.hours > 1
? '${'${'Your Ride Duration is '.tr}${mapDriverController.hours}${' H and'.tr}'} ${mapDriverController.minutes} m' ? '${'${mapDriverController.hours}${' H and'.tr}'} ${mapDriverController.minutes} m'
: '${'Your Ride Duration is '.tr} ${mapDriverController.minutes} ${'m'.tr}', : '${mapDriverController.minutes} ${'m'.tr}',
style: AppStyle.title), style: AppStyle.title),
], ],
), ),
@@ -148,18 +148,20 @@ GetBuilder<MapDriverController> driverEndRideBar() {
) )
], ],
) )
: const SizedBox(), : Row(
mapDriverController.remainingTimeTimerRideBegin < 60
? Row(
mainAxisAlignment: MainAxisAlignment.spaceAround, mainAxisAlignment: MainAxisAlignment.spaceAround,
children: [ children: [
MyElevatedButton( mapDriverController.remainingTimeTimerRideBegin <
title: 'End Ride'.tr, 60
onPressed: () { ? MyElevatedButton(
mapDriverController.finishRideFromDriver(); title: 'End Ride'.tr,
}, onPressed: () {
kolor: AppColor.redColor, mapDriverController
), .finishRideFromDriver();
},
kolor: AppColor.redColor,
)
: const SizedBox(),
Container( Container(
decoration: AppStyle.boxDecoration1, decoration: AppStyle.boxDecoration1,
child: Text( child: Text(
@@ -168,8 +170,7 @@ GetBuilder<MapDriverController> driverEndRideBar() {
), ),
) )
], ],
) ),
: const SizedBox(),
mapDriverController.carType != 'Comfort' && mapDriverController.carType != 'Comfort' &&
mapDriverController.carType != 'Mashwari' mapDriverController.carType != 'Mashwari'
? Stack( ? Stack(

View File

@@ -92,7 +92,7 @@ class OrderRequestPage extends StatelessWidget {
// SizedBox(height: 200, child: Text(pointsList.toString())), // SizedBox(height: 200, child: Text(pointsList.toString())),
// Text(message.notification!.body.toString()), // Text(message.notification!.body.toString()),
SizedBox( SizedBox(
height: Get.height * .2, height: Get.height * .3,
child: GoogleMap( child: GoogleMap(
initialCameraPosition: CameraPosition( initialCameraPosition: CameraPosition(
zoom: 12, zoom: 12,
@@ -357,11 +357,13 @@ class OrderRequestPage extends StatelessWidget {
'step2': myList[23].toString(), 'step2': myList[23].toString(),
'step3': myList[24].toString(), 'step3': myList[24].toString(),
'step4': myList[25].toString(), 'step4': myList[25].toString(),
'passengerWalletBurc': myList[26].toString(), 'passengerWalletBurc': myList[27].toString(),
'timeOfOrder': DateTime.now().toString(), 'timeOfOrder': DateTime.now().toString(),
'totalPassenger': myList[2].toString(), 'totalPassenger': myList[2].toString(),
'carType': myList[31].toString(), 'carType': myList[31].toString(),
'kazan': myList[32].toString(), 'kazan': myList[32].toString(),
'startNameLocation': myList[29].toString(),
'endNameLocation': myList[30].toString(),
}); });
}, },
), ),

View File

@@ -34,6 +34,10 @@ class PointsCaptain extends StatelessWidget {
titleStyle: AppStyle.title, titleStyle: AppStyle.title,
content: Column( content: Column(
children: [ children: [
Text(
'${'you can buy '.tr}$countPoint ${'LE'.tr}${'by '.tr}${'$pricePoint'.tr}',
style: AppStyle.title,
),
MyElevatedButton( MyElevatedButton(
title: '💳 Pay with Credit Card'.tr, title: '💳 Pay with Credit Card'.tr,
onPressed: () async { onPressed: () async {
@@ -55,7 +59,7 @@ class PointsCaptain extends StatelessWidget {
), ),
// Add some spacing between buttons // Add some spacing between buttons
MyElevatedButton( MyElevatedButton(
kolor: AppColor.yellowColor, kolor: AppColor.redColor,
title: '💰 Pay with Wallet'.tr, title: '💰 Pay with Wallet'.tr,
onPressed: () async { onPressed: () async {
Get.back(); Get.back();
@@ -86,30 +90,34 @@ class PointsCaptain extends StatelessWidget {
await captainWalletController.getCaptainWalletFromBuyPoints(); await captainWalletController.getCaptainWalletFromBuyPoints();
}); });
}, },
child: Container( child: Padding(
width: Get.width * .22, padding: const EdgeInsets.symmetric(horizontal: 3, vertical: 8),
height: Get.width * .15, child: Container(
margin: const EdgeInsets.all(4), width: Get.width * .22,
decoration: BoxDecoration( height: Get.width * .22,
color: kolor, margin: const EdgeInsets.all(4),
border: Border.all(color: AppColor.accentColor), decoration: BoxDecoration(
borderRadius: BorderRadius.circular(12), color: kolor,
shape: BoxShape.rectangle, border: Border.all(color: AppColor.accentColor),
), borderRadius: BorderRadius.circular(12),
child: Center( shape: BoxShape.rectangle,
child: Column(
children: [
Text(
'$countPoint ${'Point'.tr}',
style: AppStyle.subtitle,
),
Text(
'$pricePoint ${box.read(BoxName.countryCode) == 'Jordan' ? 'JOD'.tr : 'LE'.tr}',
style: AppStyle.title,
),
],
), ),
)), child: Center(
child: Column(
children: [
Text(
'$countPoint ${'Point'.tr}',
style: AppStyle.subtitle,
),
Text(
'$pricePoint ${box.read(BoxName.countryCode) == 'Jordan' ? 'JOD'.tr : 'LE'.tr}',
style: AppStyle.title,
textAlign: TextAlign.center,
),
],
),
)),
),
); );
} }
} }

View File

@@ -1,4 +1,5 @@
import 'package:SEFER/controller/functions/tts.dart'; import 'package:SEFER/controller/functions/tts.dart';
import 'package:SEFER/controller/home/captin/map_driver_controller.dart';
import 'package:SEFER/views/home/my_wallet/payment_history_driver_page.dart'; import 'package:SEFER/views/home/my_wallet/payment_history_driver_page.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:get/get.dart'; import 'package:get/get.dart';
@@ -14,8 +15,10 @@ import 'package:SEFER/views/widgets/my_textField.dart';
import 'package:SEFER/views/widgets/mycircular.dart'; import 'package:SEFER/views/widgets/mycircular.dart';
import 'package:path/path.dart'; import 'package:path/path.dart';
import '../../../controller/payment/driver_payment_controller.dart';
import '../../widgets/my_scafold.dart'; import '../../widgets/my_scafold.dart';
import 'points_captain.dart'; import 'points_captain.dart';
import 'weekly_payment_page.dart';
class WalletCaptain extends StatelessWidget { class WalletCaptain extends StatelessWidget {
WalletCaptain({super.key}); WalletCaptain({super.key});
@@ -23,7 +26,7 @@ class WalletCaptain extends StatelessWidget {
Get.put(CaptainWalletController()); Get.put(CaptainWalletController());
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
// Get.put(MapPassengerController()); Get.put(MapDriverController()).totalPassenger = '0';
return MyScafolld( return MyScafolld(
title: 'Driver Wallet'.tr, title: 'Driver Wallet'.tr,
body: [ body: [
@@ -38,20 +41,20 @@ class WalletCaptain extends StatelessWidget {
children: [ children: [
const SizedBox(), const SizedBox(),
Container( Container(
decoration: AppStyle.boxDecoration.copyWith( // decoration: AppStyle.boxDecoration1.copyWith(
color: double.parse(captainWalletController color: double.parse(
.totalPoints) < captainWalletController.totalPoints) <
0 && 0 &&
double.parse(captainWalletController double.parse(
.totalPoints) > captainWalletController.totalPoints) >
-300 -300
? AppColor.yellowColor ? AppColor.yellowColor
: double.parse(captainWalletController : double.parse(
.totalPoints) < captainWalletController.totalPoints) <
-300 -300
? AppColor.redColor ? AppColor.redColor
: AppColor.greenColor, : AppColor.greenColor,
), // ),
child: InkWell( child: InkWell(
onTap: () { onTap: () {
Get.snackbar( Get.snackbar(
@@ -69,6 +72,7 @@ class WalletCaptain extends StatelessWidget {
child: Text( child: Text(
'${'Total Points is'.tr} ${captainWalletController.totalPoints.toString()} 💎', '${'Total Points is'.tr} ${captainWalletController.totalPoints.toString()} 💎',
style: AppStyle.headTitle2, style: AppStyle.headTitle2,
textAlign: TextAlign.center,
), ),
), ),
), ),
@@ -111,8 +115,8 @@ class WalletCaptain extends StatelessWidget {
Get.snackbar( Get.snackbar(
icon: InkWell( icon: InkWell(
onTap: () async { onTap: () async {
await Get.find< await Get.put(
TextToSpeechController>() TextToSpeechController())
.speakText( .speakText(
'This amount for all trip I get from Passengers' 'This amount for all trip I get from Passengers'
.tr); .tr);
@@ -255,86 +259,89 @@ class WalletCaptain extends StatelessWidget {
const SizedBox( const SizedBox(
height: 10, height: 10,
), ),
Container( Padding(
decoration: AppStyle.boxDecoration, padding: const EdgeInsets.all(8.0),
child: Column( child: Container(
children: [ decoration: AppStyle.boxDecoration,
Text( child: Column(
'You can buy Points to let you online\nby this list below' children: [
.tr, Text(
textAlign: TextAlign.center, 'You can buy Points to let you online\nby this list below'
style: AppStyle.title, .tr,
), textAlign: TextAlign.center,
const Divider( style: AppStyle.title,
indent: 30, ),
endIndent: 30, const Divider(
color: AppColor.accentColor, indent: 30,
thickness: 3, endIndent: 30,
), color: AppColor.accentColor,
const SizedBox( thickness: 3,
height: 10, ),
), const SizedBox(
Container( height: 10,
decoration: AppStyle.boxDecoration, ),
height: Get.height * .1, Container(
child: ListView( decoration: AppStyle.boxDecoration,
scrollDirection: Axis.horizontal, height: Get.height * .19,
children: [ child: ListView(
PointsCaptain( scrollDirection: Axis.horizontal,
kolor: AppColor.blueColor, children: [
pricePoint: PointsCaptain(
box.read(BoxName.countryCode) == kolor: AppColor.blueColor,
'Jordan' pricePoint:
? 5 box.read(BoxName.countryCode) ==
: 100, 'Jordan'
countPoint: ? 5
box.read(BoxName.countryCode) == : 100,
'Jordan' countPoint:
? '300' box.read(BoxName.countryCode) ==
: '100', 'Jordan'
), ? '300'
PointsCaptain( : '100',
kolor: Colors.green, ),
pricePoint: PointsCaptain(
box.read(BoxName.countryCode) == kolor: Colors.green,
'Jordan' pricePoint:
? 10 box.read(BoxName.countryCode) ==
: 200, 'Jordan'
countPoint: ? 10
box.read(BoxName.countryCode) == : 200,
'Jordan' countPoint:
? '1040' box.read(BoxName.countryCode) ==
: '210', 'Jordan'
), ? '1040'
PointsCaptain( : '210',
kolor: Colors.amberAccent, ),
pricePoint: PointsCaptain(
box.read(BoxName.countryCode) == kolor: Colors.amberAccent,
'Jordan' pricePoint:
? 22 box.read(BoxName.countryCode) ==
: 400, 'Jordan'
countPoint: ? 22
box.read(BoxName.countryCode) == : 400,
'Jordan' countPoint:
? '2300' box.read(BoxName.countryCode) ==
: '450', 'Jordan'
), ? '2300'
PointsCaptain( : '450',
kolor: AppColor.yellowColor, ),
pricePoint: PointsCaptain(
box.read(BoxName.countryCode) == kolor: AppColor.yellowColor,
'Jordan' pricePoint:
? 50 box.read(BoxName.countryCode) ==
: 1000, 'Jordan'
countPoint: ? 50
box.read(BoxName.countryCode) == : 1000,
'Jordan' countPoint:
? '55000' box.read(BoxName.countryCode) ==
: '1200', 'Jordan'
), ? '55000'
], : '1200',
)), ),
], ],
)),
],
),
), ),
), ),
const SizedBox( const SizedBox(
@@ -362,17 +369,30 @@ class WalletCaptain extends StatelessWidget {
height: 30, height: 30,
), ),
Padding( Padding(
padding: const EdgeInsets.symmetric(horizontal: 30), padding: const EdgeInsets.symmetric(horizontal: 10),
child: Row( child: Row(
mainAxisAlignment: MainAxisAlignment.spaceAround,
children: [ children: [
MyElevatedButton( MyElevatedButton(
kolor: AppColor.blueColor, kolor: AppColor.blueColor,
title: 'Payment History'.tr, title: 'Payment History'.tr,
onPressed: () { onPressed: () async {
await Get.put(DriverWalletHistoryController())
.getArchivePayment();
Get.to(() => const PaymentHistoryDriverPage(), Get.to(() => const PaymentHistoryDriverPage(),
transition: Transition.size); transition: Transition.size);
}, },
), ),
MyElevatedButton(
kolor: AppColor.blueColor,
title: 'Weekly Budget'.tr,
onPressed: () async {
await Get.put(DriverWalletHistoryController())
.getWeekllyArchivePayment();
Get.to(() => const WeeklyPaymentPage(),
transition: Transition.size);
},
),
], ],
), ),
), ),

View File

@@ -0,0 +1,96 @@
import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:SEFER/constant/colors.dart';
import 'package:SEFER/constant/style.dart';
import 'package:SEFER/views/widgets/my_scafold.dart';
import 'package:SEFER/views/widgets/mycircular.dart';
import '../../../controller/payment/driver_payment_controller.dart';
class WeeklyPaymentPage extends StatelessWidget {
const WeeklyPaymentPage({super.key});
@override
Widget build(BuildContext context) {
Get.put(DriverWalletHistoryController());
return MyScafolld(
title: 'Payment History'.tr,
body: [
GetBuilder<DriverWalletHistoryController>(
builder: (controller) => controller.isLoading
? const MyCircularProgressIndicator()
: Column(
children: [
Container(
width: Get.width * .8,
decoration: AppStyle.boxDecoration1,
child: Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Container(
decoration: AppStyle.boxDecoration1,
child: Text(
controller.weeklyList[0]['totalAmount']
.toString(),
style: AppStyle.title,
),
),
Text(
' Total weekly points is '.tr,
style: AppStyle.title,
),
],
),
),
const SizedBox(
height: 10,
),
SizedBox(
height: Get.height * .8,
child: ListView.builder(
itemCount: controller.weeklyList.length,
itemBuilder: (BuildContext context, int index) {
var list = controller.weeklyList[index];
return Padding(
padding: const EdgeInsets.all(2.0),
child: Container(
decoration: AppStyle.boxDecoration1,
child: Padding(
padding: const EdgeInsets.all(4),
child: Row(
mainAxisAlignment:
MainAxisAlignment.spaceBetween,
children: [
Text(
list['amount'],
style: AppStyle.title,
),
Text(
list['dateUpdated'],
style: AppStyle.title,
),
Card(
elevation: 2,
color: list['paymentMethod'] == 'visa'
? AppColor.blueColor
: AppColor.secondaryColor,
child: Text(
list['paymentMethod'],
style: AppStyle.title,
),
),
],
),
),
),
);
},
),
),
],
),
)
],
isleading: true);
}
}

View File

@@ -1,16 +1,10 @@
import 'package:cached_network_image/cached_network_image.dart'; import 'package:SEFER/constant/style.dart';
import 'package:SEFER/views/widgets/mycircular.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:get/get.dart'; import 'package:get/get.dart';
import 'package:SEFER/constant/box_name.dart';
import 'package:SEFER/constant/style.dart';
import 'package:SEFER/controller/profile/captain_profile_controller.dart'; import 'package:SEFER/controller/profile/captain_profile_controller.dart';
import 'package:SEFER/main.dart';
import 'package:SEFER/views/widgets/elevated_btn.dart';
import 'package:SEFER/views/widgets/my_scafold.dart'; import 'package:SEFER/views/widgets/my_scafold.dart';
import '../../../constant/api_key.dart';
import '../../widgets/my_textField.dart';
class ProfileCaptain extends StatelessWidget { class ProfileCaptain extends StatelessWidget {
const ProfileCaptain({super.key}); const ProfileCaptain({super.key});
@@ -18,140 +12,332 @@ class ProfileCaptain extends StatelessWidget {
Widget build(BuildContext context) { Widget build(BuildContext context) {
Get.put(CaptainProfileController()); Get.put(CaptainProfileController());
return MyScafolld( return MyScafolld(
title: 'My Profile'.tr, title: 'My Profile'.tr,
body: [ body: [
GetBuilder<CaptainProfileController>( GetBuilder<CaptainProfileController>(
builder: (controller) => Padding( builder: (controller) => Padding(
padding: const EdgeInsets.all(16.0), padding: const EdgeInsets.all(16.0),
child: SingleChildScrollView( child: SingleChildScrollView(
child: Center( child: Center(
child: Column( child: controller.isLoading
crossAxisAlignment: CrossAxisAlignment.center, ? const MyCircularProgressIndicator()
children: [ : DriverProfileCard(
CircleAvatar( driverId:
radius: Get.width * 0.26, controller.captainProfileData['driverID'] ?? '',
backgroundColor: Colors.white, name: controller.captainProfileData['first_name'] +
backgroundImage: CachedNetworkImageProvider( ' ' +
'${AK.serverPHP}/portrate_captain_image/${box.read(BoxName.driverID)}.jpg', (controller.captainProfileData['last_name'] ?? ''),
), phoneNumber:
controller.captainProfileData['phone'] ?? '',
email: controller.captainProfileData['email'] ?? '',
birthdate:
controller.captainProfileData['birthdate'] ?? '',
gender: controller.captainProfileData['gender'] ?? '',
education:
controller.captainProfileData['education'] ?? '',
carMake: controller.captainProfileData['make'] ?? '',
carModel: controller.captainProfileData['model'] ?? '',
carPlate:
controller.captainProfileData['car_plate'] ?? '',
carColor: controller.captainProfileData['color'] ?? '',
vin: controller.captainProfileData['vin'] ?? '',
registrationDate: controller
.captainProfileData['registration_date'] ??
'',
expirationDate:
controller.captainProfileData['expiration_date'] ??
'',
ratingCount:
controller.captainProfileData['ratingCount'] ?? 0,
ratingDriver:
controller.captainProfileData['ratingDriver'] !=
null
? double.tryParse(controller
.captainProfileData['ratingDriver']
.toString()) ??
0
: null,
age: controller.captainProfileData['age'] ?? 0,
), ),
const SizedBox(height: 8.0),
Text(
box.read(BoxName.nameDriver) +
' ' +
box.read(BoxName.lastNameDriver).toString(),
style: AppStyle.title),
const SizedBox(height: 8.0),
Text('${'Email is'.tr} :${box.read(BoxName.emailDriver)}',
style: AppStyle.title),
const SizedBox(height: 8.0),
Text(
'${'Phone Number is'.tr} :${box.read(BoxName.phoneDriver)}',
style: AppStyle.title),
const SizedBox(height: 8.0),
Text(
'${'Date of Birth is'.tr} :${box.read(BoxName.dobDriver)}',
style: AppStyle.title),
const SizedBox(height: 8.0),
Text('${'Sex is '.tr}:${box.read(BoxName.sexDriver)}',
style: AppStyle.title),
const SizedBox(height: 8.0),
const Divider(
// height: 2,
endIndent: 1,
indent: 2,
thickness: 2,
),
const SizedBox(height: 8.0),
Text('Car Details'.tr, style: AppStyle.headTitle2),
const SizedBox(height: 8.0),
Text('${'VIN is'.tr} :${box.read(BoxName.vin)}',
style: AppStyle.title),
const SizedBox(height: 8.0),
Text('${'Color is '.tr} :${box.read(BoxName.color)}',
style: AppStyle.title),
const SizedBox(height: 8.0),
Text(
'${'Car Plate is '.tr} :${box.read(BoxName.carPlate)}',
style: AppStyle.title),
const SizedBox(height: 8.0),
Text('${'Make is '.tr}:${box.read(BoxName.make)}',
style: AppStyle.title),
const SizedBox(height: 8.0),
Text('${'Model is'.tr} :${box.read(BoxName.model)}',
style: AppStyle.title),
const SizedBox(height: 8.0),
Text('${'Year is'.tr} :${box.read(BoxName.year)}',
style: AppStyle.title),
const SizedBox(height: 8.0),
Text(
'${'Expiration Date '.tr} :${box.read(BoxName.expirationDate)}',
style: AppStyle.title),
const SizedBox(height: 8.0),
],
),
),
), ),
), ),
)
],
isleading: true,
action: GetBuilder<CaptainProfileController>(
builder: (controller) => IconButton(
onPressed: () {
Get.defaultDialog(
title: 'Edit Your data'.tr,
titleStyle: AppStyle.title,
content: SizedBox(
height: Get.height * .4,
child: SingleChildScrollView(
child: Column(
children: [
MyTextForm(
controller: controller.vin,
hint: 'write vin for your car'.tr,
label: 'VIN'.tr,
type: TextInputType.emailAddress,
),
MyTextForm(
controller: controller.color,
hint: 'write Color for your car'.tr,
label: 'Color'.tr,
type: TextInputType.emailAddress,
),
MyTextForm(
controller: controller.make,
hint: 'write Make for your car'.tr,
label: 'Make'.tr,
type: TextInputType.emailAddress,
),
MyTextForm(
controller: controller.model,
hint: 'write Model for your car'.tr,
label: 'Model'.tr,
type: TextInputType.emailAddress,
),
MyTextForm(
controller: controller.year,
hint: 'write Year for your car'.tr,
label: 'Year'.tr,
type: TextInputType.number,
),
MyTextForm(
controller: controller.expirationDate,
hint: 'write Expiration Date for your car'.tr,
label: 'Expiration Date'.tr,
type: TextInputType.datetime),
MyElevatedButton(
title: 'Update'.tr,
onPressed: () => controller.updateFields())
],
),
),
));
},
icon: const Icon(Icons.edit),
), ),
)); )
],
isleading: true,
// action: GetBuilder<CaptainProfileController>(
// builder: (controller) => IconButton(
// onPressed: () {
// Get.defaultDialog(
// title: 'Edit Your data'.tr,
// titleStyle: AppStyle.title,
// content: SizedBox(
// height: Get.height * .4,
// child: SingleChildScrollView(
// child: Column(
// children: [
// MyTextForm(
// controller: controller.vin,
// hint: 'write vin for your car'.tr,
// label: 'VIN'.tr,
// type: TextInputType.emailAddress,
// ),
// MyTextForm(
// controller: controller.color,
// hint: 'write Color for your car'.tr,
// label: 'Color'.tr,
// type: TextInputType.emailAddress,
// ),
// MyTextForm(
// controller: controller.make,
// hint: 'write Make for your car'.tr,
// label: 'Make'.tr,
// type: TextInputType.emailAddress,
// ),
// MyTextForm(
// controller: controller.model,
// hint: 'write Model for your car'.tr,
// label: 'Model'.tr,
// type: TextInputType.emailAddress,
// ),
// MyTextForm(
// controller: controller.year,
// hint: 'write Year for your car'.tr,
// label: 'Year'.tr,
// type: TextInputType.number,
// ),
// MyTextForm(
// controller: controller.expirationDate,
// hint: 'write Expiration Date for your car'.tr,
// label: 'Expiration Date'.tr,
// type: TextInputType.datetime),
// MyElevatedButton(
// title: 'Update'.tr,
// onPressed: () => controller.updateFields())
// ],
// ),
// ),
// ));
// },
// icon: const Icon(Icons.edit),
// ),
// )
);
}
}
class DriverProfileCard extends StatelessWidget {
final String driverId;
final String name;
final String phoneNumber;
final String email;
final String birthdate;
final String gender;
final String education;
final String carMake;
final String carModel;
final String carPlate;
final String carColor;
final String vin;
final String registrationDate;
final String expirationDate;
final int ratingCount;
final double? ratingDriver;
final int age;
DriverProfileCard({
required this.driverId,
required this.name,
required this.phoneNumber,
required this.email,
required this.birthdate,
required this.gender,
required this.education,
required this.carMake,
required this.carModel,
required this.carPlate,
required this.carColor,
required this.vin,
required this.registrationDate,
required this.expirationDate,
required this.ratingCount,
required this.ratingDriver,
required this.age,
});
@override
Widget build(BuildContext context) {
return Card(
elevation: 8,
margin: const EdgeInsets.all(16),
child: Padding(
padding: const EdgeInsets.all(16),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
style: AppStyle.title,
name,
),
const SizedBox(height: 8),
Row(
children: [
const Icon(Icons.phone),
const SizedBox(width: 8),
Text(style: AppStyle.title, phoneNumber),
],
),
const SizedBox(height: 8),
Row(
children: [
const Icon(Icons.calendar_today),
const SizedBox(width: 8),
Text(
style: AppStyle.title,
'${'birthdate'.tr} : $birthdate',
),
],
),
const SizedBox(height: 8),
Row(
children: [
const Icon(Icons.wc),
const SizedBox(width: 8),
Text(
style: AppStyle.title,
'${'gender'.tr} : $gender',
),
],
),
const SizedBox(height: 8),
Row(
children: [
const Icon(Icons.school),
const SizedBox(width: 8),
Text(
style: AppStyle.title,
'${'education'.tr} : $education',
),
],
),
const SizedBox(height: 8),
Row(
children: [
const Icon(Icons.car_repair),
const SizedBox(width: 8),
Text(
style: AppStyle.title,
'${'Make'.tr} : $carMake',
),
],
),
const SizedBox(height: 8),
Row(
children: [
const Icon(Icons.model_training),
const SizedBox(width: 8),
Text(
style: AppStyle.title,
'${'car_model'.tr} : $carModel',
),
],
),
const SizedBox(height: 8),
Row(
children: [
const Icon(Icons.drive_eta),
const SizedBox(width: 8),
Text(
style: AppStyle.title,
'${'car_plate'.tr} : $carPlate',
),
],
),
const SizedBox(height: 8),
Row(
children: [
const Icon(Icons.color_lens),
const SizedBox(width: 8),
Text(
style: AppStyle.title,
'${'car_color'.tr} : $carColor',
),
],
),
const SizedBox(height: 8),
Row(
children: [
const Icon(Icons.confirmation_number),
const SizedBox(width: 8),
Text(
style: AppStyle.title,
'${'vin'.tr} : $vin',
),
],
),
const SizedBox(height: 8),
Row(
children: [
const Icon(Icons.calendar_today),
const SizedBox(width: 8),
Text(
style: AppStyle.title,
'${'registration_date'.tr} : $registrationDate',
),
],
),
const SizedBox(height: 8),
Row(
children: [
const Icon(Icons.calendar_today),
const SizedBox(width: 8),
Text(
style: AppStyle.title,
'${'expiration_date'.tr} : $expirationDate',
),
],
),
const SizedBox(height: 8),
Row(
children: [
const Icon(Icons.star),
const SizedBox(width: 8),
Text(
style: AppStyle.title,
'${'rating_count'.tr} : $ratingCount',
),
],
),
const SizedBox(height: 8),
Row(
children: [
const Icon(Icons.star_rate),
const SizedBox(width: 8),
ratingDriver != null
? Text(
style: AppStyle.title,
'${'rating_driver'.tr} : $ratingDriver',
)
: Text(
style: AppStyle.title,
'${'rating_driver'.tr} : 0',
),
],
),
const SizedBox(height: 8),
Row(
children: [
const Icon(Icons.person),
const SizedBox(width: 8),
Text(
style: AppStyle.title,
'${'age'.tr} : $age',
),
],
),
],
),
),
);
} }
} }

View File

@@ -1,11 +1,10 @@
import 'package:SEFER/constant/style.dart';
import 'package:SEFER/views/home/Captin/home_captain/home_captin.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:get/get.dart'; import 'package:get/get.dart';
import 'package:SEFER/main.dart';
import 'package:SEFER/views/widgets/elevated_btn.dart'; import 'package:SEFER/views/widgets/elevated_btn.dart';
import '../../constant/box_name.dart';
import '../../controller/local/local_controller.dart'; import '../../controller/local/local_controller.dart';
import '../auth/login_page.dart';
class Language extends StatelessWidget { class Language extends StatelessWidget {
const Language({Key? key}) : super(key: key); const Language({Key? key}) : super(key: key);
@@ -17,8 +16,8 @@ class Language extends StatelessWidget {
builder: (controller) => Center( builder: (controller) => Center(
child: Container( child: Container(
padding: const EdgeInsets.all(15), padding: const EdgeInsets.all(15),
child: Column( child: ListView(
mainAxisAlignment: MainAxisAlignment.spaceEvenly, // mainAxisAlignment: MainAxisAlignment.spaceEvenly,
children: [ children: [
Text( Text(
"Choose Language".tr, "Choose Language".tr,
@@ -26,24 +25,183 @@ class Language extends StatelessWidget {
), ),
const SizedBox(height: 20), const SizedBox(height: 20),
MyElevatedButton( MyElevatedButton(
title: 'Ar', title: 'العربية',
onPressed: () { onPressed: () {
controller.changeLang("ar"); controller.changeLang("ar");
Get.offAll(() => const MyApp()); Get.defaultDialog(
title: 'You should restart app to change language'.tr,
titleStyle: AppStyle.title,
middleText: '',
confirm: MyElevatedButton(
title: 'Ok'.tr,
onPressed: () {
Get.offAll(() => HomeCaptain());
}));
}, },
), ),
MyElevatedButton( MyElevatedButton(
title: "En", title: "English",
onPressed: () { onPressed: () {
controller.changeLang("en"); controller.changeLang("en");
Get.offAll(() => const MyApp()); Get.defaultDialog(
title: 'You should restart app to change language'.tr,
titleStyle: AppStyle.title,
middleText: '',
confirm: MyElevatedButton(
title: 'Ok'.tr,
onPressed: () {
Get.offAll(() => HomeCaptain());
}));
}, },
), ),
MyElevatedButton( MyElevatedButton(
title: "Tr", title: "Türkçe",
onPressed: () { onPressed: () {
controller.changeLang("tr"); controller.changeLang("tr");
Get.offAll(() => const MyApp()); Get.defaultDialog(
title: 'You should restart app to change language'.tr,
titleStyle: AppStyle.title,
middleText: '',
confirm: MyElevatedButton(
title: 'Ok'.tr,
onPressed: () {
Get.offAll(() => HomeCaptain());
}));
},
),
MyElevatedButton(
title: "Français",
onPressed: () {
controller.changeLang("fr");
Get.defaultDialog(
title: 'You should restart app to change language'.tr,
titleStyle: AppStyle.title,
middleText: '',
confirm: MyElevatedButton(
title: 'Ok'.tr,
onPressed: () {
Get.offAll(() => HomeCaptain());
}));
},
),
MyElevatedButton(
title: "Italiano",
onPressed: () {
controller.changeLang("it");
Get.defaultDialog(
title: 'You should restart app to change language'.tr,
titleStyle: AppStyle.title,
middleText: '',
confirm: MyElevatedButton(
title: 'Ok'.tr,
onPressed: () {
Get.offAll(() => HomeCaptain());
}));
},
),
MyElevatedButton(
title: "Deutsch",
onPressed: () {
controller.changeLang("de");
Get.defaultDialog(
title: 'You should restart app to change language'.tr,
titleStyle: AppStyle.title,
middleText: '',
confirm: MyElevatedButton(
title: 'Ok'.tr,
onPressed: () {
Get.offAll(() => HomeCaptain());
}));
},
),
MyElevatedButton(
title: "Ελληνικά",
onPressed: () {
controller.changeLang("el");
Get.defaultDialog(
title: 'You should restart app to change language'.tr,
titleStyle: AppStyle.title,
middleText: '',
confirm: MyElevatedButton(
title: 'Ok'.tr,
onPressed: () {
Get.offAll(() => HomeCaptain());
}));
},
),
MyElevatedButton(
title: "Español",
onPressed: () {
controller.changeLang("es");
Get.defaultDialog(
title: 'You should restart app to change language'.tr,
titleStyle: AppStyle.title,
middleText: '',
confirm: MyElevatedButton(
title: 'Ok'.tr,
onPressed: () {
Get.offAll(() => HomeCaptain());
}));
},
),
MyElevatedButton(
title: "فارسی",
onPressed: () {
controller.changeLang("fa");
Get.defaultDialog(
title: 'You should restart app to change language'.tr,
titleStyle: AppStyle.title,
middleText: '',
confirm: MyElevatedButton(
title: 'Ok'.tr,
onPressed: () {
Get.offAll(() => HomeCaptain());
}));
},
),
MyElevatedButton(
title: "中文",
onPressed: () {
controller.changeLang("zh");
Get.defaultDialog(
title: 'You should restart app to change language'.tr,
titleStyle: AppStyle.title,
middleText: '',
confirm: MyElevatedButton(
title: 'Ok'.tr,
onPressed: () {
Get.offAll(() => HomeCaptain());
}));
},
),
MyElevatedButton(
title: "Русский",
onPressed: () {
controller.changeLang("ru");
Get.defaultDialog(
title: 'You should restart app to change language'.tr,
titleStyle: AppStyle.title,
middleText: '',
confirm: MyElevatedButton(
title: 'Ok'.tr,
onPressed: () {
Get.offAll(() => HomeCaptain());
}));
},
),
MyElevatedButton(
title: "हिन्दी",
onPressed: () {
controller.changeLang("hi");
Get.defaultDialog(
title: 'You should restart app to change language'.tr,
titleStyle: AppStyle.title,
middleText: '',
confirm: MyElevatedButton(
title: 'Ok'.tr,
onPressed: () {
Get.offAll(() => HomeCaptain());
}));
}, },
), ),
], ],

View File

@@ -9,6 +9,7 @@ import agora_rtc_engine
import audio_session import audio_session
import device_info_plus import device_info_plus
import file_selector_macos import file_selector_macos
import firebase_auth
import firebase_core import firebase_core
import firebase_messaging import firebase_messaging
import flutter_local_notifications import flutter_local_notifications
@@ -22,6 +23,7 @@ import location
import package_info_plus import package_info_plus
import path_provider_foundation import path_provider_foundation
import record_darwin import record_darwin
import sign_in_with_apple
import sqflite import sqflite
import url_launcher_macos import url_launcher_macos
import video_player_avfoundation import video_player_avfoundation
@@ -32,6 +34,7 @@ func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) {
AudioSessionPlugin.register(with: registry.registrar(forPlugin: "AudioSessionPlugin")) AudioSessionPlugin.register(with: registry.registrar(forPlugin: "AudioSessionPlugin"))
DeviceInfoPlusMacosPlugin.register(with: registry.registrar(forPlugin: "DeviceInfoPlusMacosPlugin")) DeviceInfoPlusMacosPlugin.register(with: registry.registrar(forPlugin: "DeviceInfoPlusMacosPlugin"))
FileSelectorPlugin.register(with: registry.registrar(forPlugin: "FileSelectorPlugin")) FileSelectorPlugin.register(with: registry.registrar(forPlugin: "FileSelectorPlugin"))
FLTFirebaseAuthPlugin.register(with: registry.registrar(forPlugin: "FLTFirebaseAuthPlugin"))
FLTFirebaseCorePlugin.register(with: registry.registrar(forPlugin: "FLTFirebaseCorePlugin")) FLTFirebaseCorePlugin.register(with: registry.registrar(forPlugin: "FLTFirebaseCorePlugin"))
FLTFirebaseMessagingPlugin.register(with: registry.registrar(forPlugin: "FLTFirebaseMessagingPlugin")) FLTFirebaseMessagingPlugin.register(with: registry.registrar(forPlugin: "FLTFirebaseMessagingPlugin"))
FlutterLocalNotificationsPlugin.register(with: registry.registrar(forPlugin: "FlutterLocalNotificationsPlugin")) FlutterLocalNotificationsPlugin.register(with: registry.registrar(forPlugin: "FlutterLocalNotificationsPlugin"))
@@ -45,6 +48,7 @@ func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) {
FPPPackageInfoPlusPlugin.register(with: registry.registrar(forPlugin: "FPPPackageInfoPlusPlugin")) FPPPackageInfoPlusPlugin.register(with: registry.registrar(forPlugin: "FPPPackageInfoPlusPlugin"))
PathProviderPlugin.register(with: registry.registrar(forPlugin: "PathProviderPlugin")) PathProviderPlugin.register(with: registry.registrar(forPlugin: "PathProviderPlugin"))
RecordPlugin.register(with: registry.registrar(forPlugin: "RecordPlugin")) RecordPlugin.register(with: registry.registrar(forPlugin: "RecordPlugin"))
SignInWithApplePlugin.register(with: registry.registrar(forPlugin: "SignInWithApplePlugin"))
SqflitePlugin.register(with: registry.registrar(forPlugin: "SqflitePlugin")) SqflitePlugin.register(with: registry.registrar(forPlugin: "SqflitePlugin"))
UrlLauncherPlugin.register(with: registry.registrar(forPlugin: "UrlLauncherPlugin")) UrlLauncherPlugin.register(with: registry.registrar(forPlugin: "UrlLauncherPlugin"))
FVPVideoPlayerPlugin.register(with: registry.registrar(forPlugin: "FVPVideoPlayerPlugin")) FVPVideoPlayerPlugin.register(with: registry.registrar(forPlugin: "FVPVideoPlayerPlugin"))

View File

@@ -13,10 +13,10 @@ packages:
dependency: transitive dependency: transitive
description: description:
name: _flutterfire_internals name: _flutterfire_internals
sha256: f5628cd9c92ed11083f425fd1f8f1bc60ecdda458c81d73b143aeda036c35fe7 sha256: e4be6711f96d3d4eebe79728897d645b7a5585bbfdd6d534878d202c171266d7
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "1.3.16" version: "1.3.34"
agora_rtc_engine: agora_rtc_engine:
dependency: "direct main" dependency: "direct main"
description: description:
@@ -154,7 +154,7 @@ packages:
source: hosted source: hosted
version: "8.8.1" version: "8.8.1"
cached_network_image: cached_network_image:
dependency: "direct main" dependency: transitive
description: description:
name: cached_network_image name: cached_network_image
sha256: f98972704692ba679db144261172a8e20feb145636c617af0eb4022132a6797f sha256: f98972704692ba679db144261172a8e20feb145636c617af0eb4022132a6797f
@@ -249,14 +249,6 @@ packages:
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "1.7.4" version: "1.7.4"
cli_util:
dependency: transitive
description:
name: cli_util
sha256: c05b7406fdabc7a49a3929d4af76bcaccbbffcbcdcf185b082e1ae07da323d19
url: "https://pub.dev"
source: hosted
version: "0.4.1"
clock: clock:
dependency: transitive dependency: transitive
description: description:
@@ -298,7 +290,7 @@ packages:
source: hosted source: hosted
version: "0.3.3+7" version: "0.3.3+7"
crypto: crypto:
dependency: "direct main" dependency: transitive
description: description:
name: crypto name: crypto
sha256: ff625774173754681d66daaf4a448684fb04b78f902da9cb3d308c19cc5e8bab sha256: ff625774173754681d66daaf4a448684fb04b78f902da9cb3d308c19cc5e8bab
@@ -321,14 +313,6 @@ packages:
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "1.0.6" version: "1.0.6"
custom_searchable_dropdown:
dependency: "direct main"
description:
name: custom_searchable_dropdown
sha256: c2676b1ee55f0b71a7cd890ae473cf97651f018b2695b3bf57c8c28a14e2fa95
url: "https://pub.dev"
source: hosted
version: "2.1.1"
dart_style: dart_style:
dependency: transitive dependency: transitive
description: description:
@@ -346,7 +330,7 @@ packages:
source: hosted source: hosted
version: "0.7.10" version: "0.7.10"
device_info_plus: device_info_plus:
dependency: "direct main" dependency: transitive
description: description:
name: device_info_plus name: device_info_plus
sha256: "0042cb3b2a76413ea5f8a2b40cec2a33e01d0c937e91f0f7c211fde4f7739ba6" sha256: "0042cb3b2a76413ea5f8a2b40cec2a33e01d0c937e91f0f7c211fde4f7739ba6"
@@ -449,14 +433,38 @@ packages:
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "0.9.3+1" version: "0.9.3+1"
firebase_auth:
dependency: "direct main"
description:
name: firebase_auth
sha256: ea95cd29e27e8ec1971af263d74b208ce85dbc7df9197d8b5eab2aa7de7cfea8
url: "https://pub.dev"
source: hosted
version: "4.19.6"
firebase_auth_platform_interface:
dependency: transitive
description:
name: firebase_auth_platform_interface
sha256: c252d2c97a02cf03fbf3595c5f7edf2a731062356b09d2c338f0b3d63567239f
url: "https://pub.dev"
source: hosted
version: "7.2.7"
firebase_auth_web:
dependency: transitive
description:
name: firebase_auth_web
sha256: "5db2319d59b4bb08cf0cc26e0f110f9ae1cf9cf775ce516e5cc38cd6704253de"
url: "https://pub.dev"
source: hosted
version: "5.11.6"
firebase_core: firebase_core:
dependency: "direct main" dependency: "direct main"
description: description:
name: firebase_core name: firebase_core
sha256: "96607c0e829a581c2a483c658f04e8b159964c3bae2730f73297070bc85d40bb" sha256: "4b5100e2dbc3fe72c2d4241a046d3f01457fe11293283a324f5c52575e3406f8"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "2.24.2" version: "2.31.1"
firebase_core_platform_interface: firebase_core_platform_interface:
dependency: transitive dependency: transitive
description: description:
@@ -469,10 +477,10 @@ packages:
dependency: transitive dependency: transitive
description: description:
name: firebase_core_web name: firebase_core_web
sha256: d585bdf3c656c3f7821ba1bd44da5f13365d22fcecaf5eb75c4295246aaa83c0 sha256: "43d9e951ac52b87ae9cc38ecdcca1e8fa7b52a1dd26a96085ba41ce5108db8e9"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "2.10.0" version: "2.17.0"
firebase_messaging: firebase_messaging:
dependency: "direct main" dependency: "direct main"
description: description:
@@ -534,14 +542,6 @@ packages:
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "2.2.7" version: "2.2.7"
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: flutter_lints:
dependency: "direct dev" dependency: "direct dev"
description: description:
@@ -840,22 +840,6 @@ packages:
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "2.1.2" version: "2.1.2"
google_fonts:
dependency: "direct main"
description:
name: google_fonts
sha256: "6b6f10f0ce3c42f6552d1c70d2c28d764cf22bb487f50f66cca31dcd5194f4d6"
url: "https://pub.dev"
source: hosted
version: "4.0.4"
google_generative_ai:
dependency: "direct main"
description:
name: google_generative_ai
sha256: "946f37c947bbc3591ed1c2878f8a41a0f75e74468dae791f84f14db3df3f3551"
url: "https://pub.dev"
source: hosted
version: "0.0.1-dev"
google_identity_services_web: google_identity_services_web:
dependency: transitive dependency: transitive
description: description:
@@ -1296,14 +1280,6 @@ packages:
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "1.2.0" version: "1.2.0"
lottie:
dependency: "direct main"
description:
name: lottie
sha256: a93542cc2d60a7057255405f62252533f8e8956e7e06754955669fd32fb4b216
url: "https://pub.dev"
source: hosted
version: "2.7.0"
matcher: matcher:
dependency: transitive dependency: transitive
description: description:
@@ -1656,6 +1632,30 @@ packages:
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "1.0.4" version: "1.0.4"
sign_in_with_apple:
dependency: "direct main"
description:
name: sign_in_with_apple
sha256: b0abd9c0d0407140829b12cd99a250f10b20352573ff08c7e0c5174c64b4973e
url: "https://pub.dev"
source: hosted
version: "6.1.0"
sign_in_with_apple_platform_interface:
dependency: transitive
description:
name: sign_in_with_apple_platform_interface
sha256: c2ef2ce6273fce0c61acd7e9ff5be7181e33d7aa2b66508b39418b786cca2119
url: "https://pub.dev"
source: hosted
version: "1.1.0"
sign_in_with_apple_web:
dependency: transitive
description:
name: sign_in_with_apple_web
sha256: c009e9beeb6c376e86aaa154fcc8b4e075d4bad90c56286b9668a51cdb6129ea
url: "https://pub.dev"
source: hosted
version: "2.1.0"
sky_engine: sky_engine:
dependency: transitive dependency: transitive
description: flutter description: flutter

View File

@@ -1,12 +1,11 @@
name: SEFER name: SEFER
description: A new Flutter project. description: A new Flutter project.
publish_to: 'none' # Remove this line if you wish to publish to pub.dev publish_to: "none" # Remove this line if you wish to publish to pub.dev
version: 1.0.0+1 version: 1.0.0+1
environment: environment:
sdk: '>=3.0.5 <4.0.0' sdk: ">=3.0.5 <4.0.0"
dependencies: dependencies:
flutter: flutter:
@@ -14,46 +13,46 @@ dependencies:
cupertino_icons: ^1.0.2 cupertino_icons: ^1.0.2
firebase_messaging: ^14.6.7 firebase_messaging: ^14.6.7
firebase_core: ^2.15.0 firebase_core: ^2.15.0
flutter_local_notifications: ^16.2.0 flutter_local_notifications: ^16.2.0
google_maps_flutter: ^2.5.0 google_maps_flutter: ^2.5.0
sqflite: ^2.3.0 sqflite: ^2.3.0
path: ^1.8.3 path: ^1.8.3
lottie: ^2.5.0 # lottie: ^2.5.0
intl: ^0.18.1 intl: ^0.18.1
google_fonts: ^ 4.0.4 # google_fonts: ^ 4.0.4
http: ^0.13.6 http: ^0.13.6
get: ^4.6.5 get: ^4.6.5
get_storage: ^2.1.1 get_storage: ^2.1.1
url_launcher: ^6.1.12 url_launcher: ^6.1.12
location: ^5.0.2+1 location: ^5.0.2+1
google_polyline_algorithm: ^3.1.0 google_polyline_algorithm: ^3.1.0
custom_searchable_dropdown: ^2.1.1 # custom_searchable_dropdown: ^2.1.1
animated_text_kit: ^4.2.2 animated_text_kit: ^4.2.2
flutter_secure_storage: ^9.0.0 flutter_secure_storage: ^9.0.0
geolocator: ^10.0.0 geolocator: ^10.0.0
flutter_paypal: ^0.2.0 flutter_paypal: ^0.2.0
flutter_launcher_icons: ^0.13.1 # flutter_launcher_icons: ^0.13.1 #to be remove
crypto: ^3.0.3 # crypto: ^3.0.3
flutter_rating_bar: ^4.0.1 flutter_rating_bar: ^4.0.1
flutter_font_icons: ^2.2.5 flutter_font_icons: ^2.2.5
device_info_plus: ^9.1.0 # device_info_plus: ^9.1.0
image_picker: ^1.0.4 image_picker: ^1.0.4
flutter_stripe: ^9.5.0+1 flutter_stripe: ^9.5.0+1
camera: ^0.10.5+5 camera: ^0.10.5+5 #to be remove
flutter_widget_from_html: ^0.14.6 flutter_widget_from_html: ^0.14.6
local_auth: ^2.1.7 local_auth: ^2.1.7
image: ^4.1.3 image: ^4.1.3 #to be remove
image_cropper: ^4.0.1 image_cropper: ^4.0.1
envied: ^0.5.2 envied: ^0.5.2
cached_network_image: ^3.3.0 # cached_network_image: ^3.3.0 #to be remove
calendar_builder: ^0.0.6 calendar_builder: ^0.0.6
fl_chart: ^0.66.0 fl_chart: ^0.66.0
agora_rtc_engine: ^6.2.6 agora_rtc_engine: ^6.2.6
flutter_tts: ^3.8.5 flutter_tts: ^3.8.5
permission_handler: ^11.3.0 permission_handler: ^11.3.0
google_generative_ai: ^0.0.1-dev # google_generative_ai: ^0.0.1-dev
vibration: ^1.8.4 vibration: ^1.8.4
wakelock_plus: wakelock_plus:
background_location: ^0.13.0 background_location: ^0.13.0
record: ^5.0.5 record: ^5.0.5
dio: ^5.4.3+1 dio: ^5.4.3+1
@@ -62,34 +61,33 @@ dependencies:
share: ^2.0.4 share: ^2.0.4
google_sign_in: ^6.2.1 google_sign_in: ^6.2.1
google_mlkit_text_recognition: ^0.13.0 google_mlkit_text_recognition: ^0.13.0
sign_in_with_apple: ^6.1.0
firebase_auth: ^4.19.6
dev_dependencies: dev_dependencies:
flutter_test: flutter_test:
sdk: flutter sdk: flutter
flutter_lints: ^ 3.0.1 flutter_lints: ^3.0.1
envied_generator: ^0.5.2 envied_generator: ^0.5.2
build_runner: ^2.4.6 build_runner: ^2.4.6
flutter_launcher_icons: # flutter_launcher_icons:
android: "launcher_icon" # android: "launcher_icon"
ios: true # ios: true
image_path: "assets/images/logo.png" # image_path: "assets/images/logo.png"
min_sdk_android: 21 # min_sdk_android: 21
web: # web:
generate: true # generate: true
image_path: "assets/images/logo.png" # image_path: "assets/images/logo.png"
background_color: "#hexcode" # background_color: "#hexcode"
theme_color: "#hexcode" # theme_color: "#hexcode"
windows: # windows:
generate: true # generate: true
image_path: "assets/images/logo.png" # image_path: "assets/images/logo.png"
icon_size: 48 # icon_size: 48
macos: # macos:
generate: true # generate: true
image_path: "assets/images/logo.png" # image_path: "assets/images/logo.png"
flutter: flutter:
uses-material-design: true uses-material-design: true
@@ -100,6 +98,12 @@ flutter:
- shorebird.yaml - shorebird.yaml
fonts: fonts:
- family: digital-counter-7 - family: mohanad
fonts: fonts:
- asset: assets/fonts/digital-counter-7.regular.ttf - asset: assets/fonts/mohanad.ttf
- family: josefin
fonts:
- asset: assets/fonts/josefin.ttf
- family: digit
fonts:
- asset: assets/fonts/digit.ttf

View File

@@ -8,6 +8,7 @@
#include <agora_rtc_engine/agora_rtc_engine_plugin.h> #include <agora_rtc_engine/agora_rtc_engine_plugin.h>
#include <file_selector_windows/file_selector_windows.h> #include <file_selector_windows/file_selector_windows.h>
#include <firebase_auth/firebase_auth_plugin_c_api.h>
#include <firebase_core/firebase_core_plugin_c_api.h> #include <firebase_core/firebase_core_plugin_c_api.h>
#include <flutter_secure_storage_windows/flutter_secure_storage_windows_plugin.h> #include <flutter_secure_storage_windows/flutter_secure_storage_windows_plugin.h>
#include <flutter_tts/flutter_tts_plugin.h> #include <flutter_tts/flutter_tts_plugin.h>
@@ -23,6 +24,8 @@ void RegisterPlugins(flutter::PluginRegistry* registry) {
registry->GetRegistrarForPlugin("AgoraRtcEnginePlugin")); registry->GetRegistrarForPlugin("AgoraRtcEnginePlugin"));
FileSelectorWindowsRegisterWithRegistrar( FileSelectorWindowsRegisterWithRegistrar(
registry->GetRegistrarForPlugin("FileSelectorWindows")); registry->GetRegistrarForPlugin("FileSelectorWindows"));
FirebaseAuthPluginCApiRegisterWithRegistrar(
registry->GetRegistrarForPlugin("FirebaseAuthPluginCApi"));
FirebaseCorePluginCApiRegisterWithRegistrar( FirebaseCorePluginCApiRegisterWithRegistrar(
registry->GetRegistrarForPlugin("FirebaseCorePluginCApi")); registry->GetRegistrarForPlugin("FirebaseCorePluginCApi"));
FlutterSecureStorageWindowsPluginRegisterWithRegistrar( FlutterSecureStorageWindowsPluginRegisterWithRegistrar(

View File

@@ -5,6 +5,7 @@
list(APPEND FLUTTER_PLUGIN_LIST list(APPEND FLUTTER_PLUGIN_LIST
agora_rtc_engine agora_rtc_engine
file_selector_windows file_selector_windows
firebase_auth
firebase_core firebase_core
flutter_secure_storage_windows flutter_secure_storage_windows
flutter_tts flutter_tts