add otp component
This commit is contained in:
@@ -1,8 +1,7 @@
|
||||
import 'package:cims_apps/application/component/button/button_view.dart';
|
||||
import 'package:cims_apps/application/component/otp/otp_view.dart';
|
||||
import 'package:cims_apps/application/component/text_caption/text_caption.dart';
|
||||
import 'package:cims_apps/application/component/text_form/text_form_view.dart';
|
||||
import 'package:cims_apps/core/route/route.dart';
|
||||
import 'package:cims_apps/features/auth/registration/view/registration_password_view.dart';
|
||||
import 'package:flutter/gestures.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
@@ -12,6 +11,30 @@ class RegistrationView extends StatelessWidget {
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
_showOtpWidget() {
|
||||
Navigator.of(context).pop();
|
||||
showModalBottomSheet(
|
||||
context: context,
|
||||
isScrollControlled: true,
|
||||
enableDrag: false,
|
||||
builder: (BuildContext context) {
|
||||
return Padding(
|
||||
padding: EdgeInsets.only(
|
||||
top: MediaQueryData.fromView(
|
||||
WidgetsBinding.instance.window,
|
||||
).padding.top,
|
||||
),
|
||||
child: const OtpView(
|
||||
title: 'Sign Up',
|
||||
contentTitle: 'Check your SMS',
|
||||
contentSubtitle:
|
||||
'Enter 4 digit code We’ve sent to verify your phone number',
|
||||
),
|
||||
);
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
return Scaffold(
|
||||
appBar: AppBar(
|
||||
title: const Text('Sign Up'),
|
||||
@@ -29,7 +52,9 @@ class RegistrationView extends StatelessWidget {
|
||||
ButtonView(
|
||||
name: 'Next',
|
||||
onPressed: () {
|
||||
routePush(context, page: const RegistrationPasswordView());
|
||||
_showOtpWidget();
|
||||
|
||||
// routePush(context, page: const RegistrationPasswordView());
|
||||
},
|
||||
),
|
||||
Align(
|
||||
|
||||
Reference in New Issue
Block a user