📜  错误状态:Stream 已被监听 - Dart 代码示例

📅  最后修改于: 2022-03-11 14:48:08.677000             🧑  作者: Mango

代码示例1
StreamController<...> selectedLocation =
      StreamController<...>.broadcast();
      
  @override
  void initState() {
    final applicationBloc =
        Provider.of(context, listen: false);

    locationSubScription =
        applicationBloc.selectedLocation.stream.listen((place) {
      _goToPlace(place);
    });