You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
- import 'package:farm_tpf/data/api/dio_provider.dart';
- import 'package:farm_tpf/data/api/rest_client.dart';
- import 'package:farm_tpf/models/account.dart';
- import 'package:farm_tpf/models/password.dart';
-
- class UserRepository {
- final dio = DioProvider.instance();
-
- Future<Account> getUser() {
- final client = RestClient(dio);
- return client.getMe();
- }
-
- Future<void> forgotPassword(String email) {
- final client = RestClient(dio);
- return client.forgotPassword(email);
- }
-
- Future<void> changePassword(Password password) {
- final client = RestClient(dio);
- return client.changePassword(password);
- }
-
- Future<Account> updateProfile(Account account) {
- final client = RestClient(dio);
- return client.updateProfile(account);
- }
- }
|