Skip to content
Snippets Groups Projects
Select Git revision
  • 8f6d72086d89cb95a7f8e4d7463b18c91e761ee9
  • dev default protected
  • integrating-verify-otp-screen
  • language-selection
  • ECAP1-24-verify_otp
5 results

verify_otp_screen.dart

Blame
  • verify_otp_screen.dart 2.11 KiB
    import 'package:exide_crr/constants/image_constants.dart';
    import 'package:flutter/material.dart';
    import 'package:flutter_screenutil/flutter_screenutil.dart';
    import 'package:get/get.dart';
    import 'package:get_storage/get_storage.dart';
    import 'package:google_fonts/google_fonts.dart';
    import 'package:pin_code_fields/pin_code_fields.dart';
    import '../../../appLocalization/language_key.dart';
    import '../../../constants/app_constants.dart';
    import '../../../constants/font_constants.dart';
    import '../../../customWidget/app_text.dart';
    import '../../../customWidget/button_widget.dart';
    import '../../../customWidget/otp_text_field/otp_text_field.dart';
    import '../../../customWidget/otp_text_field/otp_text_field_style.dart';
    import '../../../res/app_color_text_size.dart';
    import '../../../serverRequest/all_request.dart';
    import '../../../utils/res/styles.dart';
    import '../controller/verify_otp_controller.dart';
    import '../../../customWidget/dialogues/success_dialogue.dart';
    import '../widgets/floating_button.dart';
    import '../widgets/pincode_text_field.dart';
    import '../widgets/resend_otp_text.dart';
    import '../widgets/screen_header.dart';
    
    class VerifyOtp extends StatefulWidget {
      const VerifyOtp({super.key});
    
      @override
      State<VerifyOtp> createState() => _VerifyOtpState();
    }
    
    class _VerifyOtpState extends State<VerifyOtp> {
      OtpFieldController otpFieldController = OtpFieldController();
    
      @override
      Widget build(BuildContext context) {
        return GetBuilder(
          tag: Tag.verifyOtpControllerTag,
          init: VerifyOtpController(),
          builder: (controller) => Scaffold(
            backgroundColor: AppColor.white,
            body: Column(
              crossAxisAlignment: CrossAxisAlignment.start,
              children: [
                screenHeader(),
                ///PinCode field
                pinCodeField(controller,context),
                ///Resend text
                resendOTPText(controller)
              ],
            ).paddingOnly(right: 16.0.h, left: 16.0.h, top: 104.h),
            floatingActionButton: floatingBottomButton(controller,context),
            floatingActionButtonLocation: FloatingActionButtonLocation.centerFloat,
          ),
        );
      }
    }