ScriptHtmlTagAttributes constructor

ScriptHtmlTagAttributes({
  1. String type = "text/javascript",
  2. String? id,
  3. bool? async,
  4. bool? defer,
  5. CrossOrigin? crossOrigin,
  6. String? integrity,
  7. bool? noModule,
  8. String? nonce,
  9. ReferrerPolicy? referrerPolicy,
  10. Function? onLoad,
  11. Function? onError,
})

Implementation

ScriptHtmlTagAttributes(
    {this.type = "text/javascript",
    this.id,
    this.async,
    this.defer,
    this.crossOrigin,
    this.integrity,
    this.noModule,
    this.nonce,
    this.referrerPolicy,
    this.onLoad,
    this.onError}) {
  if (this.onLoad != null || this.onError != null) {
    assert(this.id != null,
        'onLoad and onError callbacks require the id property to be set.');
  }
}