This commit is contained in:
Hamza-Ayed
2023-12-24 21:28:31 +03:00
parent c2fd1187d0
commit 027d248e56
31 changed files with 2001 additions and 10 deletions

View File

@@ -10,9 +10,11 @@ import 'package:ride/main.dart';
import 'package:ride/views/auth/captin/login_captin.dart';
import 'package:ride/views/widgets/elevated_btn.dart';
import 'package:ride/views/widgets/my_scafold.dart';
import 'package:ride/views/widgets/my_textField.dart';
import '../../constant/info.dart';
import '../../controller/auth/login_controller.dart';
import '../admin/admin_home_page.dart';
import '../widgets/mycircular.dart';
import 'register_page.dart';
@@ -28,6 +30,43 @@ class LoginPage extends StatelessWidget {
builder: (controller) => MyScafolld(
title: 'Login'.tr,
isleading: false,
action: GestureDetector(
onLongPress: () {
Get.defaultDialog(
title: 'Admin DashBoard',
titleStyle: AppStyle.title,
content: Form(
key: controller.formKeyAdmin,
child: Column(
children: [
MyTextForm(
controller: controller.adminNameController,
label: 'Your name'.tr,
hint: 'Your name',
type: TextInputType.name),
const SizedBox(
height: 10,
),
MyTextForm(
controller: controller.adminPasswordController,
label: 'Your password'.tr,
hint: 'Your password',
type: TextInputType.emailAddress),
const SizedBox(
height: 10,
),
],
),
),
confirm: MyElevatedButton(
title: 'title',
onPressed: () {
controller.adminDashboardOpen();
},
),
);
},
child: const Icon(Icons.dashboard)),
body: [
if (box.read(BoxName.agreeTerms) != 'agreed')
agreedPage()