StacWebView constructor

const StacWebView({
  1. required String url,
  2. @Default(JavaScriptMode.unrestricted) JavaScriptMode javaScriptMode,
  3. @Default("#FFFFFF") String backgroundColor,
  4. String? userAgent,
  5. @Default(false) bool enableZoom,
  6. @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;