|
|
|
|
@ -22,73 +22,79 @@ class OtpDialog extends StatelessWidget {
|
|
|
|
|
return Container(
|
|
|
|
|
color: Colors.white,
|
|
|
|
|
padding: EdgeInsets.all(24),
|
|
|
|
|
child: Column(
|
|
|
|
|
mainAxisSize: MainAxisSize.min,
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
children: [
|
|
|
|
|
"Please insert OTP Code".toText24(),
|
|
|
|
|
20.height,
|
|
|
|
|
OTPWidget(
|
|
|
|
|
autoFocus: true,
|
|
|
|
|
controller: _pinPutController,
|
|
|
|
|
defaultBorderColor: const Color(0xffD8D8D8),
|
|
|
|
|
maxLength: 4,
|
|
|
|
|
onTextChanged: (text) {},
|
|
|
|
|
pinBoxColor: Colors.white,
|
|
|
|
|
onDone: (code) => _onOtpCallBack(code, null),
|
|
|
|
|
textBorderColor: const Color(0xffD8D8D8),
|
|
|
|
|
pinBoxWidth: 60,
|
|
|
|
|
pinBoxHeight: 60,
|
|
|
|
|
pinTextStyle: const TextStyle(fontSize: 24.0, color: MyColors.darkTextColor),
|
|
|
|
|
pinTextAnimatedSwitcherTransition: ProvidedPinBoxTextAnimation.scalingTransition,
|
|
|
|
|
pinTextAnimatedSwitcherDuration: const Duration(milliseconds: 300),
|
|
|
|
|
pinBoxRadius: 10,
|
|
|
|
|
keyboardType: TextInputType.number,
|
|
|
|
|
),
|
|
|
|
|
// Row(
|
|
|
|
|
// children: [
|
|
|
|
|
// Expanded(
|
|
|
|
|
// child: Container(
|
|
|
|
|
// width: double.infinity,
|
|
|
|
|
// height: 60,
|
|
|
|
|
// color: accentColor.withOpacity(0.3),
|
|
|
|
|
// ),
|
|
|
|
|
// ),
|
|
|
|
|
// 12.width,
|
|
|
|
|
// Expanded(
|
|
|
|
|
// child: Container(
|
|
|
|
|
// width: double.infinity,
|
|
|
|
|
// height: 60,
|
|
|
|
|
// color: accentColor.withOpacity(0.3),
|
|
|
|
|
// ),
|
|
|
|
|
// ),
|
|
|
|
|
// 12.width,
|
|
|
|
|
// Expanded(
|
|
|
|
|
// child: Container(
|
|
|
|
|
// width: double.infinity,
|
|
|
|
|
// height: 60,
|
|
|
|
|
// color: accentColor.withOpacity(0.3),
|
|
|
|
|
// ),
|
|
|
|
|
// ),
|
|
|
|
|
// 12.width,
|
|
|
|
|
// Expanded(
|
|
|
|
|
// child: Container(
|
|
|
|
|
// width: double.infinity,
|
|
|
|
|
// height: 60,
|
|
|
|
|
// color: accentColor.withOpacity(0.3),
|
|
|
|
|
// ),
|
|
|
|
|
// ),
|
|
|
|
|
// ],
|
|
|
|
|
// ),
|
|
|
|
|
40.height,
|
|
|
|
|
ShowFillButton(
|
|
|
|
|
title: "Check Code",
|
|
|
|
|
width: double.infinity,
|
|
|
|
|
onPressed: () {
|
|
|
|
|
onClick(code);
|
|
|
|
|
},
|
|
|
|
|
)
|
|
|
|
|
],
|
|
|
|
|
width: double.infinity,
|
|
|
|
|
child: Container(
|
|
|
|
|
color: Colors.yellow,
|
|
|
|
|
child: Column(
|
|
|
|
|
mainAxisSize: MainAxisSize.min,
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
children: [
|
|
|
|
|
"Please insert OTP Code".toText24(),
|
|
|
|
|
20.height,
|
|
|
|
|
Center(
|
|
|
|
|
child: OTPWidget(
|
|
|
|
|
autoFocus: true,
|
|
|
|
|
controller: _pinPutController,
|
|
|
|
|
defaultBorderColor: const Color(0xffD8D8D8),
|
|
|
|
|
maxLength: 4,
|
|
|
|
|
onTextChanged: (text) {},
|
|
|
|
|
pinBoxColor: Colors.white,
|
|
|
|
|
onDone: (code) => _onOtpCallBack(code, null),
|
|
|
|
|
textBorderColor: const Color(0xffD8D8D8),
|
|
|
|
|
pinBoxWidth: 48,
|
|
|
|
|
pinBoxHeight: 48,
|
|
|
|
|
pinTextStyle: const TextStyle(fontSize: 24.0, color: MyColors.darkTextColor),
|
|
|
|
|
pinTextAnimatedSwitcherTransition: ProvidedPinBoxTextAnimation.scalingTransition,
|
|
|
|
|
pinTextAnimatedSwitcherDuration: const Duration(milliseconds: 300),
|
|
|
|
|
pinBoxRadius: 8,
|
|
|
|
|
keyboardType: TextInputType.number,
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
// Row(
|
|
|
|
|
// children: [
|
|
|
|
|
// Expanded(
|
|
|
|
|
// child: Container(
|
|
|
|
|
// width: double.infinity,
|
|
|
|
|
// height: 60,
|
|
|
|
|
// color: accentColor.withOpacity(0.3),
|
|
|
|
|
// ),
|
|
|
|
|
// ),
|
|
|
|
|
// 12.width,
|
|
|
|
|
// Expanded(
|
|
|
|
|
// child: Container(
|
|
|
|
|
// width: double.infinity,
|
|
|
|
|
// height: 60,
|
|
|
|
|
// color: accentColor.withOpacity(0.3),
|
|
|
|
|
// ),
|
|
|
|
|
// ),
|
|
|
|
|
// 12.width,
|
|
|
|
|
// Expanded(
|
|
|
|
|
// child: Container(
|
|
|
|
|
// width: double.infinity,
|
|
|
|
|
// height: 60,
|
|
|
|
|
// color: accentColor.withOpacity(0.3),
|
|
|
|
|
// ),
|
|
|
|
|
// ),
|
|
|
|
|
// 12.width,
|
|
|
|
|
// Expanded(
|
|
|
|
|
// child: Container(
|
|
|
|
|
// width: double.infinity,
|
|
|
|
|
// height: 60,
|
|
|
|
|
// color: accentColor.withOpacity(0.3),
|
|
|
|
|
// ),
|
|
|
|
|
// ),
|
|
|
|
|
// ],
|
|
|
|
|
// ),
|
|
|
|
|
40.height,
|
|
|
|
|
ShowFillButton(
|
|
|
|
|
title: "Check Code",
|
|
|
|
|
width: double.infinity,
|
|
|
|
|
onPressed: () {
|
|
|
|
|
onClick(code);
|
|
|
|
|
},
|
|
|
|
|
)
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
|