常用 Web 库和 package
The Dart SDK contains dart:html and other librariesthat provide low-level web APIs.You can supplement or replace these APIs usingweb packages,such as those in the AngularDart framework.
SDK libraries
The Dart SDK contains dart:html and other librariesthat provide low-level web APIs.
- Low-level web tutorials
- An overview of DOM, CSS, and HTML concepts, with information onhow to include a Dart script in an HTML page andhow to add and remove elements from a web page.These tutorials feature interactive examples inDartPad.
- The dart:html section of the library tour
- An example-driven tour of using the dart:html library.Topics include manipulating the DOM programmatically,making HTTP requests, and using WebSockets.
- dart:html API reference
- Complete reference documentation for the dart:html library.
Web packages
Many packages support web development with Dart. Hereare a few:
Library | Packages | Notes |
---|---|---|
AngularDart | angular* | Useful for complex apps that support features such as event handling and dependency injection. More info: AngularDart documentation,AngularDart Components |
JavaScript interop | js | Support for calling JavaScript libraries from Dart code. More info: JavaScript interoperability |
Material Design | md_core,m4d_components | Basic Material Design components. |
React | react | Bindings for the ReactJS library. |
Vue | vue | Bindings for the Vue.js library. |
To find more libraries that support writing web apps, search forweb packages.
Also see the FAQ.