vue 0.4.1

  • Installing
  • Versions
  • 76


VueDart lets you create Vue web apps using Dart.

Website and documentation


What works:

  • App and component definitions.
  • Templates.
  • Data.
  • Properties.
  • Computed data.
  • Methods.
  • Refs.
  • Lifecycle callbacks.
  • Mixins.
  • vue-router.
  • Scoped styles.

What doesn't work:

  • Render functions (or at least, they don't work well).
  • Some of the instance properties.
  • Server-side rendering.
  • Hardcoded support for the Vuex plugin.
  • Generic plugin support (this is going to take a while though).

Based on the official Vue logo. I basically just changed the color.


  • Upgrade packages to work under Dart 2.1.


  • Dart 2.0 is now supported!
  • BREAKING CHANGE vue2 and vue2_cli have been renamed to vue and vue_cli, respectively.
  • BREAKING CHANGE package:build is now used instead of Pub transformers. Using Pub is no longer supported.
  • BREAKING CHANGE Components are never globally registered. Instead, they must explicitly be passed to the VueComponent annotation.
  • BREAKING CHANGE A new, extensible VueAppOptions API has been added for passing miscellaneous options to app constructors, and the specialized router argument has been dropped in favor of options.
  • BREAKING CHANGE Mixins no longer have to be explicitly passed to the mixins: argument. Instead, VueDart will automatically find mixins in your class's with clause.
  • BREAKING CHANGE Mixins must now all have an implements VueMixinRequirements clause. This also means that they have access to pretty much the entire component/app API out-of-the-box.
  • BREAKING CHANGE The overridable lifecycle methods now all have a lifecycle prefix, e.g. void mounted became void lifecycleMounted.
  • BREAKING CHANGE The constructor boilerplate has all been dropped! No more Component(context) => super(context) or factory App(context) => ....
  • BREAKING CHANGE As a side-effect of the above, it is now prohibited to access anything Vue-related in your constructors. To be precise, constructors can no longer be used as a substitute for the created lifecycle hook. Instead, override the new void lifecycleCreated() method.
  • BREAKING CHANGE The event API has been overhauled. Instead of the vanilla Vue-style $on and $emit API, it's now built around Dart-native streams and sinks. The result is far more type-safe than before. The old functions have been removed.
  • BREAKING CHANGE bool props now create a boolean prop, instead of a prop that's either null or an empty string. (This is mostly a bugfix.)
  • BREAKING CHANGE The vue_router plugin now requires you pass components like Component() instead of #Component.
  • You can now use Sass in your styles!! Just set lang="sass" or lang="scss" on your <style scoped> tags.
  • Mixins are now supported on a VueApp.
  • Models are supported via @model([event: '...']).
  • Fix methods that take optional arguments under Dart 2.0.


  • Fix #13: internal symbols were duplicated when using part with component files.
  • Merged #12: fixed typos in documentation.
  • Merged #16: check window.Vue to make sure it's been defined.


  • Upgrade scopify to 0.2.0.
  • BREAKING CHANGE Due to the above upgrade, scoped styles no longer "bleed" into child elements. This behavior can still be manually re-enabled via the bleeds option to the style element. (AFAIK no one actually really used this, so it's not really a big change.)


  • BREAKING CHANGE Require explicit declaration of entry points.
  • BREAKING CHANGE The VueComponent annotation now requires the name to be in a named argument (e.g. @VueComponent(name: 'foo'), instead of @VueComponent('foo')). This was necessary to support unnamed components.
  • Added the VueDart CLI.
  • Proper error messages.
  • Add VueMaterial 0.7 support.
  • Add vue-router support.
  • Avoid needlessly rewriting HTML source files by switching from html package's DOM manipulation to using Dart's refactoring libraries.
  • Change all vue.js script tags to vue.min.js when in release mode, not just unpkg ones.
  • Implement support for mixins (for components only for now).
  • Implement scoped styles.
  • Implement watchers.
  • Add support for more instance methods: $data, $props, $el, $options, $parent, $root, $on, $once, $off, $emit, $nextTick, $forceUpdate, and $destroy.
  • Add VueConfig and VueConfig.ignoredElements.


  • Remove need for explicit initialize transformer usage.
  • Upgrade initialize dependency for strong mode/DDC support.


  • Initial.

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:

  vue: ^0.4.1

2. Install it

You can install packages from the command line:

with pub:

$ pub get

Alternatively, your editor might support pub get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:

import 'package:vue/vue.dart';
Version Uploaded Documentation Archive
0.4.1 Nov 23, 2018 Go to the documentation of vue 0.4.1 Download vue 0.4.1 archive
0.4.0 Oct 10, 2018 Go to the documentation of vue 0.4.0 Download vue 0.4.0 archive
0.1.1 May 17, 2015 Go to the documentation of vue 0.1.1 Download vue 0.1.1 archive
0.1.0 May 13, 2015 Go to the documentation of vue 0.1.0 Download vue 0.1.0 archive
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]
Learn more about scoring.

We analyzed this package on Dec 5, 2018, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.1.0
  • pana: 0.12.7


Detected platforms: web

Primary library: package:vue/vue.dart with components: html, js.

Health issues and suggestions

Document public APIs (-10 points)

335 out of 335 API elements (library, class, field or method) have no adequate dartdoc content. Good documentation improves code readability and discoverability through search.

Fix lib/vue.dart. (-1 points)

Analysis of lib/vue.dart reported 2 hints:

line 542 col 7: Name types using UpperCamelCase.

line 548 col 7: Name types using UpperCamelCase.

Fix lib/builders.dart. (-0.50 points)

Analysis of lib/builders.dart reported 1 hint:

line 304 col 53: 'kind' is deprecated and shouldn't be used.

Format lib/plugins/vue_router.dart.

Run dartfmt to format lib/plugins/vue_router.dart.

Format lib/plugins/vuematerial_legacy.dart.

Run dartfmt to format lib/plugins/vuematerial_legacy.dart.

Maintenance suggestions

The description is too short. (-20 points)

Add more detail about the package, what it does and what is its target use case. Try to write at least 60 characters.

Maintain an example. (-10 points)

Create a short demo in the example/ directory to show how to use this package. Common file name patterns include: main.dart, example.dart or you could also use vue.dart.


Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.0.0 <3.0.0
analyzer ^0.32.2 0.32.6 0.34.0
async ^2.0.7 2.0.8
build ^1.0.1 1.0.1
csslib ^0.14.4 0.14.6
html ^0.13.3 0.13.3+3
js ^0.6.1 0.6.1+1
sass ^1.8.0 1.15.1
sass_builder ^2.1.0 2.1.2
scopify ^0.2.1 0.2.2
source_maps ^0.10.6 0.10.8
source_span ^1.4.0 1.4.1
uuid ^1.0.0 1.0.3
Transitive dependencies
args 1.5.1
build_config 0.3.1+4
charcode 1.1.2
cli_repl 0.2.0+1
collection 1.14.11
convert 2.0.2
crypto 2.0.6
front_end 0.1.4+2 0.1.7
glob 1.1.7
http 0.12.0
http_parser 3.1.3
json_annotation 2.0.0
kernel 0.3.4+2 0.3.7
logging 0.11.3+2
matcher 0.12.4
meta 1.1.6
package_config 1.0.5
package_resolver 1.0.6
path 1.6.2
plugin 0.2.0+3
pub_semver 1.4.2
pubspec_parse 0.1.2+3
quiver 2.0.1
stack_trace 1.9.3
stream_transform 0.0.14+1
string_scanner 1.0.4
tuple 1.0.2
typed_data 1.1.6
utf 0.9.0+5
watcher 0.9.7+10
yaml 2.1.15