zoomBy method
- required double zoomFactor,
- @Deprecated('Use animated instead') bool? iosAnimated,
- bool animated = false,
Performs a zoom operation in this WebView.
zoomFactor represents the zoom factor to apply. On Android, the zoom factor will be clamped to the Webview's zoom limits and, also, this value must be in the range 0.01 (excluded) to 100.0 (included).
animated true to animate the transition to the new scale, false to make the transition immediate.
Officially Supported Platforms/Implementations:
- Android WebView 21+ (Official API - WebView.zoomBy)
- iOS WKWebView (Official API - UIScrollView.setZoomScale)
- Linux WPE WebKit (Official API - webkit_web_view_set_zoom_level)
Parameters - Officially Supported Platforms/Implementations:
zoomFactor: all platformsanimated:- iOS WKWebView
Use the PlatformInAppWebViewController.isMethodSupported method to check if this method is supported at runtime.
Implementation
Future<void> zoomBy({
required double zoomFactor,
@Deprecated('Use animated instead') bool? iosAnimated,
bool animated = false,
}) => platform.zoomBy(
zoomFactor: zoomFactor,
iosAnimated: iosAnimated,
animated: animated,
);