9/15/4
This commit is contained in:
@@ -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();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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",
|
||||
|
||||
@@ -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());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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());
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user