This commit is contained in:
Hamza-Ayed
2024-07-08 10:04:33 +03:00
parent a40c1e05e3
commit 9976a1abea
9 changed files with 44 additions and 124 deletions

3
.vscode/settings.json vendored Normal file
View File

@@ -0,0 +1,3 @@
{
"java.configuration.updateBuildConfiguration": "interactive"
}

View File

@@ -26,7 +26,7 @@ if (flutterVersionName == null) {
android { android {
namespace = "com.example.sefer_admin1" namespace = "com.example.sefer_admin1"
compileSdk = flutter.compileSdkVersion compileSdk = flutter.compileSdkVersion
ndkVersion = flutter.ndkVersion ndkVersion = "26.1.10909125"
compileOptions { compileOptions {
sourceCompatibility = JavaVersion.VERSION_1_8 sourceCompatibility = JavaVersion.VERSION_1_8

View File

@@ -1,24 +1,12 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"> <manifest xmlns:android="http://schemas.android.com/apk/res/android">
<application <uses-permission android:name="android.permission.INTERNET" />
android:label="sefer_admin1" <application android:label="sefer_admin1" android:name="${applicationName}" android:icon="@mipmap/ic_launcher">
android:name="${applicationName}" <activity android:name=".MainActivity" android:exported="true" android:launchMode="singleTop" android:theme="@style/LaunchTheme" android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode" android:hardwareAccelerated="true" android:windowSoftInputMode="adjustResize">
android:icon="@mipmap/ic_launcher">
<activity
android:name=".MainActivity"
android:exported="true"
android:launchMode="singleTop"
android:theme="@style/LaunchTheme"
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
android:hardwareAccelerated="true"
android:windowSoftInputMode="adjustResize">
<!-- Specifies an Android theme to apply to this Activity as soon as <!-- Specifies an Android theme to apply to this Activity as soon as
the Android process has started. This theme is visible to the user the Android process has started. This theme is visible to the user
while the Flutter UI initializes. After that, this theme continues while the Flutter UI initializes. After that, this theme continues
to determine the Window background behind the Flutter UI. --> to determine the Window background behind the Flutter UI. -->
<meta-data <meta-data android:name="io.flutter.embedding.android.NormalTheme" android:resource="@style/NormalTheme" />
android:name="io.flutter.embedding.android.NormalTheme"
android:resource="@style/NormalTheme"
/>
<intent-filter> <intent-filter>
<action android:name="android.intent.action.MAIN"/> <action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/> <category android:name="android.intent.category.LAUNCHER"/>
@@ -26,12 +14,9 @@
</activity> </activity>
<!-- Don't delete the meta-data below. <!-- Don't delete the meta-data below.
This is used by the Flutter tool to generate GeneratedPluginRegistrant.java --> This is used by the Flutter tool to generate GeneratedPluginRegistrant.java -->
<meta-data <meta-data android:name="flutterEmbedding" android:value="2" />
android:name="flutterEmbedding"
android:value="2" />
</application> </application>
<!-- Required to query activities that can process text, see: <!-- Required to query activities that can process text, see: https://developer.android.com/training/package-visibility?hl=en and
https://developer.android.com/training/package-visibility?hl=en and
https://developer.android.com/reference/android/content/Intent#ACTION_PROCESS_TEXT. https://developer.android.com/reference/android/content/Intent#ACTION_PROCESS_TEXT.
In particular, this is used by the Flutter engine in io.flutter.plugin.text.ProcessTextPlugin. --> In particular, this is used by the Flutter engine in io.flutter.plugin.text.ProcessTextPlugin. -->

View File

@@ -1,3 +1,18 @@
buildscript {
ext.kotlin_version = '1.9.10'
// Update to a compatible Kotlin version
repositories {
google()
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:8.0.2' // Use a compatible AGP version
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}
allprojects { allprojects {
repositories { repositories {
google() google()
@@ -6,10 +21,9 @@ allprojects {
} }
rootProject.buildDir = "../build" rootProject.buildDir = "../build"
subprojects { subprojects {
project.buildDir = "${rootProject.buildDir}/${project.name}" project.buildDir = "${rootProject.buildDir}/${project.name}"
}
subprojects {
project.evaluationDependsOn(":app") project.evaluationDependsOn(":app")
} }

View File

@@ -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 '8.4.0' apply false id "com.android.application" version '8.0.2' 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

View File

@@ -1,16 +1,16 @@
import 'package:location/location.dart'; // import 'package:location/location.dart';
import 'package:get/get.dart'; // import 'package:get/get.dart';
class LocationPermissions { // class LocationPermissions {
late Location location; // late Location location;
Future locationPermissions() async { // Future locationPermissions() async {
location = Location(); // location = Location();
var permissionStatus = await location.requestPermission(); // var permissionStatus = await location.requestPermission();
if (permissionStatus == PermissionStatus.denied) { // if (permissionStatus == PermissionStatus.denied) {
// The user denied the location permission. // // The user denied the location permission.
Get.defaultDialog(title: 'GPS Required Allow !.'.tr, middleText: ''); // Get.defaultDialog(title: 'GPS Required Allow !.'.tr, middleText: '');
return null; // return null;
} // }
} // }
} // }

View File

@@ -9,7 +9,6 @@ import firebase_core
import firebase_messaging import firebase_messaging
import flutter_secure_storage_macos import flutter_secure_storage_macos
import google_sign_in_ios import google_sign_in_ios
import location
import path_provider_foundation import path_provider_foundation
import sqflite import sqflite
import url_launcher_macos import url_launcher_macos
@@ -19,7 +18,6 @@ func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) {
FLTFirebaseMessagingPlugin.register(with: registry.registrar(forPlugin: "FLTFirebaseMessagingPlugin")) FLTFirebaseMessagingPlugin.register(with: registry.registrar(forPlugin: "FLTFirebaseMessagingPlugin"))
FlutterSecureStoragePlugin.register(with: registry.registrar(forPlugin: "FlutterSecureStoragePlugin")) FlutterSecureStoragePlugin.register(with: registry.registrar(forPlugin: "FlutterSecureStoragePlugin"))
FLTGoogleSignInPlugin.register(with: registry.registrar(forPlugin: "FLTGoogleSignInPlugin")) FLTGoogleSignInPlugin.register(with: registry.registrar(forPlugin: "FLTGoogleSignInPlugin"))
LocationPlugin.register(with: registry.registrar(forPlugin: "LocationPlugin"))
PathProviderPlugin.register(with: registry.registrar(forPlugin: "PathProviderPlugin")) PathProviderPlugin.register(with: registry.registrar(forPlugin: "PathProviderPlugin"))
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"))

View File

@@ -334,14 +334,6 @@ packages:
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "3.0.2" version: "3.0.2"
flutter_paypal:
dependency: "direct main"
description:
name: flutter_paypal
sha256: "783d52ca84528b4b7a1213db5195e6946a2d27b2192f4fcd6d0b04b8c37e359e"
url: "https://pub.dev"
source: hosted
version: "0.2.0"
flutter_plugin_android_lifecycle: flutter_plugin_android_lifecycle:
dependency: transitive dependency: transitive
description: description:
@@ -398,14 +390,6 @@ packages:
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "3.1.2" version: "3.1.2"
flutter_spinkit:
dependency: transitive
description:
name: flutter_spinkit
sha256: d2696eed13732831414595b98863260e33e8882fc069ee80ec35d4ac9ddb0472
url: "https://pub.dev"
source: hosted
version: "5.2.1"
flutter_test: flutter_test:
dependency: "direct dev" dependency: "direct dev"
description: flutter description: flutter
@@ -520,14 +504,6 @@ packages:
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "0.13.6" version: "0.13.6"
http_auth:
dependency: transitive
description:
name: http_auth
sha256: b7625acba2987fa69140d9600c679819f33227d665f525fbb2f394e08cf917d1
url: "https://pub.dev"
source: hosted
version: "1.0.4"
http_multi_server: http_multi_server:
dependency: transitive dependency: transitive
description: description:
@@ -656,30 +632,6 @@ packages:
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "1.0.10" version: "1.0.10"
location:
dependency: "direct main"
description:
name: location
sha256: "37ffdadcd4b1498b769824f45ebb4de8ed46663a4a67ac27b33a590ee486579f"
url: "https://pub.dev"
source: hosted
version: "6.0.2"
location_platform_interface:
dependency: transitive
description:
name: location_platform_interface
sha256: "2ecde6bb0f88032b0bbbde37e18975b4468711dd92619c2235cc0c0ee93b4b8e"
url: "https://pub.dev"
source: hosted
version: "4.0.0"
location_web:
dependency: transitive
description:
name: location_web
sha256: "15ad7b4c8a9f55abee513373755e093a40c04d7e24fc1b4f89676fe99523d034"
url: "https://pub.dev"
source: hosted
version: "5.0.1"
logging: logging:
dependency: transitive dependency: transitive
description: description:
@@ -1069,38 +1021,6 @@ packages:
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "2.4.5" version: "2.4.5"
webview_flutter:
dependency: "direct main"
description:
name: webview_flutter
sha256: "6869c8786d179f929144b4a1f86e09ac0eddfe475984951ea6c634774c16b522"
url: "https://pub.dev"
source: hosted
version: "4.8.0"
webview_flutter_android:
dependency: transitive
description:
name: webview_flutter_android
sha256: "0d21cfc3bfdd2e30ab2ebeced66512b91134b39e72e97b43db2d47dda1c4e53a"
url: "https://pub.dev"
source: hosted
version: "3.16.3"
webview_flutter_platform_interface:
dependency: transitive
description:
name: webview_flutter_platform_interface
sha256: d937581d6e558908d7ae3dc1989c4f87b786891ab47bb9df7de548a151779d8d
url: "https://pub.dev"
source: hosted
version: "2.10.0"
webview_flutter_wkwebview:
dependency: transitive
description:
name: webview_flutter_wkwebview
sha256: "7affdf9d680c015b11587181171d3cad8093e449db1f7d9f0f08f4f33d24f9a0"
url: "https://pub.dev"
source: hosted
version: "3.13.1"
win32: win32:
dependency: transitive dependency: transitive
description: description:

View File

@@ -39,7 +39,7 @@ dependencies:
sdk: flutter sdk: flutter
flutter_launcher_icons: ^0.13.1 flutter_launcher_icons: ^0.13.1
# flutter_local_notifications: ^17.1.1 # flutter_local_notifications: ^17.1.1
flutter_paypal: ^0.2.0 # flutter_paypal: ^0.2.0
flutter_secure_storage: ^9.0.0 flutter_secure_storage: ^9.0.0
# flutter_stripe: ^10.1.1 # flutter_stripe: ^10.1.1
get: ^4.6.6 get: ^4.6.6
@@ -53,11 +53,11 @@ dependencies:
# image_picker: ^1.1.1 # image_picker: ^1.1.1
intl: ^0.19.0 intl: ^0.19.0
local_auth: ^2.2.0 local_auth: ^2.2.0
location: ^6.0.1 # location: ^6.0.1
path: ^1.9.0 path: ^1.9.0
sqflite: ^2.3.3+1 sqflite: ^2.3.3+1
url_launcher: ^6.2.6 url_launcher: ^6.2.6
webview_flutter: ^4.7.0 # webview_flutter: ^4.7.0
dev_dependencies: dev_dependencies:
flutter_test: flutter_test: