import 'package:initial_folder/services/forgot_password_service.dart';

import '../models/forgot_password_model.dart';
import 'package:flutter/foundation.dart';

class ForgotPasswordProvider extends ChangeNotifier {
  final ForgotService _apiService = ForgotService();
  ForgotPasswordModel? _forgotPasswordModel;
  ForgotPasswordModel? get forgotPasswordModel => _forgotPasswordModel;

  Future<void> forgotPassword(String email) async {
    try {
      _forgotPasswordModel = await _apiService.forgotPassword(email: email);
      notifyListeners();
    } catch (e) {
      rethrow;
    }
  }
}
