mirror of
https://github.com/krawieck/lemmur/
synced 2024-12-12 00:26:23 +01:00
14 lines
541 B
Dart
14 lines
541 B
Dart
import 'package:flutter_hooks/flutter_hooks.dart';
|
|
import 'package:provider/provider.dart';
|
|
|
|
import '../stores/accounts_store.dart';
|
|
import '../stores/config_store.dart';
|
|
|
|
AccountsStore useAccountsStore() => useContext().watch<AccountsStore>();
|
|
T useAccountsStoreSelect<T>(T selector(AccountsStore store)) =>
|
|
useContext().select<AccountsStore, T>(selector);
|
|
|
|
ConfigStore useConfigStore() => useContext().watch<ConfigStore>();
|
|
T useConfigStoreSelect<T>(T selector(ConfigStore store)) =>
|
|
useContext().select<ConfigStore, T>(selector);
|