Custom YOLOV8 model, exported to tflite not working in flutter application

I trained a custom YOLOv8 model and then exported it as tflite model using the below code.

I then used the instructions under Adding metadata to TensorFlow Lite models to attach metadata into the tflite model. I then tried to use the tflite model in my flutter application for object detection but unfortunately, I am getting the below error.

The article Menambahkan metadata ke model TensorFlow Lite does talk about output metadata but I am not sure how to use it to mitigate the error message “Failed to initialize detector. Mismatch between number of output tensors (2) and output tensors metadata (1).” any help is appreciated!