Skip to content

Runtime display error with Dart v2 #1

Description

@Soundbytes

compiling and running the app under Dart2 gave me a red screen on the device with the message

type '_BroadcastStream' is not a subtype of type 'Stream<List>'

It seems the error can be fixed by repacing line 7 in file lib/favorites_manager.dart

StreamController _favStreamController = new StreamController.broadcast();

with:

StreamController<List<Favorite>> _favStreamController = new StreamController<List<Favorite>>.broadcast();

(Dart2 is more rigid with type checking than Dart1)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions