addComment static method
- required OverlayItem item,
- required String comment,
Add a comment to report.
Parameters
- IN item The report overlay item
- IN comment The comment
Returns
- GemError.invalidInput - invalid item ( not a social report overlay item ) or item is not a result of alarm notification
- GemError.connectionRequired - no internet connection available
- GemError.busy - another add comment operation is in progress
Throws
- An exception if it fails.
Implementation
static GemError addComment({
required final OverlayItem item,
required final String comment,
}) {
final EventDrivenProgressListener progListener =
EventDrivenProgressListener();
GemKitPlatform.instance.registerEventHandler(progListener.id, progListener);
final OperationResult result = staticMethod(
'SocialOverlay',
'addComment',
args: <String, dynamic>{
'item': item.pointerId,
'comment': comment,
'listener': progListener.id,
},
);
return GemErrorExtension.fromCode(result['result']);
}