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

kecson/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

Packages

No packages published