time_log 0.1.1

time_log #

Like console.time, console.timeEnd, print timelong;

API #

API: https://pub.dev/documentation/time_log/latest/time_log/TimeLog-class.html

Getting Started #

Example:

import 'package:time_log/time_log.dart';

void main() {
  var p = TimeLog.point();
  for (var i = 0; i < 100; i++) {
    print('test run time');
  }
  TimeLog.long(p); // Use time: 1.320ms
}

Change Log string #

import 'package:time_log/time_log.dart';

void main() {
  var p = TimeLog.point();
  for (var i = 0; i < 100; i++) {
    print('test run time');
  }
  TimeLog.long(p, 'Oh: '); // Oh: 1.320ms
}

Only print in develop #

TimeLog.isLog = false;

[0.1.1] - Update Readme.

  • Update Readme.md
  • Set dart-doc
  • Change API: TimeLog.isDev -> TimeLog.isLog

[0.0.1] - TODO: Add release date.

  • TODO: Describe initial release.

example/example.dart

import 'package:time_log/time_log.dart';

void main() {
  var p = TimeLog.point();
  for (var i = 0; i < 100; i++) {
    print('test run time');
  }
  TimeLog.long(p); // Use time: 1.320ms
}

Use this package as a library

1. Depend on it

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


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

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

  • Dart: 2.4.0
  • pana: 0.12.19

Platforms

Detected platforms: Flutter

References Flutter, and has no conflicting libraries.

Maintenance suggestions

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

Admin