mucke/lib/presentation/state/navigation_store.dart

28 lines
491 B
Dart
Raw Normal View History

2020-04-12 12:34:19 +02:00
import 'package:mobx/mobx.dart';
part 'navigation_store.g.dart';
class NavigationStore extends _NavigationStore with _$NavigationStore {
NavigationStore() : super();
}
abstract class _NavigationStore with Store {
_NavigationStore();
bool _initialized = false;
@observable int navIndex = 1;
@action
2020-05-27 21:54:33 +02:00
void init() {
2020-04-12 12:34:19 +02:00
if (!_initialized) {
print('NavigationStore.init');
_initialized = true;
}
}
@action
void setNavIndex(int i) {
navIndex = i;
}
}