vote 0.1.0+2

Build Status

Authors #

More Info #

0.1.0+2 #

  • Put in the right spot.

0.1.0+1 #

  • Add example and changelog.

0.1.0 #

  • Firsts release


import 'package:vote/vote.dart';

void main() {
  final chocolate = 'Chocolate';
  final fudge = 'Fudge';
  final vanilla = 'Vanilla';

  final ballots = [
    for (var i = 0; i < 31; i++) RankedBallot([fudge, chocolate, vanilla]),
    for (var i = 0; i < 29; i++) RankedBallot([chocolate, fudge, vanilla]),
    for (var i = 0; i < 40; i++) RankedBallot([vanilla, chocolate, fudge]),

  final pluralityElection = PluralityElection(ballots);
  print('Plurality winner: ${pluralityElection.singleWinner}');

  final irvElection = IrvElection(ballots);
  print('IRV winner:       ${irvElection.singleWinner}');

  final condorcetElection = CondorcetElection(ballots);
  print('Condorcet winner: ${condorcetElection.singleWinner}');

Use this package as a library

1. Depend on it

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

  vote: ^0.1.0+2

2. Install it

You can install packages from the command line:

with pub:

$ pub get

with Flutter:

$ flutter pub get

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

3. Import it

Now in your Dart code, you can use:

import 'package:vote/vote.dart';
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 Aug 20, 2019, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.4.0
  • pana: 0.12.19


Detected platforms: Flutter, web, other

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


Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.3.0-dev.0.3 <3.0.0
collection ^1.0.0 1.14.12
graphs ^0.2.0 0.2.0
meta ^1.0.0 1.1.7
Dev dependencies
test ^1.6.0