Needs to be updated for Dart 2 Compatibility
See original GitHub issueneeds to be updated to dart 2 preview. https://groups.google.com/forum/#!topic/flutter-dev/H8dDhWg_c8I
Steps to Reproduce
Integrated https://github.com/evrone/flutter_audio with an app for a few months. Was working until recently. Now throws
2018-05-01 10:17:34.794099-0700 Runner[52813:1608248] flutter: type '(Map<String, dynamic>) => void' is not a subtype of type '(dynamic) => void'
Logs
Run your application with flutter run
and attach all the log output.
2018-05-01 10:17:34.627949-0700 Runner[52813:1608279] flutter: Observatory listening on http://127.0.0.1:61887/
2018-05-01 10:17:34.786834-0700 Runner[52813:1608248] flutter: βββ‘ EXCEPTION CAUGHT BY WIDGETS LIBRARY ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
2018-05-01 10:17:34.793689-0700 Runner[52813:1608248] flutter: The following assertion was thrown attaching to the render tree:
2018-05-01 10:17:34.794099-0700 Runner[52813:1608248] flutter: type β(Map<String, dynamic>) => voidβ is not a subtype of type β(dynamic) => voidβ
2018-05-01 10:17:34.803361-0700 Runner[52813:1608248] flutter:
2018-05-01 10:17:34.803674-0700 Runner[52813:1608248] flutter: Either the assertion indicates an error in the framework itself, or we should provide substantially
2018-05-01 10:17:34.804658-0700 Runner[52813:1608248] flutter: more information in this error message to help you determine and fix the underlying cause.
2018-05-01 10:17:34.804950-0700 Runner[52813:1608248] flutter: In either case, please report this assertion by filing a bug on GitHub:
2018-05-01 10:17:34.805849-0700 Runner[52813:1608248] flutter: https://github.com/flutter/flutter/issues/new
2018-05-01 10:17:34.806535-0700 Runner[52813:1608248] flutter:
2018-05-01 10:17:34.806868-0700 Runner[52813:1608248] flutter: When the exception was thrown, this was the stack:
2018-05-01 10:17:34.811722-0700 Runner[52813:1608248] flutter: #0 new MedcorderAudio (package:medcorder_audio/medcorder_audio.dart:16:50)
2018-05-01 10:17:34.812700-0700 Runner[52813:1608248] flutter: #1 new _MyAppState (file:///Users/jeanpaul/Dev/flutter_audio/example/lib/main.dart:17:36)
2018-05-01 10:17:34.813265-0700 Runner[52813:1608248] flutter: #2 MyApp.createState (file:///Users/jeanpaul/Dev/flutter_audio/example/lib/main.dart:12:36)
2018-05-01 10:17:34.813675-0700 Runner[52813:1608248] flutter: #3 new StatefulElement (package:flutter/src/widgets/framework.dart:3702:23)
2018-05-01 10:17:34.813951-0700 Runner[52813:1608248] flutter: #4 StatefulWidget.createElement (package:flutter/src/widgets/framework.dart:781:42)
2018-05-01 10:17:34.814354-0700 Runner[52813:1608248] flutter: #5 Element.inflateWidget (package:flutter/src/widgets/framework.dart:2897:40)
2018-05-01 10:17:34.814503-0700 Runner[52813:1608248] flutter: #6 Element.updateChild (package:flutter/src/widgets/framework.dart:2702:12)
2018-05-01 10:17:34.815057-0700 Runner[52813:1608248] flutter: #7 RenderObjectToWidgetElement._rebuild (package:flutter/src/widgets/binding.dart:857:16)
2018-05-01 10:17:34.815264-0700 Runner[52813:1608248] flutter: #8 RenderObjectToWidgetElement.mount (package:flutter/src/widgets/binding.dart:828:5)
2018-05-01 10:17:34.815461-0700 Runner[52813:1608248] flutter: #9 RenderObjectToWidgetAdapter.attachToRenderTree.<anonymous closure> (package:flutter/src/widgets/binding.dart:774:17)
2018-05-01 10:17:34.815602-0700 Runner[52813:1608248] flutter: #10 BuildOwner.buildScope (package:flutter/src/widgets/framework.dart:2214:19)
2018-05-01 10:17:34.815924-0700 Runner[52813:1608248] flutter: #11 RenderObjectToWidgetAdapter.attachToRenderTree (package:flutter/src/widgets/binding.dart:773:13)
2018-05-01 10:17:34.816070-0700 Runner[52813:1608248] flutter: #12 _WidgetsFlutterBinding&BindingBase&GestureBinding&ServicesBinding&SchedulerBinding&PaintingBinding&RendererBinding&WidgetsBinding.attachRootWidget (package:flutter/src/widgets/binding.dart:662:7)
2018-05-01 10:17:34.816395-0700 Runner[52813:1608248] flutter: #13 runApp (package:flutter/src/widgets/binding.dart:704:7)
2018-05-01 10:17:34.816566-0700 Runner[52813:1608248] flutter: #14 main (file:///Users/jeanpaul/Dev/flutter_audio/example/lib/main.dart:7:3)
2018-05-01 10:17:34.817113-0700 Runner[52813:1608248] flutter: #15 _startIsolate.<anonymous closure> (dart:isolate/runtime/libisolate_patch.dart:279:19)
2018-05-01 10:17:34.817693-0700 Runner[52813:1608248] flutter: #16 _RawReceivePortImpl._handleMessage (dart:isolate/runtime/libisolate_patch.dart:165:12)
2018-05-01 10:17:34.818300-0700 Runner[52813:1608248] flutter: ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
Run flutter analyze
and attach any output of that command also.
Flutter Doctor
144:example jeanpaul$ flutter doctor Doctor summary (to see all details, run flutter doctor -v): [β] Flutter (Channel beta, v0.3.1, on Mac OS X 10.13.4 17E199, locale en-US) [β] Android toolchain - develop for Android devices (Android SDK 27.0.3) [β] iOS toolchain - develop for iOS devices (Xcode 9.3) [β] Android Studio (version 3.1) [β] VS Code (version 1.22.2) [β] Connected devices (3 available)
For more information about diagnosing and reporting Flutter bugs, please see https://flutter.io/bug-reports/.
Issue Analytics
- State:
- Created 5 years ago
- Reactions:1
- Comments:11 (1 by maintainers)
i forked, and have it working for dart2: https://github.com/jeanpaulcozzatti/flutter_audio
Iβm still using -no-preview-dart-2.
I just wrote my first plugin, so let me see if I can write a patch for this.
Sent from Astro https://www.helloastro.com for Mac
On Jun 5, 2018 at 2:23 PM, Andrew Takao notifications@github.com wrote:
Iβm also having this issue, and when I do flutter run -no-preview-dart-2 I run into other issues
β You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/evrone/flutter_audio/issues/6#issuecomment-394865039, or mute the thread https://github.com/notifications/unsubscribe-auth/AAJ5eq57nNWf0UBbVa5rVAI2WXu38vbsks5t5vbRgaJpZM4TuO0a .