Jaden Lorenc
Jaden Lorenc

Reputation: 384

What's the difference between dart:html vs package:html in dart?

I'm attempting to create an epub document creator in flutter, and thus need to have something that programmatically builds xhtml files. I'm not sure which library to start with, here, nor what their different purposes are.

Upvotes: 1

Views: 524

Answers (1)

jamesdlin
jamesdlin

Reputation: 89995

From the dart:html documentation:

HTML elements and other resources for web-based applications that need to interact with the browser and the DOM (Document Object Model).

From the package:html package description:

APIs for parsing and manipulating HTML content outside the browser.

In other words, dart:html is used for Dart for the web to interact with a web browser. package:html is an HTML parser without a web browser.

Upvotes: 4

Related Questions