Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unhandled Exception: type 'Future<List<Map<dynamic, dynamic>>?>' is not a subtype of type 'Future<List<Map<dynamic, dynamic>>>' in type cast #57

Open
git-boya opened this issue Sep 16, 2021 · 6 comments

Comments

@git-boya
Copy link

调用availableRScanCameras()时报错

E/flutter (23097): [ERROR:flutter/lib/ui/ui_dart_state.cc(209)] Unhandled Exception: type 'Future<List<Map<dynamic, dynamic>>?>' is not a subtype of type 'Future<List<Map<dynamic, dynamic>>>' in type cast
E/flutter (23097): #0      availableRScanCameras (package:r_scan/src/r_scan_camera.dart:17:9)
E/flutter (23097): #1      _MyAppState.initState (package:flutter_cloud/main.dart:137:5)
E/flutter (23097): #2      StatefulElement._firstBuild (package:flutter/src/widgets/framework.dart:4805:57)
E/flutter (23097): #3      ComponentElement.mount (package:flutter/src/widgets/framework.dart:4638:5)
E/flutter (23097): #4      Element.inflateWidget (package:flutter/src/widgets/framework.dart:3673:14)
E/flutter (23097): #5      Element.updateChild (package:flutter/src/widgets/framework.dart:3425:18)
E/flutter (23097): #6      RenderObjectToWidgetElement._rebuild (package:flutter/src/widgets/binding.dart:1198:16)
E/flutter (23097): #7      RenderObjectToWidgetElement.mount (package:flutter/src/widgets/binding.dart:1167:5)
E/flutter (23097): #8      RenderObjectToWidgetAdapter.attachToRenderTree.<anonymous closure> (package:flutter/src/widgets/binding.dart:1112:18)
E/flutter (23097): #9      BuildOwner.buildScope (package:flutter/src/widgets/framework.dart:2573:19)
E/flutter (23097): #10     RenderObjectToWidgetAdapter.attachToRenderTree (package:flutter/src/widgets/binding.dart:1111:13)
E/flutter (23097): #11     WidgetsBinding.attachRootWidget (package:flutter/src/widgets/binding.dart:944:7)
E/flutter (23097): #12     WidgetsBinding.scheduleAttachRootWidget.<anonymous closure> (package:flutter/src/widgets/binding.dart:924:7)
E/flutter (23097): #13     _rootRun (dart:async/zone.dart:1420:47)
E/flutter (23097): #14     _CustomZone.run (dart:async/zone.dart:1328:19)
E/flutter (23097): #15     _CustomZone.runGuarded (dart:async/zone.dart:1236:7)
E/flutter (23097): #16     _CustomZone.bindCallbackGuarded.<anonymous closure> (dart:async/zone.dart:1276:23)
E/flutter (23097): #17     _rootRun (dart:async/zone.dart:1428:13)
E/flutter (23097): #18     _CustomZone.run (dart:async/zone.dart:1328:19)
E/flutter (23097): #19     _CustomZone.bindCallback.<anonymous closure> (dart:async/zone.dart:1260:23)
E/flutter (23097): #20     Timer._createTimer.<anonymous closure> (dart:async-patch/timer_patch.dart:18:15)
E/flutter (23097): #21     _Timer._runTimers (dart:isolate-patch/timer_impl.dart:395:19)
E/flutter (23097): #22     _Timer._handleMessage (dart:isolate-patch/timer_impl.dart:426:5)
E/flutter (23097): #23     _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:184:12)
E/flutter (23097): 
@wszdhxh
Copy link

wszdhxh commented Sep 18, 2021

我也有这个问题, 请问怎么解决呢?

@git-boya
Copy link
Author

我也有这个问题, 请问怎么解决呢?

我换别的插件了flutter_scankit 也很多坑

@antoniopetricc
Copy link

how can i solve?

@devs4522
Copy link

Has anyone solve this issue ?

@gogogoboom
Copy link

This error should be caused by file identification failure, check the file path and whether the file exists

@Herryjoeson
Copy link

https://github.com/Herryjoeson/r_scan.git
i fix this problem in my project,every things is ok

Herryjoeson added a commit to Herryjoeson/r_scan that referenced this issue Mar 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants