fatint 2.0.0

  • README.md
  • Installing
  • Versions
  • 33


Dart library for arbitrary sized integer values. Dart VM by default supports arbitrary sized integers but it is not the case when compiled to Javascript on the browser. This package provides a common big number interface for DartVM and browser and provides respective implementations.

Simple examples

BigInteger i1 = bigInt(25) % bigInt(7); // => 4
BigInteger i2 = bigHex('abcd1234') * bigHex('beef'); // => 0x802297f6968c


  • Clean API complying to to Dart's int
  • Efficient equations using BigIntegerRef and zero



  • BigIntJs: JS implementation of BigInt

Breaking changes

  • BigInt: BigInteger
  • BigIntVm: BigIntegerVm
  • BigIntRef: BigIntegerRef


  • BigInteger interface desing
  • BigIntegerVM: VM implementation of BigInteger
  • BigIntegerRef for writing efficient equations
  • EfficientBigMath for writing efficient equations

1. Depend on it

Add this to your package's pubspec.yaml file:

  fatint: "^2.0.0"

2. Install it

You can install packages from the command line:

with pub:

$ pub get

Alternatively, your editor might support pub get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:

import 'package:fatint/fatint.dart';
Version Uploaded Documentation Archive
2.0.0 Jan 5, 2018 Go to the documentation of fatint 2.0.0 Download fatint 2.0.0 archive
1.0.0 Jan 4, 2018 Go to the documentation of fatint 1.0.0 Download fatint 1.0.0 archive


This feature is new.
We welcome feedback.
More details: scoring.

We analyzed this package, and provided a score, details, and suggestions below.

  • tool failures on Feb 16, 2018
  • Dart: 2.0.0-dev.20.0
  • pana: 0.10.1


Describes how popular the package is relative to other packages. [more]
32 / 100
Code health derived from static analysis. [more]
0 / 100
Reflects how tidy and up-to-date the package is. [more]
85 / 100
Overall score:
Weighted score of the above. [more]


Detected platforms: web, other

Primary library: package:fatint/fatint.dart with components: js.


  • Fix lib/src/bignum.dart.

    Strong-mode analysis of lib/src/bignum.dart failed with the following error:

    line: 16 col: 14
    The return type 'BigIntJs' isn't a 'BigInt', as defined by the method 'zero'.

  • Fix lib/src/js/ref.dart.

    Strong-mode analysis of lib/src/js/ref.dart failed with the following error:

    line: 3 col: 7
    Inconsistent declarations of '<' are inherited from (BigIntJs) → bool, (BigInt) → bool.

  • Fix further 3 Dart files.

    Similar analysis of the following files failed:

    • lib/src/js/js.dart
    • lib/src/vm/vm.dart
    • lib/src/vm/ref.dart
  • Fix issues reported by dartanalyzer.

    dartanalyzer reported 3 error(s) and 0 warning(s).

  • The description is too short.

    Add more detail about the package, what it does and what is its target use case. Try to write at least 60 characters.

  • Maintain an example.

    None of the files in your example/ directory matches a known example patterns. Common file name patterns include: main.dart, example.dart or you could also use fatint.dart.


Package Constraint Resolved Available
Direct dependencies
Dart SDK >=1.20.1 <2.0.0
biginteger_js ^1.0.1 1.0.1
rational ^0.1.11 0.1.11
Transitive dependencies
js 0.6.1
Dev dependencies
browser ^0.10.0
dart_to_js_script_rewriter ^1.0.1
test ^0.12.0