completed till otp receiving

pull/12/head
faizatflutter 2 months ago
parent 36c41d40f8
commit b15ddd1713

@ -20,6 +20,8 @@ class AppState {
int getLanguageID() => EasyLocalization.of(navigationService.navigatorKey.currentContext!)?.locale.languageCode == "ar" ? 1 : 2;
String? getLanguageCode() => EasyLocalization.of(navigationService.navigatorKey.currentContext!)?.locale.languageCode;
AuthenticatedUser? _authenticatedUser;
void setAuthenticatedUser(AuthenticatedUser authenticatedUser) {

@ -2,7 +2,6 @@ import 'dart:convert';
import 'dart:developer';
import 'package:flutter/material.dart';
import 'package:hmg_patient_app_new/core/app_export.dart';
import 'package:hmg_patient_app_new/core/app_state.dart';
import 'package:hmg_patient_app_new/core/common_models/nationality_country_model.dart';
import 'package:hmg_patient_app_new/core/enums.dart';
@ -14,6 +13,7 @@ import 'package:hmg_patient_app_new/features/authentication/authentication_repo.
import 'package:hmg_patient_app_new/features/authentication/models/resp_models/check_activation_code_resp_model.dart';
import 'package:hmg_patient_app_new/features/authentication/models/resp_models/select_device_by_imei.dart';
import 'package:hmg_patient_app_new/presentation/authentication/login.dart';
import 'package:hmg_patient_app_new/routes/app_routes.dart';
import 'package:hmg_patient_app_new/services/cache_service.dart';
import 'package:hmg_patient_app_new/services/dialog_service.dart';
import 'package:hmg_patient_app_new/services/error_handler_service.dart';
@ -45,6 +45,7 @@ class AuthenticationViewModel extends ChangeNotifier {
GenderTypeEnum? genderType;
bool isTermsAccepted = false;
List<NationalityCountries>? countriesList;
NationalityCountries? pickedCountryByUAEUser;
bool isDubai = false;

@ -10,6 +10,7 @@ import 'package:hmg_patient_app_new/core/utils/utils.dart';
import 'package:hmg_patient_app_new/extensions/string_extensions.dart';
import 'package:hmg_patient_app_new/extensions/widget_extensions.dart';
import 'package:hmg_patient_app_new/features/authentication/authentication_view_model.dart';
import 'package:hmg_patient_app_new/features/authentication/widgets/otp_verification_screen.dart';
import 'package:hmg_patient_app_new/generated/locale_keys.g.dart';
import 'package:hmg_patient_app_new/theme/colors.dart';
import 'package:hmg_patient_app_new/widgets/appbar/app_bar_widget.dart';
@ -17,7 +18,6 @@ import 'package:hmg_patient_app_new/widgets/bottomsheet/generic_bottom_sheet.dar
import 'package:hmg_patient_app_new/widgets/buttons/custom_button.dart' show CustomButton;
import 'package:hmg_patient_app_new/widgets/dropdown/country_dropdown_widget.dart';
import 'package:hmg_patient_app_new/widgets/input_widget.dart';
import 'package:hmg_patient_app_new/widgets/otp/otp.dart';
import 'package:provider/provider.dart';
class RegisterNew extends StatefulWidget {
@ -223,7 +223,13 @@ class _RegisterNew extends State<RegisterNew> {
child: CustomButton(
text: LocaleKeys.sendOTPSMS.tr(),
onPressed: () {
Navigator.of(context).push(MaterialPageRoute(builder: (BuildContext context) => OTPVerificationPage(phoneNumber: '12234567')));
Navigator.of(context).push(MaterialPageRoute(
builder: (BuildContext context) => OTPVerificationScreen(
phoneNumber: '504278212',
checkActivationCode: (int code) {},
onResendOTPPressed: (String phone) {},
),
));
// if (mobileNo.isEmpty) {
// context.showBottomSheet(

@ -1,4 +1,3 @@
import 'package:easy_localization/easy_localization.dart';
import 'package:flutter/material.dart';
import 'package:hmg_patient_app_new/core/app_assets.dart';
@ -175,7 +174,11 @@ class _RegisterNew extends State<RegisterNewStep2> {
? Selector<AuthenticationViewModel, ({List<NationalityCountries>? countriesList, NationalityCountries? selectedCountry, bool isArabic})>(
selector: (context, authViewModel) {
final appState = getIt.get<AppState>();
return (countriesList: authViewModel.countriesList, selectedCountry: authViewModel.pickedCountryByUAEUser, isArabic: appState.isArabic());
return (
countriesList: authViewModel.countriesList,
selectedCountry: authViewModel.pickedCountryByUAEUser,
isArabic: appState.isArabic(),
);
},
shouldRebuild: (previous, next) => previous.countriesList != next.countriesList || previous.selectedCountry != next.selectedCountry || previous.isArabic != next.isArabic,
builder: (context, data, child) {

@ -34,13 +34,13 @@ class TextInputWidget extends StatelessWidget {
final bool hasError;
final String? errorMessage;
Function(CountryEnum)? onCountryChange;
SelectionTypeEnum? selectionType;
final SelectionTypeEnum? selectionType;
// final List<Country> countryList;
// final Function(Country)? onCountryChange;
TextInputWidget({
Key? key,
super.key,
required this.labelText,
required this.hintText,
this.controller,
@ -63,7 +63,7 @@ class TextInputWidget extends StatelessWidget {
this.selectionType,
// this.countryList = const [],
// this.onCountryChange,
}) : super(key: key);
});
@override
Widget build(BuildContext context) {

@ -33,10 +33,10 @@ dependencies:
provider: ^6.1.5+1
get_it: ^8.2.0
just_audio: ^0.10.4
# flutter_callkit_incoming:
# git:
# url: https://github.com/hiennguyen92/flutter_callkit_incoming.git
# ref: dev
# flutter_callkit_incoming:
# git:
# url: https://github.com/hiennguyen92/flutter_callkit_incoming.git
# ref: dev
url_launcher: ^6.3.2
logger: ^2.6.1
lottie: ^3.3.1
@ -93,24 +93,24 @@ flutter:
fonts:
- family: Poppins
fonts:
# - asset: assets/fonts/poppins/Poppins-Black.ttf
# weight: 900
# - asset: assets/fonts/poppins/Poppins-ExtraBold.ttf
# weight: 800
# - asset: assets/fonts/poppins/Poppins-Bold.ttf
# weight: 700
# - asset: assets/fonts/poppins/Poppins-Black.ttf
# weight: 900
# - asset: assets/fonts/poppins/Poppins-ExtraBold.ttf
# weight: 800
# - asset: assets/fonts/poppins/Poppins-Bold.ttf
# weight: 700
- asset: assets/fonts/poppins/Poppins-SemiBold.ttf
weight: 600
- asset: assets/fonts/poppins/Poppins-Medium.ttf
weight: 500
- asset: assets/fonts/poppins/Poppins-Regular.ttf
weight: 400
# - asset: assets/fonts/poppins/Poppins-Light.ttf
# weight: 300
# - asset: assets/fonts/poppins/Poppins-ExtraLight.ttf
# weight: 200
# - asset: assets/fonts/poppins/Poppins-Thin.ttf
# weight: 100
# - asset: assets/fonts/poppins/Poppins-Light.ttf
# weight: 300
# - asset: assets/fonts/poppins/Poppins-ExtraLight.ttf
# weight: 200
# - asset: assets/fonts/poppins/Poppins-Thin.ttf
# weight: 100
- family: GESSTwo

Loading…
Cancel
Save