forked from eatvio/eatvio_app
feat(registration): add phone
This commit is contained in:
@@ -40,6 +40,7 @@ class RegistrationCubit extends Cubit<RegistrationState> {
|
||||
favoriteFoods: '',
|
||||
unfavoriteFoods: '',
|
||||
additionalInfo: '',
|
||||
phone: '',
|
||||
),
|
||||
),
|
||||
);
|
||||
@@ -48,7 +49,11 @@ class RegistrationCubit extends Cubit<RegistrationState> {
|
||||
|
||||
Future<void> tryRegistration() async {
|
||||
try {
|
||||
final token = await registrationRepository.tryRegister(state.sheet);
|
||||
final token = await registrationRepository.tryRegister(
|
||||
state.sheet.copyWith(
|
||||
phone: state.sheet.phone.replaceAll(' ', '').replaceAll('(', '').replaceAll(')', ''),
|
||||
),
|
||||
);
|
||||
await TokenStorage.saveTokenInStorage(token);
|
||||
AppRouter.navigatorKey.currentContext?.go('/my-profile-screen');
|
||||
} catch (e) {
|
||||
|
||||
Reference in New Issue
Block a user