clean warnings
This commit is contained in:
@@ -64,21 +64,21 @@ class AuthRemoteDatasourceImpl implements AuthRemoteDatasource {
|
|||||||
throw FormatException("No phone or email address given");
|
throw FormatException("No phone or email address given");
|
||||||
}
|
}
|
||||||
|
|
||||||
late final Map<String, dynamic> body;
|
// late final Map<String, dynamic> body;
|
||||||
if (email != null) {
|
if (email != null) {
|
||||||
body = {'email': email};
|
// body = {'email': email};
|
||||||
return 'ec14b7e7-58dd-4a59-9f41-0da86eaabf14';
|
return 'ec14b7e7-58dd-4a59-9f41-0da86eaabf14';
|
||||||
} else {
|
} else {
|
||||||
body = {'phone': phone!};
|
// body = {'phone': phone!};
|
||||||
return 'ec14b7e7-58dd-4a59-9f41-0da86eaabf14';
|
return 'ec14b7e7-58dd-4a59-9f41-0da86eaabf14';
|
||||||
throw Exception("reset by phone is not currently implemented");
|
// throw Exception("reset by phone is not currently implemented");
|
||||||
}
|
}
|
||||||
final response = await _repository.put<Map<String, dynamic>>(
|
/*final response = await _repository.put<Map<String, dynamic>>(
|
||||||
'/auth/reset-password',
|
'/auth/reset-password',
|
||||||
body: body,
|
body: body,
|
||||||
);
|
);
|
||||||
final token = response.data!['token'];
|
final token = response.data!['token'];
|
||||||
return token;
|
return token;*/
|
||||||
} on DioException catch (error) {
|
} on DioException catch (error) {
|
||||||
throw _mapDioError(error, defaultMessage: 'Error to request password reset');
|
throw _mapDioError(error, defaultMessage: 'Error to request password reset');
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ import 'package:utils/utils.dart';
|
|||||||
class NewPasswordScreen extends ConsumerWidget {
|
class NewPasswordScreen extends ConsumerWidget {
|
||||||
final NavigationContract navigationContract;
|
final NavigationContract navigationContract;
|
||||||
|
|
||||||
const NewPasswordScreen({required this.navigationContract});
|
const NewPasswordScreen({super.key, required this.navigationContract});
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context, WidgetRef ref) {
|
Widget build(BuildContext context, WidgetRef ref) {
|
||||||
|
|||||||
@@ -201,7 +201,7 @@ class RecoverPasswordViewModel extends Notifier<RecoverPasswordViewState> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Future<void> recoverPassword() async {
|
Future<void> recoverPassword() async {
|
||||||
final String fullPhone = state.newDialCode + state.newPhoneNumber;
|
//final String fullPhone = state.newDialCode + state.newPhoneNumber;
|
||||||
final String password = state.password;
|
final String password = state.password;
|
||||||
|
|
||||||
if (!state.equalPasswords) {
|
if (!state.equalPasswords) {
|
||||||
|
|||||||
Reference in New Issue
Block a user