nuts 2.1.4

  • README.md
  • CHANGELOG.md
  • Installing
  • Versions
  • 46

nuts

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

Example

class Counter implements Component {
  @override
  String key;

  int count = 0;

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

void main() {
  querySelector('#output').append(defaultRenderers.render(Counter()));
}

1.0.0

  • Initial version, created by Stagehand

Use this package as a library

1. Depend on it

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


dependencies:
  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
Popularity:
Describes how popular the package is relative to other packages. [more]
0
Health:
Code health derived from static analysis. [more]
92
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
90
Overall:
Weighted score of the above. [more]
46
Learn more about scoring.

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

  • Dart: 2.0.0
  • pana: 0.12.6

Platforms

Detected platforms: web

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

Health suggestions

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

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

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

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

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

line 109 col 9: The value of the local variable 'bgImageSub' isn't used.

line 114 col 9: The value of the local variable 'colorSub' 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.

Dependencies

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