203 lines
9.2 KiB
Dart
203 lines
9.2 KiB
Dart
import 'package:sefer_driver/constant/style.dart';
|
|
import 'package:flutter/material.dart';
|
|
import 'package:get/get.dart';
|
|
import 'package:sefer_driver/controller/auth/captin/register_captin_controller.dart';
|
|
import 'package:sefer_driver/views/widgets/elevated_btn.dart';
|
|
import 'package:sefer_driver/views/widgets/my_scafold.dart';
|
|
|
|
import '../../../constant/colors.dart';
|
|
import '../../../controller/auth/google_sign.dart';
|
|
|
|
class RegisterCaptin extends StatelessWidget {
|
|
const RegisterCaptin({super.key});
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
Get.put(RegisterCaptainController());
|
|
return MyScafolld(
|
|
title: 'Register Driver'.tr,
|
|
body: [
|
|
// GetBuilder<RegisterCaptainController>(
|
|
// builder: (controller) => Form(
|
|
// key: controller.formKey,
|
|
// child: Padding(
|
|
// padding: const EdgeInsets.all(16.0),
|
|
// child: SingleChildScrollView(
|
|
// child: Container(
|
|
// decoration: const BoxDecoration(
|
|
// boxShadow: [
|
|
// BoxShadow(
|
|
// offset: Offset(3, 3),
|
|
// color: AppColor.accentColor,
|
|
// blurRadius: 3)
|
|
// ],
|
|
// color: AppColor.secondaryColor,
|
|
// ),
|
|
// child: Padding(
|
|
// padding: const EdgeInsets.all(16),
|
|
// child: Column(
|
|
// children: [
|
|
// SizedBox(
|
|
// width: Get.width * .8,
|
|
// child: TextFormField(
|
|
// keyboardType: TextInputType.emailAddress,
|
|
// controller: controller.emailController,
|
|
// decoration: InputDecoration(
|
|
// focusedBorder: OutlineInputBorder(
|
|
// borderSide: const BorderSide(
|
|
// color: AppColor.primaryColor,
|
|
// width: 2.0,
|
|
// ),
|
|
// borderRadius: BorderRadius.circular(10),
|
|
// ),
|
|
// fillColor: AppColor.accentColor,
|
|
// hoverColor: AppColor.accentColor,
|
|
// focusColor: AppColor.accentColor,
|
|
// border: const OutlineInputBorder(
|
|
// borderRadius:
|
|
// BorderRadius.all(Radius.circular(12))),
|
|
// labelText: 'Email'.tr,
|
|
// hintText: 'Enter your email address'.tr,
|
|
// ),
|
|
// validator: (value) {
|
|
// if (value!.isEmpty ||
|
|
// (!value.contains('@') ||
|
|
// !value.contains('.'))) {
|
|
// return 'Please enter Your Email.'.tr;
|
|
// }
|
|
// return null;
|
|
// },
|
|
// ),
|
|
// ),
|
|
// const SizedBox(
|
|
// height: 15,
|
|
// ),
|
|
// SizedBox(
|
|
// width: Get.width * .8,
|
|
// child: TextFormField(
|
|
// obscureText: true,
|
|
// keyboardType: TextInputType.emailAddress,
|
|
// controller: controller.passwordController,
|
|
// decoration: InputDecoration(
|
|
// focusedBorder: OutlineInputBorder(
|
|
// borderSide: const BorderSide(
|
|
// color: AppColor.primaryColor,
|
|
// width: 2.0,
|
|
// ),
|
|
// borderRadius: BorderRadius.circular(10),
|
|
// ),
|
|
// fillColor: AppColor.accentColor,
|
|
// hoverColor: AppColor.accentColor,
|
|
// focusColor: AppColor.accentColor,
|
|
// border: const OutlineInputBorder(
|
|
// borderRadius:
|
|
// BorderRadius.all(Radius.circular(12))),
|
|
// labelText: 'Password'.tr,
|
|
// hintText: 'Enter your Password'.tr,
|
|
// ),
|
|
// validator: (value) {
|
|
// if (value!.isEmpty) {
|
|
// return 'Please enter Your Password.'.tr;
|
|
// }
|
|
// if (value.length < 6) {
|
|
// return 'Password must br at least 6 character.'
|
|
// .tr;
|
|
// }
|
|
// return null;
|
|
// },
|
|
// ),
|
|
// ),
|
|
// const SizedBox(
|
|
// height: 15,
|
|
// ),
|
|
// SizedBox(
|
|
// width: Get.width * .8,
|
|
// child: TextFormField(
|
|
// keyboardType: TextInputType.phone,
|
|
// cursorColor: AppColor.accentColor,
|
|
// controller: controller.phoneController,
|
|
// decoration: InputDecoration(
|
|
// focusedBorder: OutlineInputBorder(
|
|
// borderSide: const BorderSide(
|
|
// color: AppColor.primaryColor,
|
|
// width: 2.0,
|
|
// ),
|
|
// borderRadius: BorderRadius.circular(10),
|
|
// ),
|
|
// focusColor: AppColor.accentColor,
|
|
// fillColor: AppColor.accentColor,
|
|
// border: const OutlineInputBorder(
|
|
// borderRadius:
|
|
// BorderRadius.all(Radius.circular(12))),
|
|
// labelText: 'Phone'.tr,
|
|
// hintText: 'Enter your phone number'.tr,
|
|
// ),
|
|
// validator: (value) {
|
|
// if (value!.isEmpty || value.length != 10) {
|
|
// return 'Please enter your phone number.'.tr;
|
|
// }
|
|
// return null;
|
|
// },
|
|
// ),
|
|
// ),
|
|
// const SizedBox(
|
|
// height: 15,
|
|
// ),
|
|
// MyElevatedButton(
|
|
// title: 'Next'.tr,
|
|
// onPressed: () => controller.nextToAIDetection()),
|
|
// ],
|
|
// ),
|
|
// ),
|
|
// ),
|
|
// ),
|
|
// ),
|
|
// ),
|
|
// )
|
|
Image.asset(
|
|
'assets/images/on1.png',
|
|
fit: BoxFit.cover,
|
|
height: double.maxFinite,
|
|
width: double.maxFinite,
|
|
),
|
|
Center(
|
|
child: Container(
|
|
decoration: AppStyle.boxDecoration1,
|
|
height: Get.height * .7,
|
|
width: Get.width * .9,
|
|
child: Column(
|
|
mainAxisAlignment: MainAxisAlignment.spaceAround,
|
|
children: [
|
|
Image.asset(
|
|
'assets/images/logo.gif',
|
|
height: Get.width * .3,
|
|
width: Get.width * .3,
|
|
fit: BoxFit.fill,
|
|
),
|
|
Container(
|
|
decoration: AppStyle.boxDecoration1,
|
|
height: Get.height * .3,
|
|
width: Get.width * .8,
|
|
child: Center(
|
|
child: Text(
|
|
'Sign in with Google for easier email and name entry'.tr,
|
|
textAlign: TextAlign.center,
|
|
style: AppStyle.title,
|
|
),
|
|
),
|
|
),
|
|
MyElevatedButton(
|
|
title: 'Sign In by Google'.tr,
|
|
onPressed: () async {
|
|
await GoogleSignInHelper.signIn();
|
|
},
|
|
kolor: AppColor.blueColor,
|
|
),
|
|
],
|
|
),
|
|
))
|
|
],
|
|
isleading: true);
|
|
}
|
|
}
|