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

resend_otp_text.dart

Blame
  • resend_otp_text.dart 1.10 KiB
    import 'dart:ui';
    
    import 'package:flutter/cupertino.dart';
    import 'package:flutter/material.dart';
    import 'package:get/get.dart';
    
    import '../../../appLocalization/language_key.dart';
    import '../../../customWidget/app_text.dart';
    import '../../../res/app_color_text_size.dart';
    import '../../../utils/res/styles.dart';
    import '../controller/verify_otp_controller.dart';
    
    Widget resendOTPText(VerifyOtpController controller){
      return controller.counter.value == 0
          ? InkWell(
        onTap: controller.onClickResendOTP,
        child: AppText(
          text: resendOTP.tr,
          fontSize: TextSize.textSmallSize,
          underLine: true,
          fontWeight: FontWeight.w400,
          textColor: AppColor.redLight,
          maxLine: 3,
          textAlign: TextAlign.start,
          underlineColor: AppColor.redLight,
        ),
      )
          : RichText(
        text: TextSpan(
          children: <TextSpan>[
            TextSpan(
                text: resendOTP.tr,
                style: Styles.resendTextUnderline),
            TextSpan(
                text: "${resendOTPIn.tr}${controller.counter} ${seconds.tr}",
                style: Styles.resendText),
          ],
        ),
      );
    }