nuts 2.1.4

  • Installing
  • Versions
  • 43


Nuts and bolts for building cross-platform UI (HTML, Flutter, CLI) using Dart. Also screw frameworks (React, Vue, Angular).


class Counter implements Component {
  String key;

  int count = 0;

  View makeView() {
    Box ret;
    ret = Box(children: [
      TextField('Count: $count', key: 'info'),
      HBox(children: [
            text: 'Increment',
            onClick: () {
              ret.getByKey<TextField>('info').text = 'Count: ${++count}';
            text: 'Decrement',
            onClick: () {
              ret.getByKey<TextField>('info').text = 'Count: ${--count}';
    return ret;

void main() {


  • Initial version, created by Stagehand

Use this package as a library

1. Depend on it

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

  nuts: ^2.1.4

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:nuts/nuts.dart';
Version Uploaded Documentation Archive
2.1.4 Sep 10, 2018 Go to the documentation of nuts 2.1.4 Download nuts 2.1.4 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 Jan 15, 2019, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.1.0
  • pana: 0.12.10


Detected platforms: web

Primary library: package:nuts/nuts.dart with components: html.

Health issues and suggestions

Document public APIs. (-0.78 points)

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

Fix lib/html_renderer/html_renderer.dart. (-14.82 points)

Analysis of lib/html_renderer/html_renderer.dart reported 32 hints, including:

line 95 col 9: The value of the local variable 'minHeightSub' isn't used.

line 95 col 9: Cancel instances of dart.async.StreamSubscription.

line 100 col 9: The value of the local variable 'maxHeightSub' isn't used.

line 100 col 9: Cancel instances of dart.async.StreamSubscription.

line 104 col 9: The value of the local variable 'bgColorSub' isn't used.

Format lib/view/view.dart.

Run dartfmt to format lib/view/view.dart.

Maintenance suggestions

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 nuts.dart.


Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.0.0-dev.65.0 <3.0.0
collection ^1.14.10 1.14.11
observable_ish ^2.1.4 2.1.4
Dev dependencies
build_runner ^0.9.0
build_web_compilers ^0.4.0