gazal
Agosto 15, 2020, 12:00am
1
Estou lendo o livro Iniciando com Flutter Framework - Desenvolva aplicações móveis no Dart Side! e acompanhando os exemplos, mas ao chegar no Capítulo 7 - Dependências, não está rodando o exemplo.
Estou testando usando um smartphone com Android 7.1.2. O aplicativo abre mas quando clico no botão “Ler QR Code” não acontece nada e o console não apresenta nenhum erro.
Como resolver esse problema?
gazal
Agosto 15, 2020, 12:47am
2
Fiz o mesmo exemplo da documentação do plugin (https://pub.dev/packages/qrcode_reader/example ). A câmera não abre, mas aparecem informações no console:
I/ViewRootImpl(28043): ViewRoot's Touch Event : ACTION_DOWN
I/ViewRootImpl(28043): ViewRoot's Touch Event : ACTION_UP
E/flutter (28043): [ERROR:flutter/lib/ui/ui_dart_state.cc(166)] Unhandled Exception:
MissingPluginException(No implementation found for method readQRCode on channel qrcode_reader)
e[38;5;244mE/flutter (28043): #0 MethodChannel._invokeMethode[39;49m
E/flutter (28043): <asynchronous suspension>
e[38;5;244mE/flutter (28043): #1 MethodChannel.invokeMethode[39;49m
e[38;5;248mE/flutter (28043): #2 QRCodeReader.scane[39;49m
e[38;5;248mE/flutter (28043): #3 _MyHomePageState.build.<anonymous closure>. <anonymous closure>e[39;49m
e[38;5;244mE/flutter (28043): #4 State.setStatee[39;49m
e[38;5;248mE/flutter (28043): #5 _MyHomePageState.build.<anonymous closure>e [39;49m
e[38;5;244mE/flutter (28043): #6 _InkResponseState._handleTape[39;49m
e[38;5;244mE/flutter (28043): #7 _InkResponseState.build.<anonymous closure>e[39;49m
e[38;5;244mE/flutter (28043): #8 GestureRecognizer.invokeCallbacke[39;49m
e[38;5;244mE/flutter (28043): #9 TapGestureRecognizer.handleTapUpe[39;49m
e[38;5;244mE/flutter (28043): #10 BaseTapGestureRecognizer._checkUpe[39;49m
e[38;5;244mE/flutter (28043): #11 BaseTapGestureRecognizer.acceptGesturee[39;49m
e[38;5;244mE/flutter (28043): #12 GestureArenaManager.sweepe[39;49m
e[38;5;244mE/flutter (28043): #13 GestureBinding.handleEvente[39;49m
e[38;5;244mE/flutter (28043): #14 GestureBinding.dispatchEvente[39;49m
e[38;5;244mE/flutter (28043): #15 GestureBinding._handlePointerEvente[39;49m
e[38;5;244mE/flutter (28043): #16 GestureBinding._flushPointerEventQueuee[39;49m
e[38;5;244mE/flutter (28043): #17 GestureBinding._handlePointerDataPackete[39;49m
e[38;5;244mE/flutter (28043): #18 _rootRunUnary (dart:async/zone.dart:1206:13)e [39;49m
e[38;5;244mE/flutter (28043): #19 _CustomZone.runUnary (dart:async/zone.dart:1100:19)e[39;49m
e[38;5;244mE/flutter (28043): #20 _CustomZone.runUnaryGuarded (dart:async/zone.dart:1005:7)e[39;49m
e[38;5;244mE/flutter (28043): #21 _invoke1 (dart:ui/hooks.dart:267:10)e[39;49m
e[38;5;244mE/flutter (28043): #22 _dispatchPointerDataPacket (dart:ui/hooks.dart:176:5)e[39;49m
E/flutter (28043):
I/ViewRootImpl(28043): ViewRoot's Touch Event : ACTION_DOWN
I/ViewRootImpl(28043): ViewRoot's Touch Event : ACTION_UP
E/flutter (28043): [ERROR:flutter/lib/ui/ui_dart_state.cc(166)] Unhandled Exception: MissingPluginException(No implementation found for method readQRCode on channel qrcode_reader)
e[38;5;244mE/flutter (28043): #0 MethodChannel._invokeMethode[39;49m
E/flutter (28043): <asynchronous suspension>
e[38;5;244mE/flutter (28043): #1 MethodChannel.invokeMethode[39;49m
e[38;5;248mE/flutter (28043): #2 QRCodeReader.scane[39;49m
e[38;5;248mE/flutter (28043): #3 _MyHomePageState.build.<anonymous closure>.<anonymous closure>e[39;49m
e[38;5;244mE/flutter (28043): #4 State.setStatee[39;49m
e[38;5;248mE/flutter (28043): #5 _MyHomePageState.build.<anonymous closure>e[39;49m
e[38;5;244mE/flutter (28043): #6 _InkResponseState._handleTape[39;49m
e[38;5;244mE/flutter (28043): #7 _InkResponseState.build.<anonymous closure>e[39;49m
e[38;5;244mE/flutter (28043): #8 GestureRecognizer.invokeCallbacke[39;49m
e[38;5;244mE/flutter (28043): #9 TapGestureRecognizer.handleTapUpe[39;49m
e[38;5;244mE/flutter (28043): #10 BaseTapGestureRecognizer._checkUpe[39;49m
e[38;5;244mE/flutter (28043): #11 BaseTapGestureRecognizer.acceptGesturee[39;49m
e[38;5;244mE/flutter (28043): #12 GestureArenaManager.sweepe[39;49m
e[38;5;244mE/flutter (28043): #13 GestureBinding.handleEvente[39;49m
e[38;5;244mE/flutter (28043): #14 GestureBinding.dispatchEvente[39;49m
e[38;5;244mE/flutter (28043): #15 GestureBinding._handlePointerEvente[39;49m
e[38;5;244mE/flutter (28043): #16 GestureBinding._flushPointerEventQueuee[39;49m
e[38;5;244mE/flutter (28043): #17 GestureBinding._handlePointerDataPackete[39;49m
e[38;5;244mE/flutter (28043): #18 _rootRunUnary (dart:async/zone.dart:1206:13)e[39;49m
e[38;5;244mE/flutter (28043): #19 _CustomZone.runUnary (dart:async/zone.dart:1100:19)e[39;49m
e[38;5;244mE/flutter (28043): #20 _CustomZone.runUnaryGuarded (dart:async/zone.dart:1005:7)e[39;49m
e[38;5;244mE/flutter (28043): #21 _invoke1 (dart:ui/hooks.dart:267:10)e[39;49m
e[38;5;244mE/flutter (28043): #22 _dispatchPointerDataPacket (dart:ui/hooks.dart:176:5)e[39;49m
E/flutter (28043):
gazal
Agosto 15, 2020, 6:53pm
3
Rodei o projeto do GitHub do livro e funcinou.