diff --git a/lib/src/blocs/event_bloc.dart b/lib/src/blocs/event_bloc.dart index 69cd55c..2779472 100644 --- a/lib/src/blocs/event_bloc.dart +++ b/lib/src/blocs/event_bloc.dart @@ -123,7 +123,13 @@ class EventBloc { /// Fetches the paths of all the images linked to this event. Future fetchImagesPaths() async { await _ready; - _imagesPaths.sink.add(_event.media); + _firestore.getEventObservable(_user.id, _event.id).transform( + StreamTransformer>.fromHandlers( + handleData: (event, sink) { + sink.add(event.media); + }, + ), + ).pipe(_imagesPaths); } /// Marks a task as done in the database. diff --git a/lib/src/screens/event_screen.dart b/lib/src/screens/event_screen.dart index d6a4058..97b12e1 100644 --- a/lib/src/screens/event_screen.dart +++ b/lib/src/screens/event_screen.dart @@ -2,7 +2,6 @@ import 'dart:async'; import 'dart:io'; import 'package:flutter/material.dart'; -import 'package:font_awesome_flutter/font_awesome_flutter.dart'; import '../utils.dart' show getImageThumbnailPath; import '../blocs/event_bloc.dart';