Refactored the [CurrentSelectionService] to use streams

This commit is contained in:
Mariano Uvalle 2019-04-06 20:38:37 -06:00
parent 7abee74b73
commit 3b9f702a37
10 changed files with 136 additions and 43 deletions

View file

@ -2,5 +2,20 @@ import 'dart:async';
import '../resources/firestore_provider.dart';
import '../resources/firebase_storage_provider.dart';
import '../services/current_selection_service.dart';
class EventBloc {}
/// A business logic component that manages the state for an event screen.
class EventBloc {
/// An instance of the current selection service.
final CurrentSelectionService _selectionService = currentSelectionService;
/// The name of the event that's currently selected.
///
/// Read only.
String get selectedEventName => _selectionService.event.name;
/// Fetches the tasks for the current user that a part of the currently
/// selected event.
void fetchTasks() {}
void dispose() {}
}