Last active
October 2, 2022 10:40
-
-
Save daiki1003/fabe865c43aac3033ff5e742c6ca44aa to your computer and use it in GitHub Desktop.
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
final someRepositoryProvider = Provider( | |
(ref) => SomeRepository(ref.read), | |
); | |
class SomeRepository { | |
const SomeRepository(this._read); | |
final Ref _ref; | |
Future<void> fetch() async { | |
final response = _ref.read(dioProvider).get(...); | |
// ... | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment