9/21/2
This commit is contained in:
@@ -89,7 +89,7 @@ PODS:
|
|||||||
- GTMSessionFetcher/Core
|
- GTMSessionFetcher/Core
|
||||||
- image_cropper (0.0.4):
|
- image_cropper (0.0.4):
|
||||||
- Flutter
|
- Flutter
|
||||||
- TOCropViewController (~> 2.6.1)
|
- TOCropViewController (~> 2.7.4)
|
||||||
- image_picker_ios (0.0.1):
|
- image_picker_ios (0.0.1):
|
||||||
- Flutter
|
- Flutter
|
||||||
- local_auth_darwin (0.0.1):
|
- local_auth_darwin (0.0.1):
|
||||||
@@ -106,7 +106,7 @@ PODS:
|
|||||||
- sqflite (0.0.3):
|
- sqflite (0.0.3):
|
||||||
- Flutter
|
- Flutter
|
||||||
- FlutterMacOS
|
- FlutterMacOS
|
||||||
- TOCropViewController (2.6.1)
|
- TOCropViewController (2.7.4)
|
||||||
- url_launcher_ios (0.0.1):
|
- url_launcher_ios (0.0.1):
|
||||||
- Flutter
|
- Flutter
|
||||||
|
|
||||||
@@ -181,14 +181,14 @@ SPEC CHECKSUMS:
|
|||||||
GoogleUtilities: ea963c370a38a8069cc5f7ba4ca849a60b6d7d15
|
GoogleUtilities: ea963c370a38a8069cc5f7ba4ca849a60b6d7d15
|
||||||
GTMAppAuth: f69bd07d68cd3b766125f7e072c45d7340dea0de
|
GTMAppAuth: f69bd07d68cd3b766125f7e072c45d7340dea0de
|
||||||
GTMSessionFetcher: 8000756fc1c19d2e5697b90311f7832d2e33f6cd
|
GTMSessionFetcher: 8000756fc1c19d2e5697b90311f7832d2e33f6cd
|
||||||
image_cropper: a3291c624a953049bc6a02e1f8c8ceb162a24b25
|
image_cropper: 37d40f62177c101ff4c164906d259ea2c3aa70cf
|
||||||
image_picker_ios: c560581cceedb403a6ff17f2f816d7fea1421fc1
|
image_picker_ios: c560581cceedb403a6ff17f2f816d7fea1421fc1
|
||||||
local_auth_darwin: 4d56c90c2683319835a61274b57620df9c4520ab
|
local_auth_darwin: 4d56c90c2683319835a61274b57620df9c4520ab
|
||||||
nanopb: 438bc412db1928dac798aa6fd75726007be04262
|
nanopb: 438bc412db1928dac798aa6fd75726007be04262
|
||||||
path_provider_foundation: 2b6b4c569c0fb62ec74538f866245ac84301af46
|
path_provider_foundation: 2b6b4c569c0fb62ec74538f866245ac84301af46
|
||||||
PromisesObjC: f5707f49cb48b9636751c5b2e7d227e43fba9f47
|
PromisesObjC: f5707f49cb48b9636751c5b2e7d227e43fba9f47
|
||||||
sqflite: 673a0e54cc04b7d6dba8d24fb8095b31c3a99eec
|
sqflite: 673a0e54cc04b7d6dba8d24fb8095b31c3a99eec
|
||||||
TOCropViewController: edfd4f25713d56905ad1e0b9f5be3fbe0f59c863
|
TOCropViewController: 80b8985ad794298fb69d3341de183f33d1853654
|
||||||
url_launcher_ios: 5334b05cef931de560670eeae103fd3e431ac3fe
|
url_launcher_ios: 5334b05cef931de560670eeae103fd3e431ac3fe
|
||||||
|
|
||||||
PODFILE CHECKSUM: 1959d098c91d8a792531a723c4a9d7e9f6a01e38
|
PODFILE CHECKSUM: 1959d098c91d8a792531a723c4a9d7e9f6a01e38
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ import UIKit
|
|||||||
import Flutter
|
import Flutter
|
||||||
import FirebaseCore
|
import FirebaseCore
|
||||||
|
|
||||||
@UIApplicationMain
|
@main
|
||||||
@objc class AppDelegate: FlutterAppDelegate {
|
@objc class AppDelegate: FlutterAppDelegate {
|
||||||
|
|
||||||
override func application(
|
override func application(
|
||||||
|
|||||||
@@ -20,6 +20,7 @@ class AppLink {
|
|||||||
static String getTokens = "$server/ride/firebase/get.php";
|
static String getTokens = "$server/ride/firebase/get.php";
|
||||||
static String getAllTokenDrivers =
|
static String getAllTokenDrivers =
|
||||||
"$server/ride/firebase/getALlTokenDrivers.php";
|
"$server/ride/firebase/getALlTokenDrivers.php";
|
||||||
|
|
||||||
static String getAllTokenPassengers =
|
static String getAllTokenPassengers =
|
||||||
"$server/ride/firebase/getAllTokenPassengers.php";
|
"$server/ride/firebase/getAllTokenPassengers.php";
|
||||||
static String addTokens = "$server/ride/firebase/add.php";
|
static String addTokens = "$server/ride/firebase/add.php";
|
||||||
@@ -220,7 +221,8 @@ class AppLink {
|
|||||||
static String getAccount = "$authCaptin/getAccount.php";
|
static String getAccount = "$authCaptin/getAccount.php";
|
||||||
|
|
||||||
//===================Admin Captin============
|
//===================Admin Captin============
|
||||||
|
static String getDriversPhonesAndTokens =
|
||||||
|
"$server/Admin/AdminCaptain/getDriversPhonesAndTokens.php";
|
||||||
static String getPassengerDetailsByPassengerID =
|
static String getPassengerDetailsByPassengerID =
|
||||||
"$server/Admin/getPassengerDetailsByPassengerID.php";
|
"$server/Admin/getPassengerDetailsByPassengerID.php";
|
||||||
static String getPassengerDetails = "$server/Admin/getPassengerDetails.php";
|
static String getPassengerDetails = "$server/Admin/getPassengerDetails.php";
|
||||||
@@ -237,11 +239,13 @@ class AppLink {
|
|||||||
"$server/Admin/AdminRide/getRidesPerMonth.php";
|
"$server/Admin/AdminRide/getRidesPerMonth.php";
|
||||||
static String getRidesDetails = "$server/Admin/AdminRide/get.php";
|
static String getRidesDetails = "$server/Admin/AdminRide/get.php";
|
||||||
static String getPassengersStatic = "$serviceApp/getPassengersStatic.php";
|
static String getPassengersStatic = "$serviceApp/getPassengersStatic.php";
|
||||||
|
static String getRidesStatic = "$serviceApp/getRidesStatic.php";
|
||||||
|
static String getEmployeeStatic = "$serviceApp/getEmployeeStatic.php";
|
||||||
static String getdriverstotalMonthly =
|
static String getdriverstotalMonthly =
|
||||||
"$serviceApp/getdriverstotalMonthly.php";
|
"$serviceApp/getdriverstotalMonthly.php";
|
||||||
|
|
||||||
////////////////////////
|
////////////////////////
|
||||||
static String serviceApp = "$server/serviceApp";
|
static String serviceApp = "$server/serviceapp";
|
||||||
static String editCarPlate = "$serviceApp/editCarPlate.php";
|
static String editCarPlate = "$serviceApp/editCarPlate.php";
|
||||||
static String getComplaintAllData = "$serviceApp/getComplaintAllData.php";
|
static String getComplaintAllData = "$serviceApp/getComplaintAllData.php";
|
||||||
static String getComplaintAllDataForDriver =
|
static String getComplaintAllDataForDriver =
|
||||||
@@ -259,4 +263,14 @@ class AppLink {
|
|||||||
static String addNotesDriver = "$serviceApp/addNotesDriver.php";
|
static String addNotesDriver = "$serviceApp/addNotesDriver.php";
|
||||||
static String getCarPlateNotEdit = "$serviceApp/getCarPlateNotEdit.php";
|
static String getCarPlateNotEdit = "$serviceApp/getCarPlateNotEdit.php";
|
||||||
static String addNotesPassenger = "$serviceApp/addNotesPassenger.php";
|
static String addNotesPassenger = "$serviceApp/addNotesPassenger.php";
|
||||||
|
//////
|
||||||
|
static String sendSms = "https://sms.kazumi.me/api/sms/send-sms";
|
||||||
|
static String senddlr = "https://sms.kazumi.me/api/sms/send-dlr";
|
||||||
|
static String sendvalidity = "https://sms.kazumi.me/api/sms/send-validity";
|
||||||
|
static String sendmany = "https://sms.kazumi.me/api/sms/send-many";
|
||||||
|
static String checkCredit = "https://sms.kazumi.me/api/sms/check-credit";
|
||||||
|
static String getSender = "$server/auth/sms/getSender.php";
|
||||||
|
static String checkStatus = "https://sms.kazumi.me/api/sms/check-status";
|
||||||
|
static String updatePhoneInvalidSMSPassenger =
|
||||||
|
"$server/auth/sms/updatePhoneInvalidSMSPassenger.php";
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,16 +1,21 @@
|
|||||||
import 'dart:convert';
|
import 'dart:convert';
|
||||||
|
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
import 'package:get/get.dart';
|
import 'package:get/get.dart';
|
||||||
import 'package:sefer_admin1/constant/links.dart';
|
import 'package:sefer_admin1/constant/links.dart';
|
||||||
import 'package:sefer_admin1/controller/functions/crud.dart';
|
import 'package:sefer_admin1/controller/functions/crud.dart';
|
||||||
|
|
||||||
import '../../constant/api_key.dart';
|
import '../../constant/api_key.dart';
|
||||||
|
import '../../constant/box_name.dart';
|
||||||
|
import '../../main.dart';
|
||||||
import '../../print.dart';
|
import '../../print.dart';
|
||||||
|
|
||||||
class DashboardController extends GetxController {
|
class DashboardController extends GetxController {
|
||||||
bool isLoading = false;
|
bool isLoading = false;
|
||||||
List dashbord = [];
|
List dashbord = [];
|
||||||
String creditSMS = '0';
|
String creditSMS = '0';
|
||||||
|
final formKey = GlobalKey<FormState>();
|
||||||
|
final smsText = TextEditingController();
|
||||||
|
|
||||||
Future getDashBoard() async {
|
Future getDashBoard() async {
|
||||||
isLoading = true;
|
isLoading = true;
|
||||||
@@ -36,6 +41,22 @@ class DashboardController extends GetxController {
|
|||||||
update();
|
update();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
sendSMSMethod() async {
|
||||||
|
if (formKey.currentState!.validate()) {
|
||||||
|
for (var phoneNumber in box.read(BoxName.tokensDrivers)['message']) {
|
||||||
|
// for (var i = 0; i < 2; i++) {
|
||||||
|
await CRUD().sendSmsEgypt(
|
||||||
|
phoneNumber['phone'].toString(),
|
||||||
|
// box.read(BoxName.tokensDrivers)['message'][i]['phone'].toString(),
|
||||||
|
smsText.text,
|
||||||
|
);
|
||||||
|
// Log.print('CRUD().phoneDriversTest.: ${phoneNumber['phone']}');
|
||||||
|
Future.delayed(const Duration(microseconds: 20));
|
||||||
|
}
|
||||||
|
Get.back();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void onInit() async {
|
void onInit() async {
|
||||||
getDashBoard();
|
getDashBoard();
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ import 'package:get/get.dart';
|
|||||||
|
|
||||||
import '../../constant/links.dart';
|
import '../../constant/links.dart';
|
||||||
import '../../models/model/passengers_model.dart';
|
import '../../models/model/passengers_model.dart';
|
||||||
|
import '../../print.dart';
|
||||||
import '../functions/crud.dart';
|
import '../functions/crud.dart';
|
||||||
|
|
||||||
class StaticController extends GetxController {
|
class StaticController extends GetxController {
|
||||||
@@ -14,11 +15,20 @@ class StaticController extends GetxController {
|
|||||||
var chartDataPassengers;
|
var chartDataPassengers;
|
||||||
var chartDataDrivers;
|
var chartDataDrivers;
|
||||||
var chartDataDriversCalling;
|
var chartDataDriversCalling;
|
||||||
|
var chartDataRides;
|
||||||
|
var chartDataEmployee;
|
||||||
|
var chartDataEmployeeMaryam;
|
||||||
|
var chartDataEmployeeRawda;
|
||||||
|
var chartDataEmployeeMena;
|
||||||
var chartDataDriversMatchingNotes;
|
var chartDataDriversMatchingNotes;
|
||||||
bool isLoading = false;
|
bool isLoading = false;
|
||||||
String totalMonthlyPassengers = '';
|
String totalMonthlyPassengers = '';
|
||||||
|
String totalMonthlyRides = '';
|
||||||
|
String totalMonthlyEmployee = '';
|
||||||
String totalMonthlyDrivers = '';
|
String totalMonthlyDrivers = '';
|
||||||
late List<MonthlyPassengerInstall> passengersData;
|
late List<MonthlyPassengerInstall> passengersData;
|
||||||
|
late List<MonthlyRidesInstall> ridesData;
|
||||||
|
late List<MonthlyEmployeeData> employeeData;
|
||||||
late List<MonthlyDriverInstall> driversData;
|
late List<MonthlyDriverInstall> driversData;
|
||||||
|
|
||||||
Future<void> fetch() async {
|
Future<void> fetch() async {
|
||||||
@@ -48,6 +58,98 @@ class StaticController 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> fetchRides() async {
|
||||||
|
isLoading = true;
|
||||||
|
update(); // Notify the observers about the loading state change
|
||||||
|
|
||||||
|
var res = await CRUD().get(
|
||||||
|
link: AppLink.getRidesStatic,
|
||||||
|
payload: {},
|
||||||
|
);
|
||||||
|
jsonData1 = jsonDecode(res);
|
||||||
|
var jsonResponse = jsonDecode(res) as Map<String, dynamic>;
|
||||||
|
isLoading = false;
|
||||||
|
final List<dynamic> jsonData = jsonResponse['message'];
|
||||||
|
totalMonthlyRides = jsonData[0]['totalMonthly'].toString();
|
||||||
|
ridesData = jsonData.map<MonthlyRidesInstall>((item) {
|
||||||
|
return MonthlyRidesInstall.fromJson(item);
|
||||||
|
}).toList();
|
||||||
|
final List<FlSpot> spots = ridesData
|
||||||
|
.map((data) => FlSpot(
|
||||||
|
data.day.toDouble(),
|
||||||
|
data.totalRides.toDouble(),
|
||||||
|
))
|
||||||
|
.toList();
|
||||||
|
chartDataRides = spots;
|
||||||
|
|
||||||
|
update(); // Notify the observers about the data and loading state change
|
||||||
|
}
|
||||||
|
|
||||||
|
Future<void> fetchEmployee() async {
|
||||||
|
isLoading = true;
|
||||||
|
update();
|
||||||
|
|
||||||
|
var res = await CRUD().get(link: AppLink.getEmployeeStatic, payload: {});
|
||||||
|
var jsonResponse = jsonDecode(res) as Map<String, dynamic>;
|
||||||
|
isLoading = false;
|
||||||
|
|
||||||
|
final List<dynamic> jsonData = jsonResponse['message'];
|
||||||
|
totalMonthlyRides = jsonData[0]['totalMonthly'].toString();
|
||||||
|
|
||||||
|
// Group data by employee
|
||||||
|
Map<String, List<MonthlyEmployeeData>> employeeDataMap = {};
|
||||||
|
|
||||||
|
for (var item in jsonData) {
|
||||||
|
var employeeData = MonthlyEmployeeData.fromJson(item);
|
||||||
|
if (!employeeDataMap.containsKey(employeeData.name)) {
|
||||||
|
employeeDataMap[employeeData.name] = [];
|
||||||
|
}
|
||||||
|
employeeDataMap[employeeData.name]!.add(employeeData);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Create FlSpot data for each employee
|
||||||
|
List<FlSpot> chartDataMaryam = [];
|
||||||
|
List<FlSpot> chartDataRawda = [];
|
||||||
|
List<FlSpot> chartDataMena = [];
|
||||||
|
|
||||||
|
for (int day = 1; day <= DateTime.now().day; day++) {
|
||||||
|
chartDataMaryam.add(FlSpot(
|
||||||
|
day.toDouble(),
|
||||||
|
employeeDataMap['maryam']
|
||||||
|
?.firstWhere((e) => e.day == day,
|
||||||
|
orElse: () => MonthlyEmployeeData(
|
||||||
|
day: day, totalEmployees: 0, name: 'maryam'))
|
||||||
|
.totalEmployees
|
||||||
|
.toDouble() ??
|
||||||
|
0));
|
||||||
|
chartDataRawda.add(FlSpot(
|
||||||
|
day.toDouble(),
|
||||||
|
employeeDataMap['rawda']
|
||||||
|
?.firstWhere((e) => e.day == day,
|
||||||
|
orElse: () => MonthlyEmployeeData(
|
||||||
|
day: day, totalEmployees: 0, name: 'rawda'))
|
||||||
|
.totalEmployees
|
||||||
|
.toDouble() ??
|
||||||
|
0));
|
||||||
|
chartDataMena.add(FlSpot(
|
||||||
|
day.toDouble(),
|
||||||
|
employeeDataMap['mena']
|
||||||
|
?.firstWhere((e) => e.day == day,
|
||||||
|
orElse: () => MonthlyEmployeeData(
|
||||||
|
day: day, totalEmployees: 0, name: 'mena'))
|
||||||
|
.totalEmployees
|
||||||
|
.toDouble() ??
|
||||||
|
0));
|
||||||
|
}
|
||||||
|
|
||||||
|
// Combine spots into a single list if needed or keep them separate
|
||||||
|
chartDataEmployeeMaryam = chartDataMaryam;
|
||||||
|
chartDataEmployeeRawda = chartDataRawda;
|
||||||
|
chartDataEmployeeMena = chartDataMena;
|
||||||
|
|
||||||
|
update();
|
||||||
|
}
|
||||||
|
|
||||||
Future<void> fetchDrivers() async {
|
Future<void> fetchDrivers() async {
|
||||||
isLoading = true;
|
isLoading = true;
|
||||||
update(); // Notify the observers about the loading state change
|
update(); // Notify the observers about the loading state change
|
||||||
@@ -92,6 +194,8 @@ class StaticController extends GetxController {
|
|||||||
|
|
||||||
Future getAll() async {
|
Future getAll() async {
|
||||||
await fetch();
|
await fetch();
|
||||||
|
await fetchRides();
|
||||||
await fetchDrivers();
|
await fetchDrivers();
|
||||||
|
await fetchEmployee();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ import '../../constant/colors.dart';
|
|||||||
import '../../constant/links.dart';
|
import '../../constant/links.dart';
|
||||||
import '../../constant/style.dart';
|
import '../../constant/style.dart';
|
||||||
import '../../main.dart';
|
import '../../main.dart';
|
||||||
|
import '../../print.dart';
|
||||||
import '../../views/widgets/elevated_btn.dart';
|
import '../../views/widgets/elevated_btn.dart';
|
||||||
import '../notification_controller.dart';
|
import '../notification_controller.dart';
|
||||||
import 'local_notification.dart';
|
import 'local_notification.dart';
|
||||||
@@ -83,34 +84,38 @@ class FirebaseMessagesController extends GetxController {
|
|||||||
|
|
||||||
var currentPage = 1;
|
var currentPage = 1;
|
||||||
var totalPages = 1;
|
var totalPages = 1;
|
||||||
Future<void> getAllTokenDrivers({int page = 1}) async {
|
Future<void> getAllTokenDrivers() async {
|
||||||
isLoading = true;
|
isLoading = true;
|
||||||
try {
|
try {
|
||||||
var res = await http.post(
|
var res = await http.post(
|
||||||
Uri.parse(AppLink.getAllTokenDrivers),
|
Uri.parse(AppLink.getDriversPhonesAndTokens),
|
||||||
headers: {
|
headers: {
|
||||||
'Authorization':
|
'Authorization':
|
||||||
'Basic ${base64Encode(utf8.encode(AK.basicAuthCredentials))}',
|
'Basic ${base64Encode(utf8.encode(AK.basicAuthCredentials))}',
|
||||||
},
|
},
|
||||||
body: {
|
body: {
|
||||||
'page': page.toString(),
|
// 'page': page.toString(),
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
|
|
||||||
var jsonResponse = jsonDecode(res.body);
|
var jsonResponse = jsonDecode(res.body);
|
||||||
|
Log.print('jsonResponse: ${jsonResponse}');
|
||||||
if (jsonResponse['status'] == 'success') {
|
if (jsonResponse['status'] == 'success') {
|
||||||
var newData = jsonResponse['data'] as List;
|
// var newData = jsonResponse['data'] as List;
|
||||||
if (page == 1) {
|
// Log.print('newData: ${newData}');
|
||||||
dataTokens.clear();
|
// // if (page == 1) {
|
||||||
tokens.clear();
|
// // dataTokens.clear();
|
||||||
}
|
// // tokens.clear();
|
||||||
dataTokens.addAll(newData);
|
// // }
|
||||||
for (var item in newData) {
|
// dataTokens.addAll(newData);
|
||||||
tokens.add(item['token']);
|
// for (var item in newData) {
|
||||||
}
|
// tokens.add(item['token']);
|
||||||
currentPage = int.parse(jsonResponse['currentPage']);
|
// }
|
||||||
totalPages = jsonResponse['totalPages'];
|
// currentPage = int.parse(jsonResponse['currentPage']);
|
||||||
box.write(BoxName.tokensDrivers, tokens);
|
// totalPages = jsonResponse['totalPages'];
|
||||||
|
box.write(BoxName.tokensDrivers, jsonResponse);
|
||||||
|
Log.print(
|
||||||
|
'box.write(BoxName.tokensDrivers: ${box.read(BoxName.tokensDrivers)}');
|
||||||
} else {
|
} else {
|
||||||
Get.defaultDialog(
|
Get.defaultDialog(
|
||||||
title: "Warning", middleText: "No more data available");
|
title: "Warning", middleText: "No more data available");
|
||||||
@@ -166,17 +171,20 @@ class FirebaseMessagesController extends GetxController {
|
|||||||
bool isSendingNotifications = false;
|
bool isSendingNotifications = false;
|
||||||
Future<void> loadAllPagesAndSendNotifications() async {
|
Future<void> loadAllPagesAndSendNotifications() async {
|
||||||
isSendingNotifications = true;
|
isSendingNotifications = true;
|
||||||
currentPage = 1;
|
// currentPage = 1;
|
||||||
|
|
||||||
while (currentPage <= totalPages) {
|
// while (currentPage <= totalPages) {
|
||||||
await getAllTokenDrivers(page: currentPage);
|
// await getAllTokenDrivers(page: currentPage);
|
||||||
await NotificationController().sendNotificationDrivers();
|
await getAllTokenDrivers();
|
||||||
print(tokens);
|
// Log.print('tokens: ${tokens}');
|
||||||
if (currentPage < totalPages) {
|
await NotificationController().sendNotificationDrivers();
|
||||||
await Future.delayed(const Duration(seconds: 3));
|
// print(tokens);
|
||||||
}
|
|
||||||
currentPage++;
|
// if (currentPage < totalPages) {
|
||||||
}
|
// await Future.delayed(const Duration(seconds: 3));
|
||||||
|
// }
|
||||||
|
// currentPage++;
|
||||||
|
// }
|
||||||
|
|
||||||
isSendingNotifications = false;
|
isSendingNotifications = false;
|
||||||
Get.snackbar("Success", "All notifications sent!");
|
Get.snackbar("Success", "All notifications sent!");
|
||||||
@@ -189,7 +197,7 @@ class FirebaseMessagesController extends GetxController {
|
|||||||
|
|
||||||
while (currentPagePassenger <= totalPagesPassenger) {
|
while (currentPagePassenger <= totalPagesPassenger) {
|
||||||
await getAllTokenPassenger(page: currentPagePassenger);
|
await getAllTokenPassenger(page: currentPagePassenger);
|
||||||
await NotificationController().sendNotificationDrivers();
|
await NotificationController().sendNotificationPassengers();
|
||||||
print(tokensPassengers);
|
print(tokensPassengers);
|
||||||
if (currentPagePassenger < totalPagesPassenger) {
|
if (currentPagePassenger < totalPagesPassenger) {
|
||||||
await Future.delayed(const Duration(seconds: 3));
|
await Future.delayed(const Duration(seconds: 3));
|
||||||
@@ -596,6 +604,7 @@ class FirebaseMessagesController extends GetxController {
|
|||||||
|
|
||||||
// Obtain an OAuth 2.0 access token
|
// Obtain an OAuth 2.0 access token
|
||||||
final accessToken = await accessTokenManager.getAccessToken();
|
final accessToken = await accessTokenManager.getAccessToken();
|
||||||
|
// Log.print('accessToken: ${accessToken}');
|
||||||
|
|
||||||
// Send the notification
|
// Send the notification
|
||||||
final response = await http.post(
|
final response = await http.post(
|
||||||
@@ -612,9 +621,6 @@ class FirebaseMessagesController extends GetxController {
|
|||||||
'title': title,
|
'title': title,
|
||||||
'body': body,
|
'body': body,
|
||||||
},
|
},
|
||||||
'data': {
|
|
||||||
'DriverList': jsonEncode([]),
|
|
||||||
},
|
|
||||||
'android': {
|
'android': {
|
||||||
'notification': {
|
'notification': {
|
||||||
'sound': tone,
|
'sound': tone,
|
||||||
@@ -634,11 +640,11 @@ class FirebaseMessagesController extends GetxController {
|
|||||||
if (response.statusCode == 200) {
|
if (response.statusCode == 200) {
|
||||||
print(
|
print(
|
||||||
'Notification sent successfully. Status code: ${response.statusCode}');
|
'Notification sent successfully. Status code: ${response.statusCode}');
|
||||||
print('Response body: ${response.body}');
|
// print('Response body: ${response.body}');
|
||||||
} else {
|
} else {
|
||||||
print(
|
print(
|
||||||
'Failed to send notification. Status code: ${response.statusCode}');
|
'Failed to send notification. Status code: ${response.statusCode}');
|
||||||
print('Response body: ${response.body}');
|
// print('Response body: ${response.body}');
|
||||||
}
|
}
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
print('Error sending notification: $e');
|
print('Error sending notification: $e');
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -1,12 +1,15 @@
|
|||||||
import 'package:flutter/widgets.dart';
|
import 'package:flutter/widgets.dart';
|
||||||
import 'package:get/get.dart';
|
import 'package:get/get.dart';
|
||||||
import 'package:sefer_admin1/constant/box_name.dart';
|
import 'package:sefer_admin1/constant/box_name.dart';
|
||||||
|
import 'package:sefer_admin1/constant/links.dart';
|
||||||
import 'package:sefer_admin1/controller/firebase/firbase_messge.dart';
|
import 'package:sefer_admin1/controller/firebase/firbase_messge.dart';
|
||||||
|
import 'package:sefer_admin1/controller/functions/crud.dart';
|
||||||
import 'package:sefer_admin1/main.dart';
|
import 'package:sefer_admin1/main.dart';
|
||||||
import 'package:sefer_admin1/views/widgets/elevated_btn.dart';
|
import 'package:sefer_admin1/views/widgets/elevated_btn.dart';
|
||||||
import 'package:sefer_admin1/views/widgets/my_textField.dart';
|
import 'package:sefer_admin1/views/widgets/my_textField.dart';
|
||||||
|
|
||||||
import '../constant/style.dart';
|
import '../constant/style.dart';
|
||||||
|
import '../print.dart';
|
||||||
|
|
||||||
class NotificationController extends GetxController {
|
class NotificationController extends GetxController {
|
||||||
final formKey = GlobalKey<FormState>();
|
final formKey = GlobalKey<FormState>();
|
||||||
@@ -54,14 +57,37 @@ class NotificationController extends GetxController {
|
|||||||
confirm: MyElevatedButton(
|
confirm: MyElevatedButton(
|
||||||
title: 'send'.tr,
|
title: 'send'.tr,
|
||||||
onPressed: () async {
|
onPressed: () async {
|
||||||
tokensDriver = box.read(BoxName.tokensDrivers);
|
// tokensDriver = box.read(BoxName.tokensDrivers)['message'];
|
||||||
if (formKey.currentState!.validate()) {
|
// Log.print('tokensDriver: ${tokensDriver}');
|
||||||
for (var i = 0; i < tokensDriver.length; i++) {
|
// if (formKey.currentState!.validate()) {
|
||||||
print(tokensDriver.length);
|
box.read(BoxName.tokensDrivers)['message'].length;
|
||||||
// FirebaseMessagesController().sendNotificationToAnyWithoutData(
|
for (var i = 0;
|
||||||
// title.text, body.text, tokensDriver[i]);
|
i < box.read(BoxName.tokensDrivers)['message'].length;
|
||||||
}
|
i++) {
|
||||||
|
// for (var i = 0; i < 2; i++) {
|
||||||
|
// print(i);
|
||||||
|
var res = await CRUD()
|
||||||
|
.post(link: AppLink.addNotificationCaptain, payload: {
|
||||||
|
"driverID": box
|
||||||
|
.read(BoxName.tokensDrivers)['message'][i]['id']
|
||||||
|
.toString(),
|
||||||
|
"title": title.text,
|
||||||
|
"body": body.text,
|
||||||
|
});
|
||||||
|
Log.print('res: ${res}');
|
||||||
|
// Log.print('tokensDriver[i]: ${tokensDriver[i]}');
|
||||||
|
Future.delayed(const Duration(microseconds: 50));
|
||||||
|
|
||||||
|
FirebaseMessagesController().sendNotificationToAnyWithoutData(
|
||||||
|
title.text,
|
||||||
|
body.text,
|
||||||
|
box
|
||||||
|
.read(BoxName.tokensDrivers)['message'][i]['token']
|
||||||
|
.toString(),
|
||||||
|
'tone2.wav');
|
||||||
}
|
}
|
||||||
|
Get.back();
|
||||||
|
// }
|
||||||
}),
|
}),
|
||||||
cancel: MyElevatedButton(
|
cancel: MyElevatedButton(
|
||||||
title: 'cancel',
|
title: 'cancel',
|
||||||
@@ -115,3 +141,52 @@ class NotificationController extends GetxController {
|
|||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// يلا دلوقتي! تطبيق سفر جاهز عشان تبدأ تستقبل الطلبات
|
||||||
|
// • افتح التطبيق دلوقتي، واستعد إنك تستقبل طلبات أكتر. كل ما تكون فاتح، فرصتك في الطلبات بتزيد!
|
||||||
|
// 2. خليك فاتح واستقبل طلبات أكتر مع تطبيق سفر
|
||||||
|
// • وجودك متصل في التطبيق هيخليك تستقبل طلبات أكتر. افتح التطبيق دلوقتي وما تفوتش الفرصة!
|
||||||
|
// 3. فرصتك لزيادة دخلك مع تطبيق سفر تبدأ من دلوقتي!
|
||||||
|
// • مجرد إنك تفتح التطبيق مش هيأثر عليك، بالعكس، هيزود فرصتك في طلبات أكتر. افتح التطبيق واشترك دلوقتي!
|
||||||
|
|
||||||
|
//sms
|
||||||
|
// link sefer driver is https://shorturl.at/IHJcm1.
|
||||||
|
// // ميزات الأمان بعد 500 رحلة:
|
||||||
|
// • “بعد 500 رحلة مع سفر، تحصل على مميزات أمان إضافية لضمان راحتك.”
|
||||||
|
// • “نوفر لك ميزات أمان متقدمة بعد 500 رحلة لتجربة قيادة أكثر أمانًا.”
|
||||||
|
// • “مع 500 رحلة، تحصل على دعم أمني متقدم لتوفير أفضل تجربة قيادة.”
|
||||||
|
// 2. ميزات الصيانة:
|
||||||
|
// • “احصل على خدمات صيانة مجانية بعد عدد معين من الرحلات مع سفر.”
|
||||||
|
// • “استمتع بخدمات صيانة حصرية عند الوصول إلى عدد محدد من الرحلات.”
|
||||||
|
// • “مع سفر، نقدم لك عروض صيانة مميزة لتحافظ على سيارتك في أفضل حال.”
|
||||||
|
// 3. ميزات فتح حسابات البنوك:
|
||||||
|
// • “مع سفر، يمكنك فتح حساب بنكي بسهولة واستفادة من عروض مميزة.”
|
||||||
|
// • “افتح حساب بنكي مع تطبيق سفر واستفد من خدمات مالية حصرية.”
|
||||||
|
// • “نساعدك على فتح حساب بنكي بأفضل العروض بالتعاون مع البنوك المحلية.”
|
||||||
|
// 4. ميزات ورود السيارات ومعارض السيارات الخاصة بنا:
|
||||||
|
// • “استمتع بعروض مميزة لشراء السيارات من معارض سفر الحصرية.”
|
||||||
|
// • “اختر سيارتك المثالية من معارض سفر بأسعار تنافسية وخدمات مميزة.”
|
||||||
|
// • “نقدم لك أفضل عروض السيارات من معارضنا لتسهيل امتلاك سيارتك الجديدة.”
|
||||||
|
// 5. ميزات أوفر كار:
|
||||||
|
// • “أوفر كار من سفر توفر لك سيارات اقتصادية لزيادة دخلك بكفاءة.”
|
||||||
|
// • “مع أوفر كار، يمكنك العمل بسيارات اقتصادية وتحقيق أرباح أكبر.”
|
||||||
|
// • “تطبيق سفر يقدم لك أوفر كار، الخيار الاقتصادي المثالي لزيادة دخلك.”
|
||||||
|
// 6. مستوى الدخل المحدود والطلبات الاقتصادية:
|
||||||
|
// • “لأصحاب الدخل المحدود، وفرنا طلبات اقتصادية تضمن لك زيادة دخلك.”
|
||||||
|
// • “الطلبات الاقتصادية من سفر تساعدك على زيادة دخلك بسهولة وفعالية.”
|
||||||
|
// • “استفد من طلبات اقتصادية تناسب أصحاب الدخل المحدود لزيادة أرباحك.”
|
||||||
|
// 7. طلبات الليل:
|
||||||
|
// • “مع طلبات الليل من سفر، زود دخلك واستفد من فرص إضافية في المساء.”
|
||||||
|
// • “لا تفوت فرصة طلبات الليل مع سفر، زود دخلك في أي وقت.”
|
||||||
|
// • “طلبات الليل من سفر توفر لك فرصًا إضافية لتحقيق دخل أعلى.”
|
||||||
|
// 8. طلبات الكمفورت الأكثر راحة والسيارات المكيفة:
|
||||||
|
// • “قدّم خدمة مريحة مع طلبات الكمفورت من سفر والسيارات المكيفة.”
|
||||||
|
// • “طلبات الكمفورت توفر تجربة راقية للركاب بسيارات مكيفة ومريحة.”
|
||||||
|
// • “مع سفر، سيارات الكمفورت المكيفة تضمن راحة الركاب وزيادة الطلبات.”
|
||||||
|
// 9. طلبات السبيد:
|
||||||
|
// • “استقبل طلبات السبيد مع سفر لتقديم رحلات أسرع وزيادة دخلك.”
|
||||||
|
// • “طلبات السبيد توفر لك فرصة إكمال المزيد من الرحلات في وقت أقل.”
|
||||||
|
// • “مع طلبات السبيد من سفر، تقدم خدمة سريعة وفعالة لزيادة الأرباح.”
|
||||||
|
// 10. الطلبات الثابتة والمعتدلة السعر والنسبة الثابتة 8%:
|
||||||
|
// • “مع نسبة ثابتة 8%، تحصل على أفضل عروض الأسعار مع سفر.”
|
||||||
|
// • “استمتع بنسبة ثابتة 8%، أقل نسبة بين المنافسين لزيادة دخلك.”
|
||||||
|
// • “طلبات سفر الثابتة تضمن لك دخلاً مستقراً بنسبة أقل من 8%.”
|
||||||
|
|||||||
@@ -11,6 +11,34 @@ class MonthlyPassengerInstall {
|
|||||||
int.parse(json['totalPassengers'].toString().split(':')[0]));
|
int.parse(json['totalPassengers'].toString().split(':')[0]));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
class MonthlyRidesInstall {
|
||||||
|
int day;
|
||||||
|
int totalRides;
|
||||||
|
|
||||||
|
MonthlyRidesInstall({required this.day, required this.totalRides});
|
||||||
|
|
||||||
|
factory MonthlyRidesInstall.fromJson(Map<String, dynamic> json) =>
|
||||||
|
MonthlyRidesInstall(
|
||||||
|
day: int.parse(json['day'].toString().split('-')[2]),
|
||||||
|
totalRides: int.parse(json['totalRides'].toString().split(':')[0]));
|
||||||
|
}
|
||||||
|
|
||||||
|
class MonthlyEmployeeData {
|
||||||
|
int day;
|
||||||
|
int totalEmployees;
|
||||||
|
String name;
|
||||||
|
|
||||||
|
MonthlyEmployeeData(
|
||||||
|
{required this.day, required this.totalEmployees, required this.name});
|
||||||
|
|
||||||
|
factory MonthlyEmployeeData.fromJson(Map<String, dynamic> json) =>
|
||||||
|
MonthlyEmployeeData(
|
||||||
|
day: int.parse(json['date'].toString().split('-')[2]), // Extract day
|
||||||
|
totalEmployees: json['count'],
|
||||||
|
name: json['NAME'],
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
class MonthlyDriverInstall {
|
class MonthlyDriverInstall {
|
||||||
int day;
|
int day;
|
||||||
int totalDrivers;
|
int totalDrivers;
|
||||||
|
|||||||
@@ -8,12 +8,15 @@ import 'package:sefer_admin1/controller/admin/static_controller.dart';
|
|||||||
import 'package:sefer_admin1/controller/notification_controller.dart';
|
import 'package:sefer_admin1/controller/notification_controller.dart';
|
||||||
import 'package:sefer_admin1/views/admin/captain/drivers_cant_registe.dart';
|
import 'package:sefer_admin1/views/admin/captain/drivers_cant_registe.dart';
|
||||||
import 'package:sefer_admin1/views/admin/captain/register_captain.dart';
|
import 'package:sefer_admin1/views/admin/captain/register_captain.dart';
|
||||||
|
import 'package:sefer_admin1/views/widgets/elevated_btn.dart';
|
||||||
|
import 'package:sefer_admin1/views/widgets/my_textField.dart';
|
||||||
import 'package:sefer_admin1/views/widgets/mycircular.dart';
|
import 'package:sefer_admin1/views/widgets/mycircular.dart';
|
||||||
|
|
||||||
import '../../constant/links.dart';
|
import '../../constant/links.dart';
|
||||||
import '../../constant/style.dart';
|
import '../../constant/style.dart';
|
||||||
import '../../controller/functions/crud.dart';
|
import '../../controller/functions/crud.dart';
|
||||||
import '../../controller/functions/gemeni.dart';
|
import '../../controller/functions/gemeni.dart';
|
||||||
|
import '../../print.dart';
|
||||||
import '../widgets/my_scafold.dart';
|
import '../widgets/my_scafold.dart';
|
||||||
import 'captain/captain.dart';
|
import 'captain/captain.dart';
|
||||||
import 'passenger/passenger.dart';
|
import 'passenger/passenger.dart';
|
||||||
@@ -339,12 +342,63 @@ class AdminHomePage extends StatelessWidget {
|
|||||||
Get.to(() => const StaticDash());
|
Get.to(() => const StaticDash());
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
|
AdminWidgetsDashBoard(
|
||||||
|
title: 'send Whatsapp to Drivers',
|
||||||
|
onPressed: () async {
|
||||||
|
Get.defaultDialog(
|
||||||
|
title: 'Are you sure to send by WhatsApp ?',
|
||||||
|
middleText: '',
|
||||||
|
confirm: MyElevatedButton(
|
||||||
|
title: 'Ok',
|
||||||
|
kolor: AppColor.greenColor,
|
||||||
|
onPressed: () async {
|
||||||
|
Log.print(
|
||||||
|
'CRUD().phoneDriversTest.: ${CRUD().phoneDriversTest}');
|
||||||
|
for (var phoneNumber
|
||||||
|
in CRUD().phoneDrivers) {
|
||||||
|
await CRUD().sendWhatsAppAuth(
|
||||||
|
phoneNumber.toString());
|
||||||
|
}
|
||||||
|
}),
|
||||||
|
cancel: MyElevatedButton(
|
||||||
|
title: 'cancel',
|
||||||
|
kolor: AppColor.redColor,
|
||||||
|
onPressed: () => Get.back()));
|
||||||
|
}),
|
||||||
AdminWidgetsDashBoard(
|
AdminWidgetsDashBoard(
|
||||||
title: 'send notification Drivers',
|
title: 'send notification Drivers',
|
||||||
onPressed: () async {
|
onPressed: () async {
|
||||||
await Get.put(NotificationController())
|
await Get.put(NotificationController())
|
||||||
.getTokensDrivers();
|
.getTokensDrivers();
|
||||||
}),
|
}),
|
||||||
|
AdminWidgetsDashBoard(
|
||||||
|
title: 'send SMS Drivers',
|
||||||
|
onPressed: () async {
|
||||||
|
Get.defaultDialog(
|
||||||
|
title: 'Are you sure to send SMS ?',
|
||||||
|
middleText: '',
|
||||||
|
content: Padding(
|
||||||
|
padding: const EdgeInsets.all(8.0),
|
||||||
|
child: Form(
|
||||||
|
key: dashboardController.formKey,
|
||||||
|
child: MyTextForm(
|
||||||
|
controller:
|
||||||
|
dashboardController.smsText,
|
||||||
|
label: 'label',
|
||||||
|
hint: 'hint',
|
||||||
|
type: TextInputType.name)),
|
||||||
|
),
|
||||||
|
confirm: MyElevatedButton(
|
||||||
|
title: 'Ok',
|
||||||
|
kolor: AppColor.greenColor,
|
||||||
|
onPressed: () async {
|
||||||
|
dashboardController.sendSMSMethod();
|
||||||
|
}),
|
||||||
|
cancel: MyElevatedButton(
|
||||||
|
title: 'cancel',
|
||||||
|
kolor: AppColor.redColor,
|
||||||
|
onPressed: () => Get.back()));
|
||||||
|
}),
|
||||||
AdminWidgetsDashBoard(
|
AdminWidgetsDashBoard(
|
||||||
title: 'send notification Passengers',
|
title: 'send notification Passengers',
|
||||||
onPressed: () async {
|
onPressed: () async {
|
||||||
|
|||||||
@@ -230,8 +230,7 @@ class StaticDash extends StatelessWidget {
|
|||||||
lineBarsData: [
|
lineBarsData: [
|
||||||
LineChartBarData(
|
LineChartBarData(
|
||||||
isStepLineChart: true,
|
isStepLineChart: true,
|
||||||
spots: staticController
|
spots: staticController.chartDataRides,
|
||||||
.chartDataDriversCalling,
|
|
||||||
isCurved: true,
|
isCurved: true,
|
||||||
color: Colors
|
color: Colors
|
||||||
.deepPurpleAccent, // Custom color
|
.deepPurpleAccent, // Custom color
|
||||||
@@ -241,7 +240,8 @@ class StaticDash extends StatelessWidget {
|
|||||||
true), // Show dots on each point
|
true), // Show dots on each point
|
||||||
belowBarData: BarAreaData(
|
belowBarData: BarAreaData(
|
||||||
show: true,
|
show: true,
|
||||||
color: Colors.deepPurpleAccent
|
color: const Color.fromARGB(
|
||||||
|
255, 65, 144, 86)
|
||||||
.withOpacity(
|
.withOpacity(
|
||||||
0.3), // Custom gradient color
|
0.3), // Custom gradient color
|
||||||
),
|
),
|
||||||
@@ -267,7 +267,7 @@ class StaticDash extends StatelessWidget {
|
|||||||
),
|
),
|
||||||
bottomTitles: AxisTitles(
|
bottomTitles: AxisTitles(
|
||||||
axisNameWidget: Text(
|
axisNameWidget: Text(
|
||||||
'Total Drivers on month are Calliing ${staticController.staticList[0]['totalMonthlyCallingDrivers']}'
|
'Total Rides on month ${staticController.totalMonthlyRides}'
|
||||||
.tr,
|
.tr,
|
||||||
style: AppStyle.subtitle,
|
style: AppStyle.subtitle,
|
||||||
),
|
),
|
||||||
@@ -279,7 +279,7 @@ class StaticDash extends StatelessWidget {
|
|||||||
),
|
),
|
||||||
leftTitles: AxisTitles(
|
leftTitles: AxisTitles(
|
||||||
axisNameWidget: Text(
|
axisNameWidget: Text(
|
||||||
'Counts of Drivers on days'.tr,
|
'Counts of Rides on days'.tr,
|
||||||
style: const TextStyle(
|
style: const TextStyle(
|
||||||
fontSize: 14,
|
fontSize: 14,
|
||||||
fontWeight: FontWeight.bold),
|
fontWeight: FontWeight.bold),
|
||||||
@@ -308,6 +308,160 @@ class StaticDash extends StatelessWidget {
|
|||||||
const SizedBox(
|
const SizedBox(
|
||||||
height: 5,
|
height: 5,
|
||||||
),
|
),
|
||||||
|
SizedBox(
|
||||||
|
height: Get.height * .3,
|
||||||
|
width: double.maxFinite,
|
||||||
|
child: Padding(
|
||||||
|
padding: const EdgeInsets.all(6),
|
||||||
|
child: Container(
|
||||||
|
decoration: AppStyle.boxDecoration1,
|
||||||
|
height: MediaQuery.of(context).size.height * 0.4,
|
||||||
|
child: LineChart(
|
||||||
|
LineChartData(
|
||||||
|
lineBarsData: [
|
||||||
|
LineChartBarData(
|
||||||
|
spots: staticController
|
||||||
|
.chartDataEmployeeMaryam,
|
||||||
|
isCurved: true,
|
||||||
|
color:
|
||||||
|
Colors.blue, // Custom color for Maryam
|
||||||
|
barWidth: 3,
|
||||||
|
dotData: const FlDotData(show: true),
|
||||||
|
belowBarData: BarAreaData(
|
||||||
|
show: true,
|
||||||
|
color: Colors.blue.withOpacity(0.3)),
|
||||||
|
),
|
||||||
|
LineChartBarData(
|
||||||
|
spots:
|
||||||
|
staticController.chartDataEmployeeRawda,
|
||||||
|
isCurved: true,
|
||||||
|
color: Colors.red, // Custom color for Rawda
|
||||||
|
barWidth: 3,
|
||||||
|
dotData: const FlDotData(show: true),
|
||||||
|
belowBarData: BarAreaData(
|
||||||
|
show: true,
|
||||||
|
color: Colors.red.withOpacity(0.3)),
|
||||||
|
),
|
||||||
|
LineChartBarData(
|
||||||
|
spots:
|
||||||
|
staticController.chartDataEmployeeMena,
|
||||||
|
isCurved: true,
|
||||||
|
color:
|
||||||
|
Colors.green, // Custom color for Mena
|
||||||
|
barWidth: 3,
|
||||||
|
dotData: const FlDotData(show: true),
|
||||||
|
belowBarData: BarAreaData(
|
||||||
|
show: true,
|
||||||
|
color: Colors.green.withOpacity(0.3)),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
titlesData: const FlTitlesData(
|
||||||
|
bottomTitles: AxisTitles(
|
||||||
|
sideTitles: SideTitles(showTitles: true),
|
||||||
|
),
|
||||||
|
leftTitles: AxisTitles(
|
||||||
|
sideTitles: SideTitles(showTitles: true),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
gridData: const FlGridData(show: true),
|
||||||
|
borderData: FlBorderData(show: true),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
// SizedBox(
|
||||||
|
// height: Get.height * .3,
|
||||||
|
// width: double.maxFinite,
|
||||||
|
// // decoration: AppStyle.boxDecoration1,
|
||||||
|
// child: Padding(
|
||||||
|
// padding: const EdgeInsets.all(6),
|
||||||
|
// child: Container(
|
||||||
|
// decoration: AppStyle.boxDecoration1,
|
||||||
|
// height: MediaQuery.of(context).size.height * 0.4,
|
||||||
|
// child: LineChart(
|
||||||
|
// LineChartData(
|
||||||
|
// lineBarsData: [
|
||||||
|
// LineChartBarData(
|
||||||
|
// isStepLineChart: true,
|
||||||
|
// spots: staticController
|
||||||
|
// .chartDataDriversCalling,
|
||||||
|
// isCurved: true,
|
||||||
|
// color: Colors
|
||||||
|
// .deepPurpleAccent, // Custom color
|
||||||
|
// barWidth: 3, // Thinner line
|
||||||
|
// dotData: const FlDotData(
|
||||||
|
// show:
|
||||||
|
// true), // Show dots on each point
|
||||||
|
// belowBarData: BarAreaData(
|
||||||
|
// show: true,
|
||||||
|
// color: Colors.deepPurpleAccent
|
||||||
|
// .withOpacity(
|
||||||
|
// 0.3), // Custom gradient color
|
||||||
|
// ),
|
||||||
|
// isStrokeJoinRound: true,
|
||||||
|
// shadow: const BoxShadow(
|
||||||
|
// color: Colors.yellow,
|
||||||
|
// blurRadius: 4,
|
||||||
|
// offset: Offset(2, 2),
|
||||||
|
// ),
|
||||||
|
// ),
|
||||||
|
// ],
|
||||||
|
// showingTooltipIndicators: const [],
|
||||||
|
// titlesData: FlTitlesData(
|
||||||
|
// show: true,
|
||||||
|
// topTitles: AxisTitles(
|
||||||
|
// axisNameWidget: Text(
|
||||||
|
// 'Days'.tr,
|
||||||
|
// style: const TextStyle(
|
||||||
|
// fontSize: 14,
|
||||||
|
// fontWeight: FontWeight.bold),
|
||||||
|
// ),
|
||||||
|
// axisNameSize: 30,
|
||||||
|
// ),
|
||||||
|
// bottomTitles: AxisTitles(
|
||||||
|
// axisNameWidget: Text(
|
||||||
|
// 'Total Drivers on month are Calliing ${staticController.staticList[0]['totalMonthlyCallingDrivers']}'
|
||||||
|
// .tr,
|
||||||
|
// style: AppStyle.subtitle,
|
||||||
|
// ),
|
||||||
|
// axisNameSize: 30,
|
||||||
|
// sideTitles: const SideTitles(
|
||||||
|
// reservedSize: 30,
|
||||||
|
// showTitles: true,
|
||||||
|
// ),
|
||||||
|
// ),
|
||||||
|
// leftTitles: AxisTitles(
|
||||||
|
// axisNameWidget: Text(
|
||||||
|
// 'Counts of Drivers on days'.tr,
|
||||||
|
// style: const TextStyle(
|
||||||
|
// fontSize: 14,
|
||||||
|
// fontWeight: FontWeight.bold),
|
||||||
|
// ),
|
||||||
|
// axisNameSize: 30,
|
||||||
|
// sideTitles: const SideTitles(
|
||||||
|
// reservedSize: 30,
|
||||||
|
// showTitles: true,
|
||||||
|
// ),
|
||||||
|
// ),
|
||||||
|
// ),
|
||||||
|
// gridData: const FlGridData(show: true),
|
||||||
|
// borderData: FlBorderData(
|
||||||
|
// show: true,
|
||||||
|
// border: const Border(
|
||||||
|
// bottom:
|
||||||
|
// BorderSide(color: Colors.blueAccent),
|
||||||
|
// left:
|
||||||
|
// BorderSide(color: Colors.blueAccent),
|
||||||
|
// ),
|
||||||
|
// ),
|
||||||
|
// ),
|
||||||
|
// ),
|
||||||
|
// ),
|
||||||
|
// )),
|
||||||
|
// const SizedBox(
|
||||||
|
// height: 5,
|
||||||
|
// ),
|
||||||
SizedBox(
|
SizedBox(
|
||||||
height: Get.height * .3,
|
height: Get.height * .3,
|
||||||
width: double.maxFinite,
|
width: double.maxFinite,
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
platform :osx, '10.15'
|
# platform :osx, '10.15'
|
||||||
|
platform :ios, '14.0'
|
||||||
# CocoaPods analytics sends network stats synchronously affecting flutter build latency.
|
# CocoaPods analytics sends network stats synchronously affecting flutter build latency.
|
||||||
ENV['COCOAPODS_DISABLE_STATS'] = 'true'
|
ENV['COCOAPODS_DISABLE_STATS'] = 'true'
|
||||||
|
|
||||||
|
|||||||
@@ -1,181 +0,0 @@
|
|||||||
PODS:
|
|
||||||
- AppAuth (1.7.5):
|
|
||||||
- AppAuth/Core (= 1.7.5)
|
|
||||||
- AppAuth/ExternalUserAgent (= 1.7.5)
|
|
||||||
- AppAuth/Core (1.7.5)
|
|
||||||
- AppAuth/ExternalUserAgent (1.7.5):
|
|
||||||
- AppAuth/Core
|
|
||||||
- file_selector_macos (0.0.1):
|
|
||||||
- FlutterMacOS
|
|
||||||
- Firebase/CoreOnly (10.25.0):
|
|
||||||
- FirebaseCore (= 10.25.0)
|
|
||||||
- Firebase/Messaging (10.25.0):
|
|
||||||
- Firebase/CoreOnly
|
|
||||||
- FirebaseMessaging (~> 10.25.0)
|
|
||||||
- firebase_core (2.32.0):
|
|
||||||
- Firebase/CoreOnly (~> 10.25.0)
|
|
||||||
- FlutterMacOS
|
|
||||||
- firebase_messaging (14.9.4):
|
|
||||||
- Firebase/CoreOnly (~> 10.25.0)
|
|
||||||
- Firebase/Messaging (~> 10.25.0)
|
|
||||||
- firebase_core
|
|
||||||
- FlutterMacOS
|
|
||||||
- FirebaseCore (10.25.0):
|
|
||||||
- FirebaseCoreInternal (~> 10.0)
|
|
||||||
- GoogleUtilities/Environment (~> 7.12)
|
|
||||||
- GoogleUtilities/Logger (~> 7.12)
|
|
||||||
- FirebaseCoreInternal (10.29.0):
|
|
||||||
- "GoogleUtilities/NSData+zlib (~> 7.8)"
|
|
||||||
- FirebaseInstallations (10.29.0):
|
|
||||||
- FirebaseCore (~> 10.0)
|
|
||||||
- GoogleUtilities/Environment (~> 7.8)
|
|
||||||
- GoogleUtilities/UserDefaults (~> 7.8)
|
|
||||||
- PromisesObjC (~> 2.1)
|
|
||||||
- FirebaseMessaging (10.25.0):
|
|
||||||
- FirebaseCore (~> 10.0)
|
|
||||||
- FirebaseInstallations (~> 10.0)
|
|
||||||
- GoogleDataTransport (~> 9.3)
|
|
||||||
- GoogleUtilities/AppDelegateSwizzler (~> 7.8)
|
|
||||||
- GoogleUtilities/Environment (~> 7.8)
|
|
||||||
- GoogleUtilities/Reachability (~> 7.8)
|
|
||||||
- GoogleUtilities/UserDefaults (~> 7.8)
|
|
||||||
- nanopb (< 2.30911.0, >= 2.30908.0)
|
|
||||||
- flutter_secure_storage_macos (6.1.1):
|
|
||||||
- FlutterMacOS
|
|
||||||
- FlutterMacOS (1.0.0)
|
|
||||||
- google_sign_in_ios (0.0.1):
|
|
||||||
- AppAuth (>= 1.7.4)
|
|
||||||
- Flutter
|
|
||||||
- FlutterMacOS
|
|
||||||
- GoogleSignIn (~> 7.1)
|
|
||||||
- GTMSessionFetcher (>= 3.4.0)
|
|
||||||
- GoogleDataTransport (9.4.1):
|
|
||||||
- GoogleUtilities/Environment (~> 7.7)
|
|
||||||
- nanopb (< 2.30911.0, >= 2.30908.0)
|
|
||||||
- PromisesObjC (< 3.0, >= 1.2)
|
|
||||||
- GoogleSignIn (7.1.0):
|
|
||||||
- AppAuth (< 2.0, >= 1.7.3)
|
|
||||||
- GTMAppAuth (< 5.0, >= 4.1.1)
|
|
||||||
- GTMSessionFetcher/Core (~> 3.3)
|
|
||||||
- GoogleUtilities/AppDelegateSwizzler (7.13.3):
|
|
||||||
- GoogleUtilities/Environment
|
|
||||||
- GoogleUtilities/Logger
|
|
||||||
- GoogleUtilities/Network
|
|
||||||
- GoogleUtilities/Privacy
|
|
||||||
- GoogleUtilities/Environment (7.13.3):
|
|
||||||
- GoogleUtilities/Privacy
|
|
||||||
- PromisesObjC (< 3.0, >= 1.2)
|
|
||||||
- GoogleUtilities/Logger (7.13.3):
|
|
||||||
- GoogleUtilities/Environment
|
|
||||||
- GoogleUtilities/Privacy
|
|
||||||
- GoogleUtilities/Network (7.13.3):
|
|
||||||
- GoogleUtilities/Logger
|
|
||||||
- "GoogleUtilities/NSData+zlib"
|
|
||||||
- GoogleUtilities/Privacy
|
|
||||||
- GoogleUtilities/Reachability
|
|
||||||
- "GoogleUtilities/NSData+zlib (7.13.3)":
|
|
||||||
- GoogleUtilities/Privacy
|
|
||||||
- GoogleUtilities/Privacy (7.13.3)
|
|
||||||
- GoogleUtilities/Reachability (7.13.3):
|
|
||||||
- GoogleUtilities/Logger
|
|
||||||
- GoogleUtilities/Privacy
|
|
||||||
- GoogleUtilities/UserDefaults (7.13.3):
|
|
||||||
- GoogleUtilities/Logger
|
|
||||||
- GoogleUtilities/Privacy
|
|
||||||
- GTMAppAuth (4.1.1):
|
|
||||||
- AppAuth/Core (~> 1.7)
|
|
||||||
- GTMSessionFetcher/Core (< 4.0, >= 3.3)
|
|
||||||
- GTMSessionFetcher (3.5.0):
|
|
||||||
- GTMSessionFetcher/Full (= 3.5.0)
|
|
||||||
- GTMSessionFetcher/Core (3.5.0)
|
|
||||||
- GTMSessionFetcher/Full (3.5.0):
|
|
||||||
- GTMSessionFetcher/Core
|
|
||||||
- nanopb (2.30910.0):
|
|
||||||
- nanopb/decode (= 2.30910.0)
|
|
||||||
- nanopb/encode (= 2.30910.0)
|
|
||||||
- nanopb/decode (2.30910.0)
|
|
||||||
- nanopb/encode (2.30910.0)
|
|
||||||
- path_provider_foundation (0.0.1):
|
|
||||||
- Flutter
|
|
||||||
- FlutterMacOS
|
|
||||||
- PromisesObjC (2.4.0)
|
|
||||||
- sqflite (0.0.3):
|
|
||||||
- Flutter
|
|
||||||
- FlutterMacOS
|
|
||||||
- url_launcher_macos (0.0.1):
|
|
||||||
- FlutterMacOS
|
|
||||||
|
|
||||||
DEPENDENCIES:
|
|
||||||
- file_selector_macos (from `Flutter/ephemeral/.symlinks/plugins/file_selector_macos/macos`)
|
|
||||||
- firebase_core (from `Flutter/ephemeral/.symlinks/plugins/firebase_core/macos`)
|
|
||||||
- firebase_messaging (from `Flutter/ephemeral/.symlinks/plugins/firebase_messaging/macos`)
|
|
||||||
- flutter_secure_storage_macos (from `Flutter/ephemeral/.symlinks/plugins/flutter_secure_storage_macos/macos`)
|
|
||||||
- FlutterMacOS (from `Flutter/ephemeral`)
|
|
||||||
- google_sign_in_ios (from `Flutter/ephemeral/.symlinks/plugins/google_sign_in_ios/darwin`)
|
|
||||||
- path_provider_foundation (from `Flutter/ephemeral/.symlinks/plugins/path_provider_foundation/darwin`)
|
|
||||||
- sqflite (from `Flutter/ephemeral/.symlinks/plugins/sqflite/darwin`)
|
|
||||||
- url_launcher_macos (from `Flutter/ephemeral/.symlinks/plugins/url_launcher_macos/macos`)
|
|
||||||
|
|
||||||
SPEC REPOS:
|
|
||||||
trunk:
|
|
||||||
- AppAuth
|
|
||||||
- Firebase
|
|
||||||
- FirebaseCore
|
|
||||||
- FirebaseCoreInternal
|
|
||||||
- FirebaseInstallations
|
|
||||||
- FirebaseMessaging
|
|
||||||
- GoogleDataTransport
|
|
||||||
- GoogleSignIn
|
|
||||||
- GoogleUtilities
|
|
||||||
- GTMAppAuth
|
|
||||||
- GTMSessionFetcher
|
|
||||||
- nanopb
|
|
||||||
- PromisesObjC
|
|
||||||
|
|
||||||
EXTERNAL SOURCES:
|
|
||||||
file_selector_macos:
|
|
||||||
:path: Flutter/ephemeral/.symlinks/plugins/file_selector_macos/macos
|
|
||||||
firebase_core:
|
|
||||||
:path: Flutter/ephemeral/.symlinks/plugins/firebase_core/macos
|
|
||||||
firebase_messaging:
|
|
||||||
:path: Flutter/ephemeral/.symlinks/plugins/firebase_messaging/macos
|
|
||||||
flutter_secure_storage_macos:
|
|
||||||
:path: Flutter/ephemeral/.symlinks/plugins/flutter_secure_storage_macos/macos
|
|
||||||
FlutterMacOS:
|
|
||||||
:path: Flutter/ephemeral
|
|
||||||
google_sign_in_ios:
|
|
||||||
:path: Flutter/ephemeral/.symlinks/plugins/google_sign_in_ios/darwin
|
|
||||||
path_provider_foundation:
|
|
||||||
:path: Flutter/ephemeral/.symlinks/plugins/path_provider_foundation/darwin
|
|
||||||
sqflite:
|
|
||||||
:path: Flutter/ephemeral/.symlinks/plugins/sqflite/darwin
|
|
||||||
url_launcher_macos:
|
|
||||||
:path: Flutter/ephemeral/.symlinks/plugins/url_launcher_macos/macos
|
|
||||||
|
|
||||||
SPEC CHECKSUMS:
|
|
||||||
AppAuth: 501c04eda8a8d11f179dbe8637b7a91bb7e5d2fa
|
|
||||||
file_selector_macos: 54fdab7caa3ac3fc43c9fac4d7d8d231277f8cf2
|
|
||||||
Firebase: 0312a2352584f782ea56f66d91606891d4607f06
|
|
||||||
firebase_core: b5b8b60dad71f93132bbaa21e8d1379367d824f0
|
|
||||||
firebase_messaging: d821ad7103878837085612e389fe66203c5c6c0c
|
|
||||||
FirebaseCore: 7ec4d0484817f12c3373955bc87762d96842d483
|
|
||||||
FirebaseCoreInternal: df84dd300b561c27d5571684f389bf60b0a5c934
|
|
||||||
FirebaseInstallations: 913cf60d0400ebd5d6b63a28b290372ab44590dd
|
|
||||||
FirebaseMessaging: 88950ba9485052891ebe26f6c43a52bb62248952
|
|
||||||
flutter_secure_storage_macos: 59459653abe1adb92abbc8ea747d79f8d19866c9
|
|
||||||
FlutterMacOS: 8f6f14fa908a6fb3fba0cd85dbd81ec4b251fb24
|
|
||||||
google_sign_in_ios: 07375bfbf2620bc93a602c0e27160d6afc6ead38
|
|
||||||
GoogleDataTransport: 6c09b596d841063d76d4288cc2d2f42cc36e1e2a
|
|
||||||
GoogleSignIn: d4281ab6cf21542b1cfaff85c191f230b399d2db
|
|
||||||
GoogleUtilities: ea963c370a38a8069cc5f7ba4ca849a60b6d7d15
|
|
||||||
GTMAppAuth: f69bd07d68cd3b766125f7e072c45d7340dea0de
|
|
||||||
GTMSessionFetcher: 5aea5ba6bd522a239e236100971f10cb71b96ab6
|
|
||||||
nanopb: 438bc412db1928dac798aa6fd75726007be04262
|
|
||||||
path_provider_foundation: 2b6b4c569c0fb62ec74538f866245ac84301af46
|
|
||||||
PromisesObjC: f5707f49cb48b9636751c5b2e7d227e43fba9f47
|
|
||||||
sqflite: 673a0e54cc04b7d6dba8d24fb8095b31c3a99eec
|
|
||||||
url_launcher_macos: 5f437abeda8c85500ceb03f5c1938a8c5a705399
|
|
||||||
|
|
||||||
PODFILE CHECKSUM: 9ebaf0ce3d369aaa26a9ea0e159195ed94724cf3
|
|
||||||
|
|
||||||
COCOAPODS: 1.15.2
|
|
||||||
28
pubspec.lock
28
pubspec.lock
@@ -700,18 +700,18 @@ packages:
|
|||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: leak_tracker
|
name: leak_tracker
|
||||||
sha256: "7f0df31977cb2c0b88585095d168e689669a2cc9b97c309665e3386f3e9d341a"
|
sha256: "3f87a60e8c63aecc975dda1ceedbc8f24de75f09e4856ea27daf8958f2f0ce05"
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "10.0.4"
|
version: "10.0.5"
|
||||||
leak_tracker_flutter_testing:
|
leak_tracker_flutter_testing:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: leak_tracker_flutter_testing
|
name: leak_tracker_flutter_testing
|
||||||
sha256: "06e98f569d004c1315b991ded39924b21af84cf14cc94791b8aea337d25b57f8"
|
sha256: "932549fb305594d82d7183ecd9fa93463e9914e1b67cacc34bc40906594a1806"
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "3.0.3"
|
version: "3.0.5"
|
||||||
leak_tracker_testing:
|
leak_tracker_testing:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
@@ -788,18 +788,18 @@ packages:
|
|||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: material_color_utilities
|
name: material_color_utilities
|
||||||
sha256: "0e0a020085b65b6083975e499759762399b4475f766c21668c4ecca34ea74e5a"
|
sha256: f7142bb1154231d7ea5f96bc7bde4bda2a0945d2806bb11670e30b850d56bdec
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "0.8.0"
|
version: "0.11.1"
|
||||||
meta:
|
meta:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: meta
|
name: meta
|
||||||
sha256: "7687075e408b093f36e6bbf6c91878cc0d4cd10f409506f7bc996f68220b9136"
|
sha256: bdb68674043280c3428e9ec998512fb681678676b3c54e773629ffe74419f8c7
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.12.0"
|
version: "1.15.0"
|
||||||
mime:
|
mime:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
@@ -1040,10 +1040,10 @@ packages:
|
|||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: test_api
|
name: test_api
|
||||||
sha256: "9955ae474176f7ac8ee4e989dadfb411a58c30415bcfb648fa04b2b8a03afa7f"
|
sha256: "5b8a98dafc4d5c4c9c72d8b31ab2b23fc13422348d2997120294d3bac86b4ddb"
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "0.7.0"
|
version: "0.7.2"
|
||||||
timing:
|
timing:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
@@ -1136,10 +1136,10 @@ packages:
|
|||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: vm_service
|
name: vm_service
|
||||||
sha256: "3923c89304b715fb1eb6423f017651664a03bf5f4b29983627c4da791f74a4ec"
|
sha256: "5c5f338a667b4c644744b661f309fb8080bb94b18a7e91ef1dbd343bed00ed6d"
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "14.2.1"
|
version: "14.2.5"
|
||||||
watcher:
|
watcher:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
@@ -1168,10 +1168,10 @@ packages:
|
|||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: win32
|
name: win32
|
||||||
sha256: "0eaf06e3446824099858367950a813472af675116bf63f008a4c2a75ae13e9cb"
|
sha256: "68d1e89a91ed61ad9c370f9f8b6effed9ae5e0ede22a270bdfa6daf79fc2290a"
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "5.5.0"
|
version: "5.5.4"
|
||||||
xdg_directories:
|
xdg_directories:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
|
|||||||
Reference in New Issue
Block a user