sequence 1.0.0

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

Sequence Library

A library for Dart developers.

Created from templates made available by Stagehand under a BSD-style license.

Usage

A simple usage example:

import 'package:sequence/sequence.dart';

main() {
  FibonacciSequence s = FibonacciSequence();
  for (int i = 0; i < 100; i++) print(s.next());
}

class FibonacciSequence extends Object with Sequence<int> {
  int curr = 0, prev = 1;

  FibonacciSequence()
      : curr = 0,
        prev = 1;

  @override
  int next() {
    super.next();
    int next = curr + prev;
    prev = curr;
    curr = next;
    return next;
  }

  @override
  int max() => curr;

  @override
  int min() => 0;
}

Features and bugs

Please file feature requests and bugs at the issue tracker.

1.0.0

  • Initial version, created by Stagehand

example/sequence_example.dart

import 'package:sequence/sequence.dart';

main() {
  FibonacciSequence s = FibonacciSequence();
  for (int i = 0; i < 100; i++) print(s.next());
}

class FibonacciSequence extends Object with Sequence<int> {
  int curr = 0, prev = 1;

  FibonacciSequence()
      : curr = 0,
        prev = 1;

  @override
  int next() {
    super.next();
    int next = curr + prev;
    prev = curr;
    curr = next;
    return next;
  }

  @override
  int max() => curr;

  @override
  int min() => 0;
}

Use this package as a library

1. Depend on it

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


dependencies:
  sequence: ^1.0.0

2. Install it

You can install packages from the command line:

with pub:


$ pub get

with Flutter:


$ flutter packages get

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

3. Import it

Now in your Dart code, you can use:


import 'package:sequence/sequence.dart';
  
Version Uploaded Documentation Archive
1.0.0 Jul 25, 2018 Go to the documentation of sequence 1.0.0 Download sequence 1.0.0 archive
Popularity:
Describes how popular the package is relative to other packages. [more]
0
Health:
Code health derived from static analysis. [more]
90
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
100
Overall:
Weighted score of the above. [more]
47
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

Platforms

Detected platforms: Flutter, web, other

No platform restriction found in primary library package:sequence/sequence.dart.

Health issues and suggestions

Document public APIs (-10 points)

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

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.0.0-dev.68.0 <3.0.0
meta ^1.1.6 1.1.6
Dev dependencies
test ^1.0.0