swiss_knife 1.0.1

  • Installing
  • Versions
  • 35

Swiss Knife

Dart useful tools: collections, math, date, etc...


A simple usage example:

import 'package:swiss_knife/swiss_knife.dart';

class User {

  final EventStream<String> onNotification = new EventStream() ;

  void notify(String msg) {
    onNotification.add(msg) ;


void main() {

  User user = new User() ;

  user.onNotification.listen((msg) {
    print("NOTIFICATION> $msg") ;


Features and bugs

Please file feature requests and bugs at the issue tracker.


Graciliano M. Passos: gmpassos@GitHub.


Dart free & open-source license.


  • Fix swiss_knife_browser.dart exports.


  • Added events example.
  • Initial version, created by Stagehand

Use this package as a library

1. Depend on it

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

  swiss_knife: ^1.0.1

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:swiss_knife/swiss_knife.dart';
Version Uploaded Documentation Archive
1.0.1 Sep 25, 2018 Go to the documentation of swiss_knife 1.0.1 Download swiss_knife 1.0.1 archive
1.0.0 Sep 25, 2018 Go to the documentation of swiss_knife 1.0.0 Download swiss_knife 1.0.0 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 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


Detected platforms: Flutter, web, other

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

Health issues and suggestions

Fix lib/src/locales.dart. (-25.38 points)

Analysis of lib/src/locales.dart failed with 1 error, 1 hint:

line 735 col 7: Missing return value after 'return'.

line 753 col 3: This function has a return type of 'String', but doesn't end with a return statement.

Document public APIs (-9.17 points)

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

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

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

line 72 col 9: The value of the local variable 'uri' isn't used.

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

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

line 26 col 3: This function has a return type of 'Future', but doesn't end with a return statement.

Format lib/src/locales_browser.dart.

Run dartfmt to format lib/src/locales_browser.dart.

Format lib/src/utils_browser.dart.

Run dartfmt to format lib/src/utils_browser.dart.

Maintenance suggestions

The description is too short. (-20 points)

Add more detail about the package, what it does and what is its target use case. Try to write at least 60 characters.

Maintain an example.

None of the files in your example/ directory matches a known example patterns. Common file name patterns include: main.dart, example.dart or you could also use swiss_knife.dart. Packages with multiple examples should use example/


Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.0.0 <3.0.0
intl ^0.15.7 0.15.7
Transitive dependencies
path 1.6.2
Dev dependencies
test ^1.0.1