tool_base 1.9.5+1

  • Readme
  • Changelog
  • Example
  • Installing
  • 61

pub package Build Status codecov

A library for Dart developers.

Usage #

A simple usage example:

import 'package:tool_base/tool_base.dart';

import 'context_runner.dart';

main() {
  return runInContext<void>(() async {
    printTrace('Running in context');
    printStatus('Hello, world!');
  });
}

See example for details.

Features and bugs #

Please file feature requests and bugs at the issue tracker.

1.9.5+1 #

  • Fixed analysis warnings.

1.9.5 #

example/tool_base_example.dart

import 'package:tool_base/tool_base.dart';

import 'context_runner.dart';

main() {
  return runInContext<void>(() async {
    printTrace('Running in context');
    printStatus('Hello, world!');
  });
}

Use this package as a library

1. Depend on it

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


dependencies:
  tool_base: ^1.9.5+1

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:tool_base/tool_base.dart';
  
Popularity:
Describes how popular the package is relative to other packages. [more]
44
Health:
Code health derived from static analysis. [more]
68
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
94
Overall:
Weighted score of the above. [more]
61
Learn more about scoring.

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

  • Dart: 2.5.1
  • pana: 0.12.21

Platforms

Detected platforms: Flutter, other

Primary library: package:tool_base/tool_base.dart with components: io.

Health suggestions

Fix lib/src/base/logger.dart. (-8.63 points)

Analysis of lib/src/base/logger.dart reported 18 hints, including:

line 171 col 7: DO use curly braces for all flow control structures.

line 175 col 7: DO use curly braces for all flow control structures.

line 193 col 7: DO use curly braces for all flow control structures.

line 195 col 7: DO use curly braces for all flow control structures.

line 197 col 7: DO use curly braces for all flow control structures.

Fix lib/src/base/process.dart. (-7.71 points)

Analysis of lib/src/base/process.dart reported 16 hints, including:

line 87 col 9: DO use curly braces for all flow control structures.

line 100 col 7: DO use curly braces for all flow control structures.

line 102 col 7: DO use curly braces for all flow control structures.

line 154 col 9: DO use curly braces for all flow control structures.

line 158 col 11: DO use curly braces for all flow control structures.

Fix lib/src/base/os.dart. (-5.36 points)

Analysis of lib/src/base/os.dart reported 11 hints, including:

line 37 col 7: DO use curly braces for all flow control structures.

line 122 col 7: DO use curly braces for all flow control structures.

line 126 col 7: DO use curly braces for all flow control structures.

line 199 col 7: DO use curly braces for all flow control structures.

line 202 col 7: DO use curly braces for all flow control structures.

Fix additional 10 files with analysis or formatting issues. (-16.29 points)

Additional issues in the following files:

  • lib/src/base/version.dart (8 hints)
  • lib/src/base/context.dart (7 hints)
  • lib/src/base/file_system.dart (6 hints)
  • lib/src/base/utils.dart (6 hints)
  • lib/src/base/terminal.dart (4 hints)
  • lib/src/base/config.dart (1 hint)
  • lib/src/base/io.dart (1 hint)
  • lib/src/base/common.dart (Run dartfmt to format lib/src/base/common.dart.)
  • lib/src/base/process_manager.dart (Run dartfmt to format lib/src/base/process_manager.dart.)
  • lib/src/convert.dart (Run dartfmt to format lib/src/convert.dart.)

Maintenance suggestions

The package description is too short. (-6 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.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.2.2 <3.0.0
archive ^2.0.9 2.0.10
file ^5.0.8 5.1.0
platform ^2.2.0 2.2.1
process ^3.0.9 3.0.12
Transitive dependencies
args 1.5.2
charcode 1.1.2
collection 1.14.12
convert 2.1.1
crypto 2.1.3
intl 0.16.0
meta 1.1.7
path 1.6.4
typed_data 1.1.6
Dev dependencies
mockito ^4.1.0
pedantic ^1.0.0
quiver ^2.0.3
test ^1.0.0