import 'package:hmg_patient_app/analytics/google-analytics.dart'; import 'package:hmg_patient_app/locator.dart'; import 'package:hmg_patient_app/new_ui/otp/otp_validation_bootmsheet_widget.dart'; import 'package:hmg_patient_app/pages/login/login-type.dart'; import 'package:hmg_patient_app/pages/login/register.dart'; import 'package:hmg_patient_app/pages/login/register_new.dart'; import 'package:hmg_patient_app/theme/colors.dart'; import 'package:hmg_patient_app/uitl/translations_delegate_base.dart'; import 'package:hmg_patient_app/widgets/buttons/defaultButton.dart'; import 'package:hmg_patient_app/widgets/others/app_scaffold_widget.dart'; import 'package:hmg_patient_app/widgets/transitions/fade_page.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:flutter_svg/svg.dart'; class WelcomeLogin extends StatefulWidget { @override _WelcomeLogin createState() => _WelcomeLogin(); } class _WelcomeLogin extends State { bool isLoading = true; @override void initState() { isLoading = true; super.initState(); } Widget build(BuildContext context) { return AppScaffold( appBarTitle: TranslationBase.of(context).welcome, isShowDecPage: false, isShowAppBar: true, showNewAppBar: true, backgroundColor: Color(0xffF8F8F8), showNewAppBarTitle: false, body: Column( children: [ Expanded( child: ListView( padding: EdgeInsets.only(left: 21, right: 21), physics: BouncingScrollPhysics(), children: [ SizedBox(height: 30), Row( children: [ SvgPicture.asset( "assets/images/new/hmg_icon.svg", height: 62, width: 62, ), ], ), ], ), ), Expanded( child: Container( padding: EdgeInsets.only(top: 16, bottom: 16, right: 21, left: 21), child: Column( children: [ Text( // TranslationBase.of(context).welcome, "Welcome to Dr. Sulaiman Al Habib Medical Group", style: TextStyle(fontSize: 36, fontWeight: FontWeight.w600, color: Color(0xff2B353E), letterSpacing: -0.4, height: 47 / 36), ), SizedBox(height: 16) ], ), ), ), Container( color: Colors.white, padding: EdgeInsets.only(top: 16, bottom: 16, right: 21, left: 21), child: Row( mainAxisSize: MainAxisSize.min, children: [ Expanded( child: DefaultButton( TranslationBase.of(context).login, () => { showModalBottomSheet( context: context, isScrollControlled: true, backgroundColor: Colors.transparent, builder: (context) => OtpVerificationBottomSheet( countryCode: "+966", // Default is +966 as in your example initialPhoneNumber: "574345434", // Optional initial value onOtpRequested: (phoneNumber, viaWhatsApp) { // Handle OTP request here print("Requesting OTP for $phoneNumber via ${viaWhatsApp ? "WhatsApp" : "SMS"}"); Navigator.pop(context); }, )) // Navigator.of(context).push(FadePage(page: RegisterNew())), // locator().loginRegistration.visited_alhabib_group(false), }, color: CustomColors.accentColor, textColor: Colors.white, ), ), // SizedBox(width: 8), // Expanded( // child: DefaultButton( // TranslationBase.of(context).yes, // () => { // Navigator.of(context).push(FadePage(page: LoginType())), // locator().loginRegistration.visited_alhabib_group(true), // }, // color: CustomColors.green, // ), // ), ], ), ), ], ), ); } }