initialSize property
- @SupportedPlatforms.new(platforms: [AndroidPlatform(note: '`Size` width and height values will be converted to `int` values because they cannot have `double` values.'), IOSPlatform(), MacOSPlatform(), WebPlatform(requiresSameOrigin: false), WindowsPlatform(), LinuxPlatform()])
final
The WebView initial size in pixels.
Set -1 to match the corresponding width or height of the current device screen size.
Size(-1, -1) will match both width and height of the current device screen size.
Officially Supported Platforms/Implementations:
- Android WebView:
Sizewidth and height values will be converted tointvalues because they cannot havedoublevalues.
- iOS WKWebView
- macOS WKWebView
- Web <iframe>
- Windows WebView2
- Linux WPE WebKit
Use the PlatformHeadlessInAppWebViewCreationParams.isPropertySupported method to check if this property is supported at runtime.
Implementation
@SupportedPlatforms(
platforms: [
AndroidPlatform(
note:
'`Size` width and height values will be converted to `int` values because they cannot have `double` values.',
),
IOSPlatform(),
MacOSPlatform(),
WebPlatform(requiresSameOrigin: false),
WindowsPlatform(),
LinuxPlatform(),
],
)
final Size initialSize;