report static method
      
EventHandler?
report({ 
    
- required int prepareId,
- required int categId,
- String description = '',
- Uint8List? snapshot,
- ImageFileFormat? format,
- ParameterList? params,
- void onComplete(- GemError error
 
Reports a social event.
Parameters
- IN prepareId Prepared report operation ID (returned by a call to prepareReporting).
- IN categId Report category ID.
- IN description Report description text.
- IN snapshot Report snapshot image.
- IN format Report snapshot image format.
- IN params Report parameters. They must follow the structure returned by
SocialReportsOverlayCategory.parameters.find(PredefinedOverlayGenericParametersIds.keyVals).
- IN onComplete Callback to be called when the request is completed with the error code:
- GemError.invalidInput - categId is not a valid social report category ID / params are ill-formed / snapshot is an invalid image.
- GemError.suspended - Report rate limit exceeded.
- GemError.expired - Prepared report ID not found or is expired (too old).
- GemError.notFound - No accurate sense data source position to complete.
- GemError.success - Report submitted successfully.
 
Returns
- The operation progress listener if the operation could be started, null otherwise.
Implementation
static EventHandler? report({
  required final int prepareId,
  required final int categId,
  final String description = '',
  final Uint8List? snapshot,
  final ImageFileFormat? format,
  final ParameterList? params,
  final void Function(GemError error)? onComplete,
}) {
  if ((snapshot == null) != (format == null)) {
    onComplete?.call(GemError.invalidInput);
    return null;
  }
  dynamic gemImage;
  if (snapshot != null) {
    gemImage = GemKitPlatform.instance.createGemImage(snapshot, format!.id);
  }
  try {
    final EventDrivenProgressListener progListener =
        EventDrivenProgressListener();
    GemKitPlatform.instance.registerEventHandler(
      progListener.id,
      progListener,
    );
    progListener.registerOnCompleteWithData((final int err, _, _) {
      GemKitPlatform.instance.unregisterEventHandler(progListener.id);
      onComplete?.call(GemErrorExtension.fromCode(err));
    });
    final OperationResult result = staticMethod(
      'SocialOverlay',
      'report',
      args: <String, dynamic>{
        'prepareId': prepareId,
        'categId': categId,
        'description': description,
        'snapshot': gemImage ?? 0,
        'params': params != null ? params.pointerId : 0,
        'listener': progListener.id,
      },
    );
    final int id = result['result'];
    final GemError error = GemErrorExtension.fromCode(id);
    if (error != GemError.scheduled) {
      GemKitPlatform.instance.unregisterEventHandler(progListener.id);
      onComplete?.call(error);
      return null;
    }
    return progListener;
  } finally {
    if (gemImage != null) {
      GemKitPlatform.instance.deleteCPointer(gemImage);
    }
  }
}