You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm studying this project to learn more about Flutter and using the BLoC pattern. Looking at the onTap() handler (which is somehow causing this exception), it's more complicated than I expected. Can you add some comments about why it's creating a second ProjectBloc object and why it's calling projectBloc.refresh(). IMHO, the point of Flutter and the BLoC pattern was to avoid things like refresh().
The text was updated successfully, but these errors were encountered:
Steps to reproduce:
Open side panel
Expand Projects sublist
Click "Add Project" list entry
Create a new project
The console log displays:
E/flutter (26554): [ERROR:flutter/shell/common/shell.cc(184)] Dart Error: Unhandled exception:
E/flutter (26554): Bad state: Cannot add new events after calling close
E/flutter (26554): #0 _BroadcastStreamController.add (dart:async/broadcast_stream_controller.dart:253:24)
E/flutter (26554): #1 _StreamSinkWrapper.add (dart:async/stream_controller.dart:858:13)
E/flutter (26554): #2 ProjectBloc._loadProjects. (package:flutter_app/pages/projects/project_bloc.dart:34:31)
E/flutter (26554): #3 _RootZone.runUnary (dart:async/zone.dart:1379:54)
E/flutter (26554): #4 _FutureListener.handleValue (dart:async/future_impl.dart:129:18)
E/flutter (26554): #5 Future._propagateToListeners.handleValueCallback (dart:async/future_impl.dart:642:45)
E/flutter (26554): #6 Future._propagateToListeners (dart:async/future_impl.dart:671:32)
E/flutter (26554): #7 Future._complete (dart:async/future_impl.dart:476:7)
E/flutter (26554): #8 _SyncCompleter.complete (dart:async/future_impl.dart:51:12)
E/flutter (26554): #9 _AsyncAwaitCompleter.complete (dart:async/runtime/libasync_patch.dart:28:18)
E/flutter (26554): #10 _completeOnAsyncReturn (dart:async/runtime/libasync_patch.dart:295:13)
E/flutter (26554): #11 ProjectDB.getProjects (package:flutter_app/pages/projects/project_db.dart)
E/flutter (26554):
E/flutter (26554): #12 ProjectBloc._loadProjects (package:flutter_app/pages/projects/project_bloc.dart:33:16)
E/flutter (26554): #13 ProjectBloc.refresh (package:flutter_app/pages/projects/project_bloc.dart:50:5)
E/flutter (26554): #14 ProjectExpansionTileWidget.buildProjects. (package:flutter_app/pages/projects/project_widget.dart:61:21)
E/flutter (26554):
E/flutter (26554): #15 _InkResponseState._handleTap (package:flutter/src/material/ink_well.dart:507:14)
I'm studying this project to learn more about Flutter and using the BLoC pattern. Looking at the onTap() handler (which is somehow causing this exception), it's more complicated than I expected. Can you add some comments about why it's creating a second ProjectBloc object and why it's calling projectBloc.refresh(). IMHO, the point of Flutter and the BLoC pattern was to avoid things like refresh().
The text was updated successfully, but these errors were encountered: