detect method
Run detection on an image file.
Implementation
@override
Future<List<DetectionResult>> detect({required String imagePath}) async {
final result = await methodChannel.invokeMethod<List<dynamic>>('detect', {'imagePath': imagePath});
if (result == null) return [];
return result.map((e) => DetectionResult.fromMap(e as Map<dynamic, dynamic>)).toList();
}