ff_native_screenshot 0.0.1 copy "ff_native_screenshot: ^0.0.1" to clipboard
ff_native_screenshot: ^0.0.1 copied to clipboard

outdated

A Flutter plugin to take or listen screenshot(support Platform Views) for Android and iOS with native code.

ff_native_screenshot #

A Flutter plugin to take or listen screenshot(support Platform Views) for Android and iOS with native code.

It's a workaround for the issue RepaintBoundary can't take screenshot of Platform Views .

pub package GitHub stars GitHub forks GitHub license GitHub issues flutter-candies

Usage #

dependencies:
  ff_native_screenshot: any

Take Screenshot #

Uint8List? data = await FfNativeScreenshot().takeScreenshot();

Listen Screenshot #


  @override
  void initState() {
    super.initState();
    FfNativeScreenshot().setup(NativeScreenshotApiImplements());
    FfNativeScreenshot().startListeningScreenshot();
  }

  @override
  void dispose() {
    FfNativeScreenshot().stopListeningScreenshot();
    super.dispose();
  }

  class NativeScreenshotApiImplements extends NativeScreenshotApi {
    NativeScreenshotApiImplements();
    @override
    Future<void> onTakeScreenshot(Uint8List? data) async {
     // if it has something error
     // you can call takeScreenshot 
     data ??= await FfNativeScreenshot().takeScreenshot();
    }
  }

12
likes
0
points
2.4k
downloads

Publisher

verified publisherfluttercandies.com

Weekly Downloads

A Flutter plugin to take or listen screenshot(support Platform Views) for Android and iOS with native code.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

flutter

More

Packages that depend on ff_native_screenshot