import 'package:flutter/material.dart';
import 'package:initial_folder/models/reset_model.dart';
import 'package:initial_folder/services/reset_service.dart';

class ResetProvider with ChangeNotifier {
  ResetModel? _reset;
  ResetModel? get reset => _reset;

  set reset(ResetModel? reset) {
    _reset = reset;
    notifyListeners();
  }

  Future<bool> resetPassword({
    required String email,
  }) async {
    try {
      ResetModel? reset = await ResetService().kirimEmail(
        email: email,
      );

      _reset = reset;
      return true;
    } catch (e) {
      print("EXception: $e");
      return false;
    }
  }
}
