dart_browser_loader 1.0.0 icon indicating copy to clipboard operation
dart_browser_loader: ^1.0.0 copied to clipboard

Platformweb

A starting point for Dart libraries or applications.

Dart

dart_browser_loader #

Import Javascript/Css... using Dart

await loadScript("https://code.jquery.com/jquery-3.2.1.min.js");
await loadLink("https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta.2/css/bootstrap.min.css");
await loadInlineStyle('''
  body {
    color: red;
  }
  ''');

It will add following element to dom.

<script type="text/javascript" async="" src="https://code.jquery.com/jquery-3.2.1.min.js"></script>
<link type="text/css" rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta.2/css/bootstrap.min.css">
<style>  body {
    color: red;
  }
 </style>

All function return future with element when link is valid or throw an error when invalid.

1
likes
120
pub points
69%
popularity

Publisher

verified publisher iconlefty.io

A starting point for Dart libraries or applications.

Homepage

Documentation

API reference

License

Icon for licenses.MIT (LICENSE)

More

Packages that depend on dart_browser_loader