num_to_fraction

Last updated:

0 purchases

num_to_fraction Image
num_to_fraction Images
Add to Cart

Description:

num to fraction

num_to_fraction #
Convert Number to Fraction for flutter
Usage #
A simple usage example:
import 'package:num_to_fraction/num_to_fraction.dart';

main() {
final fraction = NumToFraction();

print(fraction.num2fraction(0));
// => 0
print(fraction.num2fraction(0.2));
// => 1/5
print(fraction.num2fraction(1.1));
// => 11/10
print(fraction.num2fraction(1.2));
// => 6/5
print(fraction.num2fraction(1.3));
// => 13/10
print(fraction.num2fraction(1.4));
// => 7/5
print(fraction.num2fraction(1.5));
// => 3/2
print(fraction.num2fraction(2));
// => 2/1
print(fraction.num2fraction(2.1));
// => 21/10
print(fraction.num2fraction(3));
// => 3/1
print(fraction.num2fraction(2.555));
// => 511/200
print(fraction.num2fraction((8 * 5) / (4 / 2)));
// => 20/1
copied to clipboard
Features and bugs #
Please file feature requests and bugs at the issue tracker.
License #
Copyright © 2021-present, Don Freddy. Released under the MIT License.

License:

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Files In This Product:

Customer Reviews

There are no reviews.