This commit is contained in:
Hamza-Ayed
2023-09-15 21:36:45 +03:00
parent 58aa82c3f3
commit 9aa1d3091e
8 changed files with 47 additions and 35 deletions

5
.env
View File

@@ -1,5 +0,0 @@
BASIC_AUTH_CREDENTIALS=hamzaayedphp:malDEV@2101
SERVER_API=AAAAinYllCo:APA91bF1shTpzSsSxqbfY6c60D8zs1ZsdIsl9ix6nl7GDdjCqWPRK0G0ub5SqFdb1jDpQDvQPxGg-697MWLo0sy3oYImBwBLObyhk0GjtNzyr0PbE3hI-pOvhf8Vp1xgUgBmofbZYXkH
MAP_API_KEY=AIzaSyCyfwRXTwSTLOFQSQgN5p7QZgGJVZnEKq0
TRANSACTION_CLOUDE=Authorization:API_EMDJX6BHQ67DBGT6WV:DG2XPU7YEN02M0VJ2F

View File

@@ -100,14 +100,25 @@ class LoginCaptinController extends GetxController {
}
}
// goToMapPage() {
// if (box.read(BoxName.email) != null) {
// Get.offAll(() => const MapPage());
// }
// }
void loginByBoxData() async {
isloading = true;
update();
await CRUD().post(link: AppLink.addTokensDriver, payload: {
'token': box.read(BoxName.tokenDriver).toString(),
'captain_id': box.read(BoxName.driverID).toString()
});
isloading = false;
update();
}
@override
void onInit() {
super.onInit();
if (box.read(BoxName.driverID) != null ||
box.read(BoxName.driverID) != '') {
loginByBoxData();
}
}
}

View File

@@ -87,6 +87,8 @@ class MyTranslation extends Translations {
"MyLocation": "موقعي",
"my location": "موقعي",
"Target": "هدف",
"By selecting \"I Agree\" below, I have reviewed and agree to the Terms of Use and acknowledge the Privacy Notice. I am at least 18 years of age.":
"بتحديد \"أوافق\" أدناه ، فإنني أوافق على مراجعة وقبول شروط الاستخدام وإقرار إشعار الخصوصية. أنا على الأقل 18 عامًا من العمر.",
/////
///
// 'Saved Sucssefully':
@@ -176,7 +178,9 @@ class MyTranslation extends Translations {
"Are you want to go to this site": "Bu siteye gitmek istiyor musunuz",
"MyLocation": "Konumum",
"my location": "konumum",
"Target": "Hedef"
"Target": "Hedef",
"By selecting \"I Agree\" below, I have reviewed and agree to the Terms of Use and acknowledge the Privacy Notice. I am at least 18 years of age.":
"Aşağıdaki \"Kabul Ediyorum\" seçeneğini seçerek, Kullanım Koşullarını gözden geçirdiğimi ve kabul ettiğimi ve Gizlilik Bildirimini kabul ettiğimi beyan ederim. En az 18 yaşındayım."
},
"en": {
"Choose Language": "Choose Language",

View File

@@ -5,6 +5,7 @@ import 'package:firebase_messaging/firebase_messaging.dart';
import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:get_storage/get_storage.dart';
import 'package:ride/views/auth/captin/login_captin.dart';
import 'package:ride/views/auth/login_page.dart';
import 'package:ride/views/home/Captin/home_captin.dart';
@@ -71,6 +72,6 @@ class MyApp extends StatelessWidget {
? const MapPage()
: box.read(BoxName.emailDriver) == null
? LoginPage()
: const HomeCaptin());
: LoginCaptin());
}
}

View File

@@ -12,7 +12,6 @@ import 'package:ride/views/widgets/my_scafold.dart';
import '../../../controller/auth/login_controller.dart';
import '../../widgets/mycircular.dart';
import '../register_page.dart';
class LoginCaptin extends StatelessWidget {
final controller = Get.put(LoginController());

View File

@@ -16,7 +16,9 @@ class HomeCaptin extends StatelessWidget {
action: GetBuilder<LocationController>(
builder: (locationController) => locationController.isloading
? const SizedBox(
height: 2, width: 2, child: CircularProgressIndicator())
height: 1,
width: 1,
child: CircularProgressIndicator.adaptive())
: const SizedBox(),
),
body: [
@@ -38,6 +40,6 @@ class HomeCaptin extends StatelessWidget {
),
))
],
isleading: true);
isleading: false);
}
}

View File

@@ -85,10 +85,10 @@ packages:
dependency: transitive
description:
name: collection
sha256: "4a07be6cb69c84d677a6c3096fcf960cc3285a8330b4603e0d463d15d9bd934c"
sha256: f092b211a4319e98e5ff58223576de6c2803db36221657b46c82574721240687
url: "https://pub.dev"
source: hosted
version: "1.17.1"
version: "1.17.2"
convert:
dependency: transitive
description:
@@ -145,14 +145,6 @@ packages:
url: "https://pub.dev"
source: hosted
version: "0.7.8"
dotenv:
dependency: "direct main"
description:
name: dotenv
sha256: e169b516bc7b88801919e1c508772bcb8e3d0d1776a43f74ab692c57e741cd8a
url: "https://pub.dev"
source: hosted
version: "4.1.0"
fake_async:
dependency: transitive
description:
@@ -636,18 +628,18 @@ packages:
dependency: transitive
description:
name: matcher
sha256: "6501fbd55da300384b768785b83e5ce66991266cec21af89ab9ae7f5ce1c4cbb"
sha256: "1803e76e6653768d64ed8ff2e1e67bea3ad4b923eb5c56a295c3e634bad5960e"
url: "https://pub.dev"
source: hosted
version: "0.12.15"
version: "0.12.16"
material_color_utilities:
dependency: transitive
description:
name: material_color_utilities
sha256: d92141dc6fe1dad30722f9aa826c7fbc896d021d792f80678280601aff8cf724
sha256: "9528f2f296073ff54cb9fee677df673ace1218163c3bc7628093e7eed5203d41"
url: "https://pub.dev"
source: hosted
version: "0.2.0"
version: "0.5.0"
meta:
dependency: transitive
description:
@@ -769,10 +761,10 @@ packages:
dependency: transitive
description:
name: source_span
sha256: dd904f795d4b4f3b870833847c461801f6750a9fa8e61ea5ac53f9422b31f250
sha256: "53e943d4206a5e30df338fd4c6e7a077e02254531b138a15aec3bd143c1a8b3c"
url: "https://pub.dev"
source: hosted
version: "1.9.1"
version: "1.10.0"
sqflite:
dependency: "direct main"
description:
@@ -841,10 +833,10 @@ packages:
dependency: transitive
description:
name: test_api
sha256: eb6ac1540b26de412b3403a163d919ba86f6a973fe6cc50ae3541b80092fdcfb
sha256: "75760ffd7786fffdfb9597c35c5b27eaeec82be8edfb6d71d32651128ed7aab8"
url: "https://pub.dev"
source: hosted
version: "0.5.1"
version: "0.6.0"
timezone:
dependency: transitive
description:
@@ -941,6 +933,14 @@ packages:
url: "https://pub.dev"
source: hosted
version: "2.1.4"
web:
dependency: transitive
description:
name: web
sha256: dc8ccd225a2005c1be616fe02951e2e342092edf968cf0844220383757ef8f10
url: "https://pub.dev"
source: hosted
version: "0.1.4-beta"
webview_flutter:
dependency: transitive
description:
@@ -1006,5 +1006,5 @@ packages:
source: hosted
version: "3.1.2"
sdks:
dart: ">=3.0.5 <4.0.0"
dart: ">=3.1.0-185.0.dev <4.0.0"
flutter: ">=3.10.0"

View File

@@ -35,7 +35,7 @@ dependencies:
geolocator: ^10.0.0
flutter_paypal: ^0.2.0
flutter_launcher_icons: ^0.13.1
dotenv: ^4.1.0
dev_dependencies:
flutter_test: