ScreenshotController class

Cannot capture Platformview due to issue https://github.com/flutter/flutter/issues/25306

Constructors

ScreenshotController()

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

capture({double? pixelRatio, Duration delay = const Duration(milliseconds: 20)}) Future<Uint8List?>
captureAndSave(String directory, {String? fileName, double? pixelRatio, Duration delay = const Duration(milliseconds: 20)}) Future<String?>
Captures image and saves to given path
captureAsUiImage({double? pixelRatio = 1, Duration delay = const Duration(milliseconds: 20)}) Future<Image?>
captureFromWidget(Widget widget, {Duration delay = const Duration(seconds: 1), double? pixelRatio, BuildContext? context, Size? targetSize}) Future<Uint8List>
Value for delay should increase with widget tree size. Prefered value is 1 seconds
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Methods

widgetToUiImage(Widget widget, {Duration delay = const Duration(seconds: 1), double? pixelRatio, BuildContext? context, Size? targetSize}) Future<Image>