screenshotStream property
Stream to screenshot activities ScreenshotSnapshot
This stream will emit a ScreenshotSnapshot whenever a screenshot is taken.
The ScreenshotSnapshot contains the path to the screenshot file.
throw UnmimplementedError if not implement
Implementation
@override
Stream<ScreenshotSnapshot> get screenshotStream {
_cachedStream ??= eventChannel.receiveBroadcastStream().map(
(event) =>
ScreenshotSnapshot.fromMap(jsonDecode(event) as Map<String, dynamic>),
);
return _cachedStream!;
}