Last updated:
0 purchases
fast operation
Getting started #
A dart package for conversion of various units:
base
angle
distance
temperature
weight
Install #
Add this to your pubspec.yaml file:
dependencies:
fast_operation: #latest version
copied to clipboard
Usage #
import 'package:fast_operation/fast_operation.dart';
void main(){
var miles = 3.12;
var meter = Distance().convert(value: miles, from: DISTANCE.miles, to: DISTANCE.meter);
print(meter); //5021.15328
}
copied to clipboard
Each property has its own class name and a convert function:
distance - Distance()
weight - Weight()
and so on
While using from and to, just type PROPERTY in caps and use . to access its units.
E.g.
var meter = Distance().convert(value: miles, from: DISTANCE.miles, to: DISTANCE.meter);
copied to clipboard
Here, only exception is for 'base'.
To change base between Decimal, Binary, Octal, Hexadecimal:
var decimal = 123;
var binary = BaseConverter().decimalToBinary(decimal);
copied to clipboard
For personal and professional use. You cannot resell or redistribute these repositories in their original state.
There are no reviews.