ms_range 0.2.0

  • Readme
  • Changelog
  • Example
  • Installing
  • 72

Overview #

A powerfull lib to creante and compare a number in ranges

Whats MS_Range do? #

Generate a range of two numbers and providers methods to check if a number is in this range.

Usage #

Create a new Range instance:

import 'package:ms_range/ms_range.dart';

Range range = Range(1, 6);

Call some methods of range to do hard work:

range.isInRange(2); // true
range.list; // [1, 2, 3, 4, 5, 6]

[0.2.0] - 10/17/2019

  • Generate list with steps

[0.1.1] - 10/17/2019

  • fix lib name in example

[0.1.0] - 10/17/2019

  • Updated requiriments
  • Code example
  • Writed better README file

[0.0.1] - 10/17/2019

  • First release


import 'package:ms_range/ms_range.dart';

main() {
  Range range = Range(1, 20);
  print("Print array 1..20");

  print("\nPrint if value is in range");
  print("100 is between 1..20? ${range.isBetween(100)}");
  print("7 is between 1..20? ${range.isBetween(7)}");
  print("20 is between 1..20? ${range.isBetween(20)}");

  print("100 is in range 1..20? ${range.isInRange(100)}");
  print("7 is in range 1..20? ${range.isInRange(7)}");
  print("20 is in range 1..20? ${range.isInRange(20)}");

Use this package as a library

1. Depend on it

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

  ms_range: ^0.2.0

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:ms_range/ms_range.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 Jan 21, 2020, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.7.0
  • pana: 0.13.4

Health suggestions

Format lib/ms_range.dart.

Run dartfmt to format lib/ms_range.dart.


Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.0.0 <3.0.0
Dev dependencies
test ^1.9.2