conversion 1.0.0+1 conversion: ^1.0.0+1 copied to clipboard
A handy flutter package that helps you convert values.
Features #
A handy flutter package the helps you in converting
- Decimal to Hex.
- Hex to Decimal
- Decimal to Binary.
- Binary to Decimal.
- Binary to Hex.
- Hex to Binary.
- Decimal to Octal.
- Degrees, Minutes, Seconds to Decimal Degree.
- Radians to Degree
- One's Complement.
- Two's Complement.
Getting started #
Add the package in pubspec.yaml file
To import conversions:
import 'package:conversion/conversion.dart';
Usage #
Convert convert = Convert();
To convert from decimal to hex string
convert.decimalToHex(values: [192, 193]); //[c0, c1]
To convert from decimal to binary
convert.decimalToBinary(values: [192, 193]); //[11000000, 11000001]
To convert from binary to decimal
convert.binaryTodecimal(values: ['100', '101']); //[4, 5]
To convert from binary to hex
convert.binaryToHex(values: ['11000000']); //[c0]
To convert from hex to binary
convert.hexToBinary(values: ['c0']); //[11000000]
To convert from decimal to octal
convert.decimalToOctal(values: [192, 193]); //[300, 301]
To convert from hex string to decimal
convert.hexToDecimal(hexString: ['c0', 'c1']); //[192, 193]
To find one's complement
convert.findOnesComplement(binary: '011'); // 100
To find two's complement
convert.findTwosComplement(binary: '0111'); // 1001
convert degree, min, seconds to decimal degree
convert.toDecimalDegree(degree: 30, minutes: 15, seconds: 50));; // 30.26388888888889
To convert radians to degree
convert.radiansToDegree(radians: 2); // 114.59155902616465
Additional information #
I will be adding more features in next set of versions. Anyone can contribute & make this package more flexible.
You can connect with me at