INNER CODE UNIT · Dart
ScreenshotController
SachinGanesh/screenshot · lib/screenshot.dart:19
class ScreenshotController {
late GlobalKey _containerKey;
ScreenshotController() {
_containerKey = GlobalKey();
}
/// Captures image and saves to given path
Future<String?> captureAndSave(
String directory, {
String? fileName,
double? pixelRatio,
Duration delay = const Duration(milliseconds: 20),
}) async {
Uint8List? content = await capture(
pixelRatio: pixelRatio,
delay: delay,
);