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

PlatformAndroidiOS
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(ScreenshotFlutterApiImplements());
    FfNativeScreenshot().startListeningScreenshot();
  }

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

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

12
likes
150
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)

Documentation

API reference

License

MIT (license)

Dependencies

flutter

More

Packages that depend on ff_native_screenshot