7/6/1
This commit is contained in:
@@ -1,46 +1,36 @@
|
|||||||
plugins {
|
plugins {
|
||||||
id "com.android.application"
|
id "com.android.application"
|
||||||
// START: FlutterFire Configuration
|
|
||||||
id 'com.google.gms.google-services'
|
|
||||||
// END: FlutterFire Configuration
|
|
||||||
id "kotlin-android"
|
id "kotlin-android"
|
||||||
|
// The Flutter Gradle Plugin must be applied after the Android and Kotlin Gradle plugins.
|
||||||
id "dev.flutter.flutter-gradle-plugin"
|
id "dev.flutter.flutter-gradle-plugin"
|
||||||
}
|
}
|
||||||
|
|
||||||
def localProperties = new Properties()
|
def localProperties = new Properties()
|
||||||
def localPropertiesFile = rootProject.file('local.properties')
|
def localPropertiesFile = rootProject.file("local.properties")
|
||||||
if (localPropertiesFile.exists()) {
|
if (localPropertiesFile.exists()) {
|
||||||
localPropertiesFile.withReader('UTF-8') { reader ->
|
localPropertiesFile.withReader("UTF-8") { reader ->
|
||||||
localProperties.load(reader)
|
localProperties.load(reader)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
def flutterVersionCode = localProperties.getProperty('flutter.versionCode')
|
def flutterVersionCode = localProperties.getProperty("flutter.versionCode")
|
||||||
if (flutterVersionCode == null) {
|
if (flutterVersionCode == null) {
|
||||||
flutterVersionCode = '1'
|
flutterVersionCode = "1"
|
||||||
}
|
}
|
||||||
|
|
||||||
def flutterVersionName = localProperties.getProperty('flutter.versionName')
|
def flutterVersionName = localProperties.getProperty("flutter.versionName")
|
||||||
if (flutterVersionName == null) {
|
if (flutterVersionName == null) {
|
||||||
flutterVersionName = '1.0'
|
flutterVersionName = "1.0"
|
||||||
}
|
}
|
||||||
|
|
||||||
android {
|
android {
|
||||||
namespace "com.example.sefer_admin1"
|
namespace = "com.example.sefer_admin1"
|
||||||
compileSdk flutter.compileSdkVersion
|
compileSdk = flutter.compileSdkVersion
|
||||||
ndkVersion flutter.ndkVersion
|
ndkVersion = flutter.ndkVersion
|
||||||
|
|
||||||
compileOptions {
|
compileOptions {
|
||||||
sourceCompatibility JavaVersion.VERSION_1_8
|
sourceCompatibility = JavaVersion.VERSION_1_8
|
||||||
targetCompatibility JavaVersion.VERSION_1_8
|
targetCompatibility = JavaVersion.VERSION_1_8
|
||||||
}
|
|
||||||
|
|
||||||
kotlinOptions {
|
|
||||||
jvmTarget = '1.8'
|
|
||||||
}
|
|
||||||
|
|
||||||
sourceSets {
|
|
||||||
main.java.srcDirs += 'src/main/kotlin'
|
|
||||||
}
|
}
|
||||||
|
|
||||||
defaultConfig {
|
defaultConfig {
|
||||||
@@ -48,23 +38,22 @@ android {
|
|||||||
applicationId "com.example.sefer_admin1"
|
applicationId "com.example.sefer_admin1"
|
||||||
// You can update the following values to match your application needs.
|
// You can update the following values to match your application needs.
|
||||||
// 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 23
|
minSdk = 23
|
||||||
targetSdkVersion flutter.targetSdkVersion
|
targetSdk = flutter.targetSdkVersion
|
||||||
versionCode flutterVersionCode.toInteger()
|
versionCode = flutterVersionCode.toInteger()
|
||||||
versionName flutterVersionName
|
versionName = flutterVersionName
|
||||||
}
|
}
|
||||||
|
|
||||||
buildTypes {
|
buildTypes {
|
||||||
release {
|
release {
|
||||||
// TODO: Add your own signing config for the release build.
|
// TODO: Add your own signing config for the release build.
|
||||||
// Signing with the debug keys for now, so `flutter run --release` works.
|
// Signing with the debug keys for now, so `flutter run --release` works.
|
||||||
signingConfig signingConfigs.debug
|
signingConfig = signingConfigs.debug
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
flutter {
|
flutter {
|
||||||
source '../..'
|
source = "../.."
|
||||||
}
|
}
|
||||||
|
|
||||||
dependencies {}
|
|
||||||
|
|||||||
@@ -1,17 +1,3 @@
|
|||||||
buildscript {
|
|
||||||
ext.kotlin_version = '2.0.0' // Update to the latest version
|
|
||||||
|
|
||||||
repositories {
|
|
||||||
google()
|
|
||||||
mavenCentral()
|
|
||||||
}
|
|
||||||
|
|
||||||
dependencies {
|
|
||||||
classpath "com.android.tools.build:gradle:8.1.4"
|
|
||||||
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
allprojects {
|
allprojects {
|
||||||
repositories {
|
repositories {
|
||||||
google()
|
google()
|
||||||
@@ -19,12 +5,12 @@ allprojects {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
rootProject.buildDir = '../build'
|
rootProject.buildDir = "../build"
|
||||||
subprojects {
|
subprojects {
|
||||||
project.buildDir = "${rootProject.buildDir}/${project.name}"
|
project.buildDir = "${rootProject.buildDir}/${project.name}"
|
||||||
}
|
}
|
||||||
subprojects {
|
subprojects {
|
||||||
project.evaluationDependsOn(':app')
|
project.evaluationDependsOn(":app")
|
||||||
}
|
}
|
||||||
|
|
||||||
tasks.register("clean", Delete) {
|
tasks.register("clean", Delete) {
|
||||||
|
|||||||
@@ -1,3 +1,6 @@
|
|||||||
org.gradle.jvmargs=-Xmx4G
|
org.gradle.jvmargs=-Xmx4G
|
||||||
android.useAndroidX=true
|
android.useAndroidX=true
|
||||||
android.enableJetifier=true
|
android.enableJetifier=true
|
||||||
|
android.defaults.buildfeatures.buildconfig=true
|
||||||
|
android.nonTransitiveRClass=false
|
||||||
|
android.nonFinalResIds=false
|
||||||
|
|||||||
@@ -2,4 +2,4 @@ distributionBase=GRADLE_USER_HOME
|
|||||||
distributionPath=wrapper/dists
|
distributionPath=wrapper/dists
|
||||||
zipStoreBase=GRADLE_USER_HOME
|
zipStoreBase=GRADLE_USER_HOME
|
||||||
zipStorePath=wrapper/dists
|
zipStorePath=wrapper/dists
|
||||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.1-bin.zip
|
distributionUrl=https\://services.gradle.org/distributions/gradle-8.6-bin.zip
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ pluginManagement {
|
|||||||
|
|
||||||
plugins {
|
plugins {
|
||||||
id "dev.flutter.flutter-plugin-loader" version "1.0.0"
|
id "dev.flutter.flutter-plugin-loader" version "1.0.0"
|
||||||
id "com.android.application" version "7.3.0" apply false
|
id "com.android.application" version '8.4.0' apply false
|
||||||
// START: FlutterFire Configuration
|
// START: FlutterFire Configuration
|
||||||
id "com.google.gms.google-services" version "4.3.15" apply false
|
id "com.google.gms.google-services" version "4.3.15" apply false
|
||||||
// END: FlutterFire Configuration
|
// END: FlutterFire Configuration
|
||||||
|
|||||||
@@ -222,4 +222,8 @@ class AppLink {
|
|||||||
static String getRidesPerMonth =
|
static String getRidesPerMonth =
|
||||||
"$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 =
|
||||||
|
"https://api.sefer.live/sefer/serviceApp/getPassengersStatic.php";
|
||||||
|
static String getdriverstotalMonthly =
|
||||||
|
"https://api.sefer.live/sefer/serviceApp/getdriverstotalMonthly.php";
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -10,6 +10,7 @@ class DashboardController extends GetxController {
|
|||||||
bool isLoading = false;
|
bool isLoading = false;
|
||||||
List dashbord = [];
|
List dashbord = [];
|
||||||
int creditSMS = 0;
|
int creditSMS = 0;
|
||||||
|
|
||||||
Future getDashBoard() async {
|
Future getDashBoard() async {
|
||||||
isLoading = true;
|
isLoading = true;
|
||||||
update();
|
update();
|
||||||
@@ -31,8 +32,9 @@ class DashboardController extends GetxController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void onInit() {
|
void onInit() async {
|
||||||
getDashBoard();
|
getDashBoard();
|
||||||
|
|
||||||
super.onInit();
|
super.onInit();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
79
lib/controller/admin/static_controller.dart
Normal file
79
lib/controller/admin/static_controller.dart
Normal file
@@ -0,0 +1,79 @@
|
|||||||
|
import 'dart:convert';
|
||||||
|
|
||||||
|
import 'package:fl_chart/fl_chart.dart';
|
||||||
|
import 'package:get/get.dart';
|
||||||
|
|
||||||
|
import '../../constant/links.dart';
|
||||||
|
import '../../models/model/passengers_model.dart';
|
||||||
|
import '../functions/crud.dart';
|
||||||
|
|
||||||
|
class StaticController extends GetxController {
|
||||||
|
Map<String, dynamic> jsonData1 = {};
|
||||||
|
Map<String, dynamic> jsonData2 = {};
|
||||||
|
var chartDataPassengers;
|
||||||
|
var chartDataDrivers;
|
||||||
|
bool isLoading = false;
|
||||||
|
String totalMonthlyPassengers = '';
|
||||||
|
String totalMonthlyDrivers = '';
|
||||||
|
late List<MonthlyPassengerInstall> passengersData;
|
||||||
|
late List<MonthlyDriverInstall> driversData;
|
||||||
|
|
||||||
|
Future<void> fetch() async {
|
||||||
|
isLoading = true;
|
||||||
|
update(); // Notify the observers about the loading state change
|
||||||
|
|
||||||
|
var res = await CRUD().get(
|
||||||
|
link: AppLink.getPassengersStatic,
|
||||||
|
payload: {},
|
||||||
|
);
|
||||||
|
jsonData1 = jsonDecode(res);
|
||||||
|
var jsonResponse = jsonDecode(res) as Map<String, dynamic>;
|
||||||
|
isLoading = false;
|
||||||
|
final List<dynamic> jsonData = jsonResponse['message'];
|
||||||
|
totalMonthlyPassengers = jsonData[0]['totalMonthly'].toString();
|
||||||
|
passengersData = jsonData.map<MonthlyPassengerInstall>((item) {
|
||||||
|
return MonthlyPassengerInstall.fromJson(item);
|
||||||
|
}).toList();
|
||||||
|
final List<FlSpot> spots = passengersData
|
||||||
|
.map((data) => FlSpot(
|
||||||
|
data.day.toDouble(),
|
||||||
|
data.totalPassengers.toDouble(),
|
||||||
|
))
|
||||||
|
.toList();
|
||||||
|
chartDataPassengers = spots;
|
||||||
|
|
||||||
|
update(); // Notify the observers about the data and loading state change
|
||||||
|
}
|
||||||
|
|
||||||
|
Future<void> fetchDrivers() async {
|
||||||
|
isLoading = true;
|
||||||
|
update(); // Notify the observers about the loading state change
|
||||||
|
|
||||||
|
var res = await CRUD().get(
|
||||||
|
link: AppLink.getdriverstotalMonthly,
|
||||||
|
payload: {},
|
||||||
|
);
|
||||||
|
jsonData2 = jsonDecode(res);
|
||||||
|
var jsonResponse = jsonDecode(res) as Map<String, dynamic>;
|
||||||
|
isLoading = false;
|
||||||
|
final List<dynamic> jsonData = jsonResponse['message'];
|
||||||
|
totalMonthlyDrivers = jsonData[0]['totalMonthly'].toString();
|
||||||
|
driversData = jsonData.map<MonthlyDriverInstall>((item) {
|
||||||
|
return MonthlyDriverInstall.fromJson(item);
|
||||||
|
}).toList();
|
||||||
|
final List<FlSpot> spots = driversData
|
||||||
|
.map((data) => FlSpot(
|
||||||
|
data.day.toDouble(),
|
||||||
|
data.totalDrivers.toDouble(),
|
||||||
|
))
|
||||||
|
.toList();
|
||||||
|
chartDataDrivers = spots;
|
||||||
|
|
||||||
|
update(); // Notify the observers about the data and loading state change
|
||||||
|
}
|
||||||
|
|
||||||
|
Future getAll() async {
|
||||||
|
await fetch();
|
||||||
|
await fetchDrivers();
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -4,6 +4,7 @@ import 'package:get/get.dart';
|
|||||||
import 'package:http/http.dart' as http;
|
import 'package:http/http.dart' as http;
|
||||||
|
|
||||||
import '../../../constant/links.dart';
|
import '../../../constant/links.dart';
|
||||||
|
import '../../constant/api_key.dart';
|
||||||
import '../../constant/box_name.dart';
|
import '../../constant/box_name.dart';
|
||||||
import '../../constant/colors.dart';
|
import '../../constant/colors.dart';
|
||||||
import '../../main.dart';
|
import '../../main.dart';
|
||||||
@@ -21,15 +22,13 @@ class PaymobPayout extends GetxController {
|
|||||||
};
|
};
|
||||||
var body = {
|
var body = {
|
||||||
'grant_type': 'password',
|
'grant_type': 'password',
|
||||||
'username': 'sefer_api_checker',
|
'username': AK.payMobOutUserName,
|
||||||
'password': '#c3pSwbUxOKpQnr5hHZAgpkSW',
|
'password': AK.payMobOutPassword,
|
||||||
'client_id': 'kmNWU5gKsL8LKVhsJFbOGTEb3YQ5sQhvBoB8pqoW',
|
'client_id': AK.payMobOutClient_id,
|
||||||
'client_secret':
|
'client_secret': AK.payMobOutClientSecrret
|
||||||
'htV6nFANLDd658ueTEuMrIqwjcXsocMXmBLAYof7FuutBcSxdTdoNqFl3EAvO6zrOgGPLdiMrofNp2V9ASVRpjoSlFjDNRzY7hfPunAJEgf2N5ZUuknN4QniaqIZvaNt'
|
|
||||||
};
|
};
|
||||||
var res = await http.post(
|
var res = await http.post(
|
||||||
Uri.parse(
|
Uri.parse('https://payouts.paymobsolutions.com/api/secure/o/token/'),
|
||||||
'https://stagingpayouts.paymobsolutions.com/api/secure/o/token/'),
|
|
||||||
headers: headers,
|
headers: headers,
|
||||||
body: body,
|
body: body,
|
||||||
);
|
);
|
||||||
@@ -53,8 +52,7 @@ class PaymobPayout extends GetxController {
|
|||||||
"msisdn": msisdn, // "01023456789"
|
"msisdn": msisdn, // "01023456789"
|
||||||
});
|
});
|
||||||
var res = await http.post(
|
var res = await http.post(
|
||||||
Uri.parse(
|
Uri.parse('https://payouts.paymobsolutions.com/api/secure/disburse/'),
|
||||||
'https://stagingpayouts.paymobsolutions.com/api/secure/disburse/'),
|
|
||||||
headers: headers,
|
headers: headers,
|
||||||
body: body,
|
body: body,
|
||||||
);
|
);
|
||||||
@@ -64,7 +62,7 @@ class PaymobPayout extends GetxController {
|
|||||||
'rideId': DateTime.now().toIso8601String(),
|
'rideId': DateTime.now().toIso8601String(),
|
||||||
'amount': ((-1) * (double.parse(dec['amount'])) + 5).toStringAsFixed(0),
|
'amount': ((-1) * (double.parse(dec['amount'])) + 5).toStringAsFixed(0),
|
||||||
'payment_method': 'payout',
|
'payment_method': 'payout',
|
||||||
'passengerID': 'myself',
|
'passengerID': 'admin',
|
||||||
'driverID': box.read(BoxName.driverID).toString(),
|
'driverID': box.read(BoxName.driverID).toString(),
|
||||||
});
|
});
|
||||||
Get.snackbar('Transaction successful'.tr,
|
Get.snackbar('Transaction successful'.tr,
|
||||||
@@ -94,8 +92,7 @@ class PaymobPayout extends GetxController {
|
|||||||
};
|
};
|
||||||
var res = await http
|
var res = await http
|
||||||
.post(
|
.post(
|
||||||
Uri.parse(
|
Uri.parse('https://payouts.paymobsolutions.com/api/secure/disburse/'),
|
||||||
'https://stagingpayouts.paymobsolutions.com/api/secure/disburse/'),
|
|
||||||
headers: headers,
|
headers: headers,
|
||||||
body: body,
|
body: body,
|
||||||
)
|
)
|
||||||
|
|||||||
25
lib/models/model/passengers_model.dart
Normal file
25
lib/models/model/passengers_model.dart
Normal file
@@ -0,0 +1,25 @@
|
|||||||
|
class MonthlyPassengerInstall {
|
||||||
|
int day;
|
||||||
|
int totalPassengers;
|
||||||
|
|
||||||
|
MonthlyPassengerInstall({required this.day, required this.totalPassengers});
|
||||||
|
|
||||||
|
factory MonthlyPassengerInstall.fromJson(Map<String, dynamic> json) =>
|
||||||
|
MonthlyPassengerInstall(
|
||||||
|
day: int.parse(json['day'].toString().split('-')[2]),
|
||||||
|
totalPassengers:
|
||||||
|
int.parse(json['totalPassengers'].toString().split(':')[0]));
|
||||||
|
}
|
||||||
|
|
||||||
|
class MonthlyDriverInstall {
|
||||||
|
int day;
|
||||||
|
int totalDrivers;
|
||||||
|
|
||||||
|
MonthlyDriverInstall({required this.day, required this.totalDrivers});
|
||||||
|
|
||||||
|
factory MonthlyDriverInstall.fromJson(Map<String, dynamic> json) =>
|
||||||
|
MonthlyDriverInstall(
|
||||||
|
day: int.parse(json['day'].toString().split('-')[2]),
|
||||||
|
totalDrivers:
|
||||||
|
int.parse(json['totalDrivers'].toString().split(':')[0]));
|
||||||
|
}
|
||||||
@@ -1,7 +1,9 @@
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:get/get.dart';
|
import 'package:get/get.dart';
|
||||||
import 'package:get/get_rx/src/rx_typedefs/rx_typedefs.dart';
|
import 'package:get/get_rx/src/rx_typedefs/rx_typedefs.dart';
|
||||||
|
import 'package:sefer_admin1/constant/colors.dart';
|
||||||
import 'package:sefer_admin1/controller/admin/dashboard_controller.dart';
|
import 'package:sefer_admin1/controller/admin/dashboard_controller.dart';
|
||||||
|
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/widgets/mycircular.dart';
|
import 'package:sefer_admin1/views/widgets/mycircular.dart';
|
||||||
|
|
||||||
@@ -25,6 +27,15 @@ class AdminHomePage extends StatelessWidget {
|
|||||||
|
|
||||||
return MyScafolld(
|
return MyScafolld(
|
||||||
title: 'Admin Home Page',
|
title: 'Admin Home Page',
|
||||||
|
action: IconButton(
|
||||||
|
onPressed: () async {
|
||||||
|
await Get.find<DashboardController>().getDashBoard();
|
||||||
|
},
|
||||||
|
icon: const Icon(
|
||||||
|
Icons.refresh,
|
||||||
|
color: AppColor.greenColor,
|
||||||
|
),
|
||||||
|
),
|
||||||
body: [
|
body: [
|
||||||
GetBuilder<DashboardController>(builder: (dashboardController) {
|
GetBuilder<DashboardController>(builder: (dashboardController) {
|
||||||
return dashboardController.dashbord.isEmpty
|
return dashboardController.dashbord.isEmpty
|
||||||
@@ -318,8 +329,13 @@ class AdminHomePage extends StatelessWidget {
|
|||||||
onPressed: () => Get.to(() => Rides(),
|
onPressed: () => Get.to(() => Rides(),
|
||||||
transition: Transition.downToUp)),
|
transition: Transition.downToUp)),
|
||||||
AdminWidgetsDashBoard(
|
AdminWidgetsDashBoard(
|
||||||
title: 'Static',
|
title: 'Static',
|
||||||
onPressed: () => Get.to(() => const StaticDash())),
|
onPressed: () async {
|
||||||
|
await Get.put(StaticController()).getAll();
|
||||||
|
|
||||||
|
Get.to(() => const StaticDash());
|
||||||
|
},
|
||||||
|
),
|
||||||
AdminWidgetsDashBoard(
|
AdminWidgetsDashBoard(
|
||||||
title: 'send notification Drivers',
|
title: 'send notification Drivers',
|
||||||
onPressed: () async {
|
onPressed: () async {
|
||||||
|
|||||||
@@ -1,6 +1,10 @@
|
|||||||
|
import 'package:fl_chart/fl_chart.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:get/get.dart';
|
import 'package:get/get.dart';
|
||||||
|
import 'package:sefer_admin1/constant/style.dart';
|
||||||
|
import 'package:sefer_admin1/controller/admin/static_controller.dart';
|
||||||
|
|
||||||
|
import '../../../constant/colors.dart';
|
||||||
import '../../widgets/my_scafold.dart';
|
import '../../widgets/my_scafold.dart';
|
||||||
|
|
||||||
class StaticDash extends StatelessWidget {
|
class StaticDash extends StatelessWidget {
|
||||||
@@ -8,6 +12,193 @@ class StaticDash extends StatelessWidget {
|
|||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return MyScafolld(title: 'Static Dash'.tr, body: [], isleading: true);
|
Get.put(StaticController());
|
||||||
|
return MyScafolld(
|
||||||
|
title: 'Static Dash'.tr,
|
||||||
|
body: [
|
||||||
|
GetBuilder<StaticController>(builder: (staticController) {
|
||||||
|
return Column(
|
||||||
|
children: [
|
||||||
|
Container(
|
||||||
|
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.chartDataPassengers,
|
||||||
|
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 passengers on month ${staticController.totalMonthlyPassengers}'
|
||||||
|
.tr,
|
||||||
|
style: const TextStyle(
|
||||||
|
fontSize: 14,
|
||||||
|
fontWeight: FontWeight.bold),
|
||||||
|
),
|
||||||
|
axisNameSize: 30,
|
||||||
|
sideTitles: const SideTitles(
|
||||||
|
reservedSize: 30,
|
||||||
|
showTitles: true,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
leftTitles: AxisTitles(
|
||||||
|
axisNameWidget: Text(
|
||||||
|
'Counts of Passengers 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,
|
||||||
|
),
|
||||||
|
Container(
|
||||||
|
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.chartDataDrivers,
|
||||||
|
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 ${staticController.totalMonthlyDrivers}'
|
||||||
|
.tr,
|
||||||
|
style: const TextStyle(
|
||||||
|
fontSize: 14,
|
||||||
|
fontWeight: FontWeight.bold),
|
||||||
|
),
|
||||||
|
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,
|
||||||
|
),
|
||||||
|
],
|
||||||
|
);
|
||||||
|
})
|
||||||
|
],
|
||||||
|
isleading: true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
24
pubspec.lock
24
pubspec.lock
@@ -588,26 +588,26 @@ packages:
|
|||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: leak_tracker
|
name: leak_tracker
|
||||||
sha256: "78eb209deea09858f5269f5a5b02be4049535f568c07b275096836f01ea323fa"
|
sha256: "7f0df31977cb2c0b88585095d168e689669a2cc9b97c309665e3386f3e9d341a"
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "10.0.0"
|
version: "10.0.4"
|
||||||
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: b46c5e37c19120a8a01918cfaf293547f47269f7cb4b0058f21531c2465d6ef0
|
sha256: "06e98f569d004c1315b991ded39924b21af84cf14cc94791b8aea337d25b57f8"
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.0.1"
|
version: "3.0.3"
|
||||||
leak_tracker_testing:
|
leak_tracker_testing:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: leak_tracker_testing
|
name: leak_tracker_testing
|
||||||
sha256: a597f72a664dbd293f3bfc51f9ba69816f84dcd403cdac7066cb3f6003f3ab47
|
sha256: "6ba465d5d76e67ddf503e1161d1f4a6bc42306f9d66ca1e8f079a47290fb06d3"
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.0.1"
|
version: "3.0.1"
|
||||||
lints:
|
lints:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
@@ -708,10 +708,10 @@ packages:
|
|||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: meta
|
name: meta
|
||||||
sha256: d584fa6707a52763a52446f02cc621b077888fb63b93bbcb1143a7be5a0c0c04
|
sha256: "7687075e408b093f36e6bbf6c91878cc0d4cd10f409506f7bc996f68220b9136"
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.11.0"
|
version: "1.12.0"
|
||||||
mime:
|
mime:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
@@ -945,10 +945,10 @@ packages:
|
|||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: test_api
|
name: test_api
|
||||||
sha256: "5c2f730018264d276c20e4f1503fd1308dfbbae39ec8ee63c5236311ac06954b"
|
sha256: "9955ae474176f7ac8ee4e989dadfb411a58c30415bcfb648fa04b2b8a03afa7f"
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "0.6.1"
|
version: "0.7.0"
|
||||||
timing:
|
timing:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
@@ -1041,10 +1041,10 @@ packages:
|
|||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: vm_service
|
name: vm_service
|
||||||
sha256: b3d56ff4341b8f182b96aceb2fa20e3dcb336b9f867bc0eafc0de10f1048e957
|
sha256: "3923c89304b715fb1eb6423f017651664a03bf5f4b29983627c4da791f74a4ec"
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "13.0.0"
|
version: "14.2.1"
|
||||||
watcher:
|
watcher:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
|
|||||||
Reference in New Issue
Block a user