This library contains functions for generating HTML content. There are two
libraries that you can import. One for server-side HTML generation:
htgen/static.dart, and one for dynamic HTML generation:
The static generation is basically a function that returns an XML string. Its
nothing more than a mirrors based hack that allows you to write your HTML nodes
as a set of nested functions returned by a Dart function instead of using HTML
templates. The dynamic generation does not use mirrors, but instead are mostly
shortcuts for creating DOM nodes and assigning attributes and children to them.
Add this to your package's pubspec.yaml file:
dependencies: htgen: ^0.0.2+1
You can install packages from the command line:
$ pub get
Alternatively, your editor might support
Check the docs for your editor to learn more.
Now in your Dart code, you can use:
import 'package:htgen/dynamic.dart'; import 'package:htgen/static.dart';
|0.0.2+1||Nov 7, 2017|
|0.0.2||Nov 7, 2017|
|0.0.1+1||Oct 9, 2017|
|0.0.1||May 15, 2017|
Describes how popular the package is relative to other packages. [more]
Code health derived from static analysis. [more]
Reflects how tidy and up-to-date the package is. [more]
Weighted score of the above. [more]
The package version is not analyzed, because it does not support Dart 2. Until this is resolved, the package will receive a health and maintenance score of 0.
Support Dart 2 in
The SDK constraint in
pubspec.yaml doesn't allow the Dart 2.0.0 release. For information about upgrading it to be Dart 2 compatible, please see https://www.dartlang.org/dart-2#migration.
|Dart SDK||>=1.8.0 <2.0.0|