detectObjectOnFrame method Null safety

Future<List?> detectObjectOnFrame(
  1. {required List<Uint8List> bytesList,
  2. String model = "SSDMobileNet",
  3. int imageHeight = 1280,
  4. int imageWidth = 720,
  5. double imageMean = 127.5,
  6. double imageStd = 127.5,
  7. double threshold = 0.1,
  8. int numResultsPerClass = 5,
  9. int rotation = 90,
  10. List anchors = anchors,
  11. int blockSize = 32,
  12. int numBoxesPerBlock = 5,
  13. bool asynch = true}
)

Implementation

static Future<List?> detectObjectOnFrame({
  required List<Uint8List> bytesList,
  String model = "SSDMobileNet",
  int imageHeight = 1280,
  int imageWidth = 720,
  double imageMean = 127.5,
  double imageStd = 127.5,
  double threshold = 0.1,
  int numResultsPerClass = 5,
  int rotation: 90, // Android only
  // Used in YOLO only
  List anchors = anchors,
  int blockSize = 32,
  int numBoxesPerBlock = 5,
  bool asynch = true,
}) async {
  return await _channel.invokeMethod(
    'detectObjectOnFrame',
    {
      "bytesList": bytesList,
      "model": model,
      "imageHeight": imageHeight,
      "imageWidth": imageWidth,
      "imageMean": imageMean,
      "imageStd": imageStd,
      "rotation": rotation,
      "threshold": threshold,
      "numResultsPerClass": numResultsPerClass,
      "anchors": anchors,
      "blockSize": blockSize,
      "numBoxesPerBlock": numBoxesPerBlock,
      "asynch": asynch,
    },
  );
}