CSSInjection constructor

CSSInjection({
  1. required InjectionTarget target,
  2. String? css,
  3. List<String>? files,
  4. StyleOrigin? origin,
})

Implementation

CSSInjection({
  /// Details specifying the target into which to insert the CSS.
  required InjectionTarget target,

  /// A string containing the CSS to inject.
  /// Exactly one of `files` and `css` must be
  /// specified.
  String? css,

  /// The path of the CSS files to inject, relative to the extension's root
  /// directory.
  /// Exactly one of `files` and `css` must be
  /// specified.
  List<String>? files,

  /// The style origin for the injection. Defaults to `'AUTHOR'`.
  StyleOrigin? origin,
}) : _wrapped = $js.CSSInjection(
        target: target.toJS,
        css: css,
        files: files?.toJSArray((e) => e),
        origin: origin?.toJS,
      );