runSegmentationOnFrame method Null safety

Future<Uint8List?> runSegmentationOnFrame(
  1. {required List<Uint8List> bytesList,
  2. int imageHeight = 1280,
  3. int imageWidth = 720,
  4. double imageMean = 0,
  5. double imageStd = 255.0,
  6. int rotation = 90,
  7. List<int>? labelColors,
  8. String outputType = "png",
  9. bool asynch = true}
)

Implementation

static Future<Uint8List?> runSegmentationOnFrame(
    {required List<Uint8List> bytesList,
    int imageHeight = 1280,
    int imageWidth = 720,
    double imageMean = 0,
    double imageStd = 255.0,
    int rotation: 90, // Android only
    List<int>? labelColors,
    String outputType = "png",
    bool asynch = true}) async {
  return await _channel.invokeMethod(
    'runSegmentationOnFrame',
    {
      "bytesList": bytesList,
      "imageHeight": imageHeight,
      "imageWidth": imageWidth,
      "imageMean": imageMean,
      "imageStd": imageStd,
      "rotation": rotation,
      "labelColors": labelColors ?? pascalVOCLabelColors,
      "outputType": outputType,
      "asynch": asynch,
    },
  );
}