-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
updated patient image url because link was broken. updated roster rem…
…ote repository and added authentication remote repository.
- Loading branch information
1 parent
fd65984
commit ff958b2
Showing
4 changed files
with
57 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
27 changes: 27 additions & 0 deletions
27
lib/src/features/authentication/data/remote.repository.dart
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
import 'package:flutter_riverpod/flutter_riverpod.dart'; | ||
|
||
import '../domain/user_model.dart'; | ||
|
||
abstract class RemoteRepository { | ||
factory RemoteRepository() => RemoteRepositoryImpl(); | ||
|
||
Future<User> login(String email, String password); | ||
Future<void> logout(); | ||
} | ||
|
||
class RemoteRepositoryImpl implements RemoteRepository { | ||
@override | ||
Future<User> login(String email, String password) async { | ||
await Future.delayed(const Duration(seconds: 2)); | ||
return User(name: 'John Doe', email: email); | ||
} | ||
|
||
@override | ||
Future<void> logout() async { | ||
await Future.delayed(const Duration(seconds: 2)); | ||
} | ||
} | ||
|
||
final remoteRepositoryProvider = Provider<RemoteRepository>((ref) { | ||
return RemoteRepository(); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters