onFileConverted method

Stream<Event<FilePresentationServiceEventNames, FileConverted>> onFileConverted()

Returns a Stream of the FilePresentationServiceEventNames.fileConverted events. By subscribing to the returned stream you will be notified about finished file conversions.

Implementation

Stream<Event<FilePresentationServiceEventNames, FileConverted>>
    onFileConverted() {
  return _nativeEventsReceiver.addListener(
      [FilePresentationServiceEventNames.fileConverted]).map((map) {
    final event = map as Map<Object?, Object?>;
    final key =
        FilePresentationServiceEventNames.valueOf(event["key"] as String);
    final data = event["body"] as Map<Object?, Object?>;
    return Event(key, FileConvertedMapper.fromMap(data));
  });
}