reportAnIssue method

Future<void> reportAnIssue({
  1. String? apiKey,
  2. String? token,
  3. required ModelClass modelClass,
  4. required ModelSize modelSize,
  5. required String report,
  6. Map<String, dynamic>? customData,
  7. String? base64ImageToReportOn,
})

Implementation

Future<void> reportAnIssue(
    {String? apiKey,
    String? token,
    required ModelClass modelClass,
    required ModelSize modelSize,
    required String report,
    Map<String, dynamic>? customData,
    String? base64ImageToReportOn}) async {
  await _channel.invokeMethod('reportIssue', {
    'apiKey': apiKey,
    'token': token,
    'modelClass': switch (modelClass) {
      ModelClass.shippingLabel => 1,
      ModelClass.billOfLading => 2,
      ModelClass.itemLabel => 3,
      ModelClass.documentClassification => 4,
    },
    'modelSize': switch (modelSize) {
      ModelSize.nano => 1,
      ModelSize.micro => 2,
      ModelSize.small => 3,
      ModelSize.medium => 4,
      ModelSize.large => 5,
      ModelSize.xlarge => 6,
    },
    'report': report,
    'customData': customData,
    'base64ImageToReportOn': base64ImageToReportOn
  });
}