Skip to content
pubscout

big_decimal

0.7.0, released 10 months ago by bugless.dev

A bugless implementation of BigDecimal in Dart based on Java's BigDecimal.

WASM-ready
$ flutter pub add big_decimal
Source repository

What it does

Provides a BigDecimal implementation in Dart for handling precise decimal arithmetic. Helps avoid floating-point precision issues inherent in standard numeric types.

AI-written summary of version 0.7.0, based on the package's README and metadata. Report an inaccuracy

Use it when

  • You need precise decimal arithmetic for financial or mathematical calculations
  • You want to avoid precision loss from standard double types

Skip it when

  • You are doing simple performance-critical integer calculations where native numbers suffice

Strengths

  • Based on Java's well-tested BigDecimal implementation
  • Supports infinity values and parsing

Weaknesses

  • May have overhead compared to native primitives

Setup

Kind
Pure Dart
Effort
Low
Code generation
No
Direct dependencies
0
dependencies:
  big_decimal: '<1.0.0'

Alternatives

Packages that do the same job and could replace big_decimal.

  • rational

    If you prefer exact rational number representation instead of arbitrary-precision decimals.