flutter late initialize error in object detection using flutter tflite from tensorflow

38 Views Asked by At

when i implemented example frok flutter tflite text classification example i got this error when classifying text

The following LateError was thrown while handling a gesture: LateInitializationError: Field '_dict@277468318' has not been initialized.

When the exception was thrown, this was the stack: 
#0      Classifier._dict (package:tflite_flutter_plugin_example/classifier.dart)
#1      Classifier.tokenizeInputText (package:tflite_flutter_plugin_example/classifier.dart:106:49)
#2      Classifier.classify (package:tflite_flutter_plugin_example/classifier.dart:89:32)
#3      _MyAppState.build.<anonymous closure> (package:tflite_flutter_plugin_example/main.dart:77:56)
#4      _InkResponseState.handleTap (package:flutter/src/material/ink_well.dart:1154:21)
#5      GestureRecognizer.invokeCallback (package:flutter/src/gestures/recognizer.dart:275:24)
#6      TapGestureRecognizer.handleTapUp (package:flutter/src/gestures/tap.dart:654:11)
#7      BaseTapGestureRecognizer._checkUp (package:flutter/src/gestures/tap.dart:311:5)
#8      BaseTapGestureRecognizer.handlePrimaryPointer (package:flutter/src/gestures/tap.dart:244:7)
#9      PrimaryPointerGestureRecognizer.handleEvent (package:flutter/src/gestures/recognizer.dart:630:9)
#10     PointerRouter._dispatch (package:flutter/src/gestures/pointer_router.dart:98:12)
#11     PointerRouter._dispatchEventToRoutes.<anonymous closure> (package:flutter/src/gestures/pointer_router.dart:143:9)
#12     _LinkedHashMapMixin.forEach (dart:collection-patch/compact_hash.dart:625:13)
#13     PointerRouter._dispatchEventToRoutes (package:flutter/src/gestures/pointer_router.dart:141:18)
#14     PointerRouter.route (package:flutter/src/gestures/pointer_router.dart:127:7)
#15     GestureBinding.handleEvent (package:flutter/src/gestures/binding.dart:465:19)
#16     GestureBinding.dispatchEvent (package:flutter/src/gestures/binding.dart:445:22)
#17     RendererBinding.dispatchEvent (package:flutter/src/rendering/binding.dart:331:11)
#18     GestureBinding._handlePointerEventImmediately (package:flutter/src/gestures/binding.dart:400:7)
#19     GestureBinding.handlePointerEvent (package:flutter/src/gestures/binding.dart:363:5)
#20     GestureBinding._flushPointerEventQueue (package:flutter/src/gestures/binding.dart:320:7)
#21     GestureBinding._handlePointerDataPacket (package:flutter/src/gestures/binding.dart:293:9)
#22     _invoke1 (dart:ui/hooks.dart:158:13)
#23     PlatformDispatcher._dispatchPointerDataPacket (dart:ui/platform_dispatcher.dart:382:7)
#24     _dispatchPointerDataPacket (dart:ui/hooks.dart:91:31)
Handler: "onTap"
Recognizer: TapGestureRecognizer#3e095
  debugOwner: GestureDetector
  state: possible
  won arena
  finalPosition: Offset(332.0, 488.7)
  finalLocalPosition: Offset(19.3, 24.4)
  button: 1
  sent tap down
0

There are 0 best solutions below