10/10/4
This commit is contained in:
@@ -78,4 +78,5 @@ class AppLink {
|
||||
static const String signUpCaptin = "$authCaptin/register.php";
|
||||
static const String sendVerifyEmailCaptin = "$authCaptin/sendVerifyEmail.php";
|
||||
static const String verifyEmailCaptin = "$authCaptin/verifyEmail.php";
|
||||
static const String removeUser = "$authCaptin/removeAccount.php";
|
||||
}
|
||||
|
||||
@@ -3,6 +3,8 @@ import 'package:flutter/src/widgets/basic.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:ride/constant/box_name.dart';
|
||||
import 'package:ride/constant/colors.dart';
|
||||
import 'package:ride/constant/links.dart';
|
||||
import 'package:ride/controller/functions/crud.dart';
|
||||
import 'package:ride/main.dart';
|
||||
import 'package:ride/views/lang/languages.dart';
|
||||
import 'package:ride/views/widgets/elevated_btn.dart';
|
||||
@@ -10,6 +12,12 @@ import 'package:ride/views/widgets/elevated_btn.dart';
|
||||
import '../../constant/style.dart';
|
||||
|
||||
class LogOut {
|
||||
Future deleteMyAccount(String id) async {
|
||||
await CRUD().post(link: AppLink.removeUser, payload: {'id': id}).then(
|
||||
(value) => Get.snackbar('Deleted', 'Your Account is Deleted',
|
||||
backgroundColor: AppColor.redColor));
|
||||
}
|
||||
|
||||
Future logOut() async {
|
||||
Get.defaultDialog(
|
||||
title: 'Are you Sure to LogOut?'.tr,
|
||||
|
||||
0
lib/views/Rate/rate_captain.dart
Normal file
0
lib/views/Rate/rate_captain.dart
Normal file
0
lib/views/Rate/rate_passenger.dart
Normal file
0
lib/views/Rate/rate_passenger.dart
Normal file
@@ -1,8 +1,10 @@
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:ride/constant/box_name.dart';
|
||||
import 'package:ride/constant/style.dart';
|
||||
import 'package:ride/controller/profile/profile_controller.dart';
|
||||
import 'package:ride/main.dart';
|
||||
import 'package:ride/views/widgets/elevated_btn.dart';
|
||||
import 'package:ride/views/widgets/my_scafold.dart';
|
||||
import 'package:ride/views/widgets/mycircular.dart';
|
||||
@@ -17,6 +19,11 @@ class PassengerProfilePage extends StatelessWidget {
|
||||
Get.put(ProfileController());
|
||||
return MyScafolld(
|
||||
isleading: true,
|
||||
action: MyElevatedButton(
|
||||
title: 'Delete My Account'.tr,
|
||||
onPressed: () {
|
||||
LogOut().deleteMyAccount(box.read(BoxName.pasengerID).toString());
|
||||
}),
|
||||
title: 'My Profile'.tr,
|
||||
body: [
|
||||
GetBuilder<ProfileController>(
|
||||
|
||||
Reference in New Issue
Block a user