Skip to content

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

License

Notifications You must be signed in to change notification settings

apaolino/native_screenshot_widget

 
 

Repository files navigation

native_screenshot_widget

pub package | pub points | popularity

Using

//PlatformView: e.g: WebView
final screenshotController = NativeScreenshotController();

NativeScreenshot(
controller: screenshotController,
child: WebViewWidget(
controller: WebViewController()
..loadRequest(Uri.parse('https://flutter.dev')),
),
);


//take screenshot:
final imageBytes = await screenshotController.takeScreenshot();
//Flutter Widget
final screenshotController = NativeScreenshotController();

NativeScreenshot(
controller: screenshotController,
child: Text(
"Flutter Widget",
style: Theme.of(context).textTheme.titleLarge,
),
),
//take screenshot:
final imageBytes = await screenshotController.takeScreenshot();

About

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

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Dart 38.0%
  • Objective-C 26.7%
  • Java 26.4%
  • Ruby 8.9%