This commit is contained in:
Hamza-Ayed
2023-08-17 17:07:27 +03:00
parent ceced0735c
commit 6635a46933
11 changed files with 418 additions and 186 deletions

View File

@@ -64,6 +64,7 @@ class LoginController extends GetxController {
box.write(BoxName.pasengerID, jsonDecoeded['data'][0]['id']);
box.write(BoxName.email, jsonDecoeded['data'][0]['email']);
box.write(BoxName.phone, jsonDecoeded['data'][0]['phone']);
saveData(BoxName.passwoerd, passwordController.text);
Get.offAll(() => MapPage());
isloading = false;
update();

View File

@@ -62,9 +62,9 @@ class RegisterController extends GetxController {
'token': verfyCode.text,
});
// if (jsondecod['status'] == 'success') {
Get.offAll(() => const MapPage());
// }
if (jsonDecode(res)['status'] == 'success') {
Get.offAll(() => const MapPage());
}
}
void register() async {

View File

@@ -21,7 +21,7 @@ class CRUD {
'Basic ${base64Encode(utf8.encode(AppCredintials.basicAuthCredentials))}',
},
);
// print("-----/---------" + response.body.toString());
// print("--------------" + response.body.toString());
if (response.statusCode == 200) {
var jsonData = jsonDecode(response.body);
if (jsonData['status'] == 'success') {
@@ -49,7 +49,6 @@ class CRUD {
},
);
print(response.request);
print(payload);
var jsonData = jsonDecode(response.body);
if (response.statusCode == 200) {
if (jsonData['status'] == 'success') {

View File

@@ -29,25 +29,34 @@ class MapController extends GetxController {
final List<LatLng> carsLocationByPassenger = [];
BitmapDescriptor markerIcon = BitmapDescriptor.defaultMarker;
BitmapDescriptor carIcon = BitmapDescriptor.defaultMarker;
double height = 200;
double height = 150;
final location = Location();
late LocationData currentLocation;
double heightMenu = 0;
double heightPickerContainer = 90;
double mainBottomMenuMap = Get.height * .2;
bool heightMenuBool = false;
bool isPickerShown = false;
bool isButtomSheetShown = false;
bool mapType = false;
bool isMainBottomMenuMap = true;
double heightButtomSheetShown = 240;
late final LatLng southwest;
late final LatLng northeast;
List<CarLocationModel> carLocations = <CarLocationModel>[];
// final mainBottomMenuMap = GlobalKey<AnimatedContainer>();
void changeButtomSheetShown() {
isButtomSheetShown = !isButtomSheetShown;
heightButtomSheetShown = isButtomSheetShown == true ? 240 : 0;
update();
}
void changeMapType() {
mapType = !mapType;
// heightButtomSheetShown = isButtomSheetShown == true ? 240 : 0;
update();
}
void getDrawerMenu() {
heightMenuBool = !heightMenuBool;
heightMenu = heightMenuBool == true ? 100 : 0;
@@ -65,12 +74,19 @@ class MapController extends GetxController {
update();
}
void changeMainBottomMenuMap() {
isMainBottomMenuMap = !isMainBottomMenuMap;
mainBottomMenuMap =
isMainBottomMenuMap == true ? Get.height * .2 : Get.height * .66;
update();
}
changeHeight() {
if (places.isEmpty) {
height = 0;
update();
}
height = 200;
height = 150;
update();
}