dart web

$dart create -h
Create a new Dart project.

Usage: dart create [arguments] 
-h, --help                       Print this usage information.
-t, --template                   The project template to use.

          [console] (default)    A command-line application.
          [package]              A package containing shared Dart libraries.
          [server-shelf]         A server app using package:shelf.
          [web]                  A web app that uses only core Dart libraries.

    --[no-]pub                   Whether to run 'pub get' after the project has
                                 been created.
                                 (defaults to on)
    --force                      Force project generation, even if the target
                                 directory already exists.

Run "dart help" to see global options.

新建

 dart create --template=web web-simple
Creating web_simple using template web...

  .gitignore
  analysis_options.yaml
  CHANGELOG.md
  pubspec.yaml
  README.md
  web/index.html
  web/main.dart
  web/styles.css

Running pub get...                     5.3s
  Resolving dependencies...
  Changed 59 dependencies!

Created project web_simple in web-simple! In order to get started, run the following commands:

  cd web-simple
  dart pub global activate webdev
  webdev serve

Dart Web应用及常用语法

你可能感兴趣的:(dart web)