blob: 3c980dc899486cbb61ad3acf41431e285e173124 [file] [log] [blame]
// Copyright 2015 The Vanadium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
library store;
import 'dart:async';
import 'dart:collection';
import '../models/all.dart' as model;
import 'utils/factory.dart' as factory;
part 'actions.dart';
part 'state.dart';
// Provides the state, actions and state change event to the application.
abstract class Store {
static Store _singletonStore = factory.create();
factory Store.singleton() {
return _singletonStore;
}
AppActions get actions;
AppState get state;
Stream get onStateChange;
// Initializes the store and loads parts of the state that are required before
// the application can start, such as the user information and settings.
Future init();
}