StacWebView constructor
const
StacWebView({
- required String url,
- @Default(JavaScriptMode.unrestricted) JavaScriptMode javaScriptMode,
- @Default("#FFFFFF") String backgroundColor,
- String? userAgent,
- @Default(false) bool enableZoom,
- @Default(TextDirection.ltr) TextDirection layoutDirection,
StacWebView
constructor.
Implementation
const factory StacWebView({
/// The URL to load in the `WebView`.
required String url,
/// Sets whether JavaScript execution is enabled.
///
/// Default value is `JavaScriptMode.unrestricted`.
@Default(JavaScriptMode.unrestricted) JavaScriptMode javaScriptMode,
/// Background color of the `WebView`.
///
/// Default value is `#FFFFFF`.
@Default("#FFFFFF") String backgroundColor,
/// The user agent for the `WebView`.
String? userAgent,
/// Sets whether zoom is enabled for the `WebView`.
///
/// Default value is `false`.
@Default(false) bool enableZoom,
/// The layout direction for the `WebView`.
///
/// Default value is `TextDirection.ltr`.
@Default(TextDirection.ltr) TextDirection layoutDirection,
}) = _StacWebView;