Skip to content

Always throws UnimplementedError #2

Description

@JakubChromiak

With current Dart (2.12.2 - I don't know how it worked in the past) this line is always called as break only jumps out of switch, not a method. Because of that, there is always an error returned and printed into the console:

D:\SDK\Flutter\flutter\bin\cache\dart-sdk\bin\dart.exe --enable-asserts D:\Projects\Tutorials\Flutter\blockhero\tryout\lib\main-bloc.dart
lib/main-bloc.dart: Warning: Interpreting this as package URI, 'package:streams/main-bloc.dart'.
1
Unhandled exception:
Unhandled error UnimplementedError occurred in Instance of 'CounterBloc'.
#0 CounterBloc.mapEventToState (package:streams/main-bloc.dart:18:5)

#0 BlocBase.onError. (package:bloc/src/bloc.dart:389:7)
#1 BlocBase.onError (package:bloc/src/bloc.dart:390:6)
#2 _RootZone.runBinaryGuarded (dart:async/zone.dart:1558:10)
#3 _BufferingStreamSubscription._sendError.sendError (dart:async/stream_impl.dart:360:15)
#4 _BufferingStreamSubscription._sendError (dart:async/stream_impl.dart:378:16)
#5 _BufferingStreamSubscription._addError (dart:async/stream_impl.dart:280:7)
#6 _SyncBroadcastStreamController._sendError. (dart:async/broadcast_stream_controller.dart:393:20)
#7 _BroadcastStreamController._forEachListener (dart:async/broadcast_stream_controller.dart:323:15)
#8 _SyncBroadcastStreamController._sendError (dart:async/broadcast_stream_controller.dart:392:5)
#9 _BroadcastStreamController._addError (dart:async/broadcast_stream_controller.dart:290:5)
#10 _RootZone.runBinaryGuarded (dart:async/zone.dart:1558:10)
#11 _BufferingStreamSubscription._sendError.sendError (dart:async/stream_impl.dart:360:15)
#12 _BufferingStreamSubscription._sendError (dart:async/stream_impl.dart:378:16)
#13 _BufferingStreamSubscription._addError (dart:async/stream_impl.dart:280:7)
#14 _ForwardingStreamSubscription._addError (dart:async/stream_pipe.dart:128:11)
#15 _ForwardingStream._handleError (dart:async/stream_pipe.dart:95:10)
#16 _ForwardingStreamSubscription._handleError (dart:async/stream_pipe.dart:157:13)
#17 _RootZone.runBinaryGuarded (dart:async/zone.dart:1558:10)
#18 _BufferingStreamSubscription._sendError.sendError (dart:async/stream_impl.dart:360:15)
#19 _BufferingStreamSubscription._sendError (dart:async/stream_impl.dart:378:16)
#20 _DelayedError.perform (dart:async/stream_impl.dart:602:14)
#21 _StreamImplEvents.handleNext (dart:async/stream_impl.dart:706:11)
#22 _PendingEvents.schedule. (dart:async/stream_impl.dart:663:7)
#23 _microtaskLoop (dart:async/schedule_microtask.dart:40:21)
#24 _startMicrotaskLoop (dart:async/schedule_microtask.dart:49:5)
#25 _runPendingImmediateCallback (dart:isolate-patch/isolate_patch.dart:120:13)
#26 _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:185:5)

Process finished with exit code 255

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