mirror of
https://github.com/krawieck/lemmur/
synced 2024-12-15 10:04:13 +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);
|