luce 0.0.4

  • README.md
  • CHANGELOG.md
  • Example
  • Installing
  • Versions
  • 51

Tiny web framework inspired by hyperapp and Flutter.

Work in progress.

0.0.4 #

  • Localized tree rebuild with less rework.
  • Support arbitrary changes to Element child lists.

0.0.3 #

  • Support localized tree rebuild.

0.0.2 #

  • Reimplementation begun. Supporting only the simplest DOM scenarios.

0.0.1 #

  • Initial import, a modified Dart port of hyperapp.

example/luce_example.dart

import 'package:luce/luce.dart';
import 'dart:html' as html;

void main() {
  final Counter counter = Counter();
  final Widget widget = CounterWidget(counter);

  wire(widget, html.querySelector('#output'));

  html.window.onKeyPress.listen((html.KeyboardEvent event) {
    counter.up();
  });
}

class Counter with Notification {
  int _value = 0;

  void up() {
    _value += 1;
    notifyAll();
  }

  int get value => _value;
}

class CounterWidget extends LazyWidget {
  final Counter counter;

  CounterWidget(this.counter);

  Widget build(BuildContext context) {
    context.rebuildOn(counter.notify);
    return Div(children: [
      Text('Your Dart app is running.'),
      Br(),
      Text('Counter value is ${counter.value}'),
    ]);
  }
}

Use this package as a library

1. Depend on it

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


dependencies:
  luce: ^0.0.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:luce/luce.dart';
  
Version Uploaded Documentation Archive
0.0.13 Dec 4, 2018 Go to the documentation of luce 0.0.13 Download luce 0.0.13 archive
0.0.12 Dec 2, 2018 Go to the documentation of luce 0.0.12 Download luce 0.0.12 archive
0.0.11 Nov 28, 2018 Go to the documentation of luce 0.0.11 Download luce 0.0.11 archive
0.0.10 Nov 27, 2018 Go to the documentation of luce 0.0.10 Download luce 0.0.10 archive
0.0.9 Nov 27, 2018 Go to the documentation of luce 0.0.9 Download luce 0.0.9 archive
0.0.8 Nov 26, 2018 Go to the documentation of luce 0.0.8 Download luce 0.0.8 archive
0.0.7 Nov 24, 2018 Go to the documentation of luce 0.0.7 Download luce 0.0.7 archive
0.0.6 Nov 24, 2018 Go to the documentation of luce 0.0.6 Download luce 0.0.6 archive
0.0.5 Nov 24, 2018 Go to the documentation of luce 0.0.5 Download luce 0.0.5 archive
0.0.4 Nov 23, 2018 Go to the documentation of luce 0.0.4 Download luce 0.0.4 archive

All 13 versions...

Popularity:
Describes how popular the package is relative to other packages. [more]
15
Health:
Code health derived from static analysis. [more]
99
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
70
Overall:
Weighted score of the above. [more]
51
Learn more about scoring.

We analyzed this package on May 8, 2019, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.3.0
  • pana: 0.12.15

Platforms

Detected platforms: web

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

Health issues and suggestions

Document public APIs. (-1 points)

41 out of 41 API elements have no dartdoc comment.Providing good documentation for libraries, classes, functions, and other API elements improves code readability and helps developers find and use your API.

Fix lib/src/luce_base.dart. (-0.50 points)

Analysis of lib/src/luce_base.dart reported 1 hint:

line 62 col 5: Don't explicitly initialize variables to null.

Maintenance suggestions

The package description is too short. (-20 points)

Add more detail to the description field of pubspec.yaml. Use 60 to 180 characters to describe the package, what it does, and its target use case.

Package is pre-v0.1 release. (-10 points)

While nothing is inherently wrong with versions of 0.0.*, it might mean that the author is still experimenting with the general direction of the API.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.0.0 <3.0.0