ms_range 0.1.1

  • Readme
  • Changelog
  • Example
  • Installing
  • 50

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.1.1] - 10/17/2019

  • fix lib name in example

[0.1.0] - 10/17/2019

  • Updated pud.dev requiriments
  • Code example
  • Writed better README file

[0.0.1] - 10/17/2019

  • First release

example/main.dart

import 'package:ms_range/ms_range.dart';

main() {
  Range range = Range(1, 20);
  print("Print array 1..20");
  print(range.list);
  
  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:


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

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

  • Dart: 2.6.0
  • pana: 0.12.21

Platforms

Detected platforms: Flutter, web, other

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

Dependencies

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