dart_browser_loader 0.0.6-nullsafety.0 copy "dart_browser_loader: ^0.0.6-nullsafety.0" to clipboard
dart_browser_loader: ^0.0.6-nullsafety.0 copied to clipboard

outdated

A starting point for Dart libraries or applications.

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.

3
likes
0
points
2.61k
downloads

Publisher

verified publisherlefty.io

Weekly Downloads

A starting point for Dart libraries or applications.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

pedantic

More

Packages that depend on dart_browser_loader