script static method

HeadTag script({
  1. String? src,
  2. String? content,
  3. bool defer = false,
  4. bool async = false,
  5. Map<String, Object?> props = const {},
})

Creates a script head tag descriptor.

Implementation

static HeadTag script({
  String? src,
  String? content,
  bool defer = false,
  bool async = false,
  Map<String, Object?> props = const {},
}) {
  return HeadTag(
    'script',
    props: {
      ...props,
      if (src != null) 'src': src,
      if (defer) 'defer': true,
      if (async) 'async': true,
    },
    content: content,
  );
}