dart_browser_loader 0.0.6+1

Dart js
Flutter web

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.

0
likes
80
pub points
79%
popularity

Publisher

lefty.io

A starting point for Dart libraries or applications.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (LICENSE)

More

Packages that depend on dart_browser_loader