packages_extensions 0.1.1 copy "packages_extensions: ^0.1.1" to clipboard
packages_extensions: ^0.1.1 copied to clipboard

Extensions for non Dart core packages.

example/example.dart

import 'package:decimal/decimal.dart';
import 'package:packages_extensions/packages_extensions.dart';
import 'package:rational/rational.dart';

void main() {
  Rational rationalInfinite = Rational.one / Rational.fromInt(3);

  Decimal dec1 = Decimal.parse('-19037.0045');

  // Ratiobal
  print(rationalInfinite.roundToDecimal()); // 0.3333333333

  // Decimal
  print(dec1.isNegative); // true
  print(dec1.significandString); // 190370045
  print(dec1.scaleFast); // 4
  print(dec1.precisionFast); // 9
  print(dec1.toStringAsPrecision(7)); // -19037.00
}
0
likes
150
pub points
72%
popularity

Publisher

unverified uploader

Extensions for non Dart core packages.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

decimal, power_extensions, rational

More

Packages that depend on packages_extensions