ericwindmill/flutter_by_example_apps

Redux App Error On Opening

Closed this issue · 2 comments

Hi, I'm still getting error when Open your Redux App Example:

Error connecting to the service protocol: HttpException: Connection closed before full header was received, uri = http://127.0.0.1:50466/ws
I/flutter (13364): ══╡ EXCEPTION CAUGHT BY WIDGETS LIBRARY ╞═══════════════════════════════════════════════════════════
I/flutter (13364): The following assertion was thrown building MainApp(dirty):
I/flutter (13364): type 'List<TypedMiddleware<AppState, Object>>' is not a subtype of type 'Iterable<(Store,
I/flutter (13364): dynamic, (dynamic) => void) => void>'
I/flutter (13364): Either the assertion indicates an error in the framework itself, or we should provide substantially
I/flutter (13364): more information in this error message to help you determine and fix the underlying cause.
I/flutter (13364): In either case, please report this assertion by filing a bug on GitHub:
I/flutter (13364): https://github.com/flutter/flutter/issues/new?template=BUG.md
I/flutter (13364): When the exception was thrown, this was the stack:
I/flutter (13364): #0 MainApp.build (package:me_suite/main.dart:25:18)
I/flutter (13364): #1 StatelessElement.build (package:flutter/src/widgets/framework.dart:3774:28)
I/flutter (13364): #2 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3721:15)
I/flutter (13364): #3 Element.rebuild (package:flutter/src/widgets/framework.dart:3547:5)
I/flutter (13364): #4 ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:3701:5)
I/flutter (13364): #5 ComponentElement.mount (package:flutter/src/widgets/framework.dart:3696:5)
I/flutter (13364): #6 Element.inflateWidget (package:flutter/src/widgets/framework.dart:2950:14)
I/flutter (13364): #7 Element.updateChild (package:flutter/src/widgets/framework.dart:2753:12)
I/flutter (13364): #8 RenderObjectToWidgetElement._rebuild (package:flutter/src/widgets/binding.dart:909:16)
I/flutter (13364): #9 RenderObjectToWidgetElement.mount (package:flutter/src/widgets/binding.dart:880:5)
I/flutter (13364): #10 RenderObjectToWidgetAdapter.attachToRenderTree. (package:flutter/src/widgets/binding.dart:826:17)
I/flutter (13364): #11 BuildOwner.buildScope (package:flutter/src/widgets/framework.dart:2266:19)
I/flutter (13364): #12 RenderObjectToWidgetAdapter.attachToRenderTree (package:flutter/src/widgets/binding.dart:825:13)
I/flutter (13364): #13 _WidgetsFlutterBinding&BindingBase&GestureBinding&ServicesBinding&SchedulerBinding&PaintingBinding&SemanticsBinding&RendererBinding&WidgetsBinding.attachRootWidget (package:flutter/src/widgets/binding.dart:712:7)
I/flutter (13364): #14 runApp (package:flutter/src/widgets/binding.dart:756:7)
I/flutter (13364): #15 main (package:me_suite/main.dart:11:16)
I/flutter (13364): #16 _startIsolate. (dart:isolate/runtime/libisolate_patch.dart:289:19)
I/flutter (13364): #17 _RawReceivePortImpl._handleMessage (dart:isolate/runtime/libisolate_patch.dart:171:12)
I/flutter (13364): ════════════════════════════════════════════════════════════════════════════════════════════════════

The code from repo are little different from tutorial (https://flutterbyexample.com/firebase-log-in-middleware).
Just change dynamic to List<Middleware<AppState>> in auth_middleware.dart:7

worked for me :)

thanks, i will try it