-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(overview): use a mock of the home viewmodel
- Loading branch information
1 parent
020f304
commit 29b0887
Showing
5 changed files
with
62 additions
and
10 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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import "package:hooks_riverpod/hooks_riverpod.dart"; | ||
import "package:proxima/models/ui/post_overview.dart"; | ||
import "package:proxima/viewmodels/home_view_model.dart"; | ||
|
||
class MockHomeViewModel extends AsyncNotifier<List<PostOverview>> | ||
implements HomeViewModel { | ||
// build function | ||
final Future<List<PostOverview>> Function() _build; | ||
|
||
MockHomeViewModel({required build}) : _build = build; | ||
|
||
@override | ||
Future<List<PostOverview>> build() { | ||
return _build(); | ||
} | ||
} |