1- import 'dart:convert' ;
2-
3- import 'package:flutter_riverpod/flutter_riverpod.dart' ;
41import 'package:lam7a/core/models/user_model.dart' ;
5- import 'package:lam7a/core/services/api_service.dart' ;
62import 'package:lam7a/features/authentication/model/authentication_user_credentials_model.dart' ;
73import 'package:lam7a/features/authentication/model/authentication_user_data_model.dart' ;
84import 'package:lam7a/features/authentication/service/authentication_api_service.dart' ;
95import 'package:lam7a/features/authentication/utils/authentication_constants.dart' ;
106import 'package:riverpod_annotation/riverpod_annotation.dart' ;
117part 'authentication_impl_repository.g.dart' ;
8+
129@riverpod
1310AuthenticationRepositoryImpl authenticationImplRepository (Ref ref) {
1411 return AuthenticationRepositoryImpl (
@@ -23,17 +20,20 @@ class AuthenticationRepositoryImpl {
2320 Map <String , dynamic > body;
2421 body = await apiService.checkEmail (email);
2522 print (body);
26- return (body[AuthenticationConstants .message].toString () == AuthenticationConstants .emailExist);
23+ return (body[AuthenticationConstants .message].toString () ==
24+ AuthenticationConstants .emailExist);
2725 }
2826
2927 Future <bool > verificationOTP (String email) async {
3028 final message = await apiService.verificationOTP (email);
31- return (message[AuthenticationConstants .status].toString () == AuthenticationConstants .success);
29+ return (message[AuthenticationConstants .status].toString () ==
30+ AuthenticationConstants .success);
3231 }
3332
3433 Future <bool > resendOTP (String email) async {
3534 final message = await apiService.resendOTP (email);
36- return (message[AuthenticationConstants .status].toString () == AuthenticationConstants .success);
35+ return (message[AuthenticationConstants .status].toString () ==
36+ AuthenticationConstants .success);
3737 }
3838
3939 Future <UserModel ?> register (AuthenticationUserDataModel user) async {
@@ -44,7 +44,8 @@ class AuthenticationRepositoryImpl {
4444
4545 Future <bool > verifyOTP (String email, String OTP ) async {
4646 final message = await apiService.verifyOTP (email, OTP );
47- return (message[AuthenticationConstants .status].toString () == AuthenticationConstants .success);
47+ return (message[AuthenticationConstants .status].toString () ==
48+ AuthenticationConstants .success);
4849 }
4950
5051 Future <UserModel > login (
0 commit comments