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:flutter/gestures.dart'; import 'package:flutter/material.dart'; class RegistrationView extends StatelessWidget { static const routName = '/RegistrationView'; const RegistrationView({Key? key}) : super(key: key); @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'), ), body: Container( padding: const EdgeInsets.all(24.0), child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ const TextCaption( title: 'Enter your phone number', subtitle: 'Input your registered phone number', ), TextFormView(name: 'Phone Number'), ButtonView( name: 'Next', onPressed: () { _showOtpWidget(); // routePush(context, page: const RegistrationPasswordView()); }, ), Align( alignment: Alignment.center, child: RichText( textAlign: TextAlign.center, text: TextSpan(children: [ const TextSpan( text: 'Already have an account? ', style: TextStyle( color: Colors.black, decoration: TextDecoration.none, ), ), TextSpan( recognizer: TapGestureRecognizer() ..onTap = () { print('object'); }, text: ' Sign In', style: const TextStyle( color: Colors.blue, ), ), ]), ), ) ], ), ), ); } }