2020-09-16 23:15:42 +02:00
|
|
|
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>();
|
2020-10-26 09:18:30 +01:00
|
|
|
T useAccountsStoreSelect<T>(T selector(AccountsStore store)) =>
|
|
|
|
useContext().select<AccountsStore, T>(selector);
|
|
|
|
|
2020-09-16 23:15:42 +02:00
|
|
|
ConfigStore useConfigStore() => useContext().watch<ConfigStore>();
|
2020-10-26 09:18:30 +01:00
|
|
|
T useConfigStoreSelect<T>(T selector(ConfigStore store)) =>
|
|
|
|
useContext().select<ConfigStore, T>(selector);
|