buildOtpSection static method
Implementation
static Widget buildOtpSection(
{required TextEditingController otpController,
void Function(String)? onChanged}) {
return SizedBox(
width: double.infinity,
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
CustomText(text: _tr.enterOtp),
Padding(
padding: const EdgeInsets.symmetric(vertical: 12.0),
child: OTPFieldWidget(
onCompleted: (value) => otpController.text = value,
otpController: otpController,
length: AppConstant.otpLength,
inputFormatters: [FilteringTextInputFormatter.digitsOnly],
validator: (p0) {
return FormValidator.validateOTP(p0);
},
onChanged: onChanged,
),
),
CustomText.subtitle(
text: _tr.getOtpInstruction,
),
],
),
);
}