FLUTTER ECOSYSTEM

decimal

The decimal package allows you to deal with decimal numbers without losing precision.

Latest version
3.2.6
30-day downloads
714K
Likes
433
Pub points
160

Package Overview

Package selection guidance compiled from public package information, community data, and project usage.

Overview

The decimal package provides precise decimal arithmetic in Dart, enabling accurate handling of decimal numbers without the precision loss common in floating-point operations. It supports exact decimal representation and arithmetic, making it ideal for financial calculations and other scenarios requiring high accuracy. The package is compatible across all major platforms, including mobile, web, and desktop. It offers a clean API for creating, manipulating, and formatting decimal values with full control over rounding modes and scale.

Use cases
  • Financial calculations
  • Scientific computations
  • Currency handling
  • Precise data processing
  • Unit conversions
Key features
  • High-precision decimal arithmetic
  • No floating-point precision loss
  • Support for rounding modes
  • Cross-platform compatibility
  • Easy-to-use API
Suitable for
  • Applications requiring exact decimal math
  • Financial or accounting software
  • Systems where precision is critical
  • Developers avoiding float inaccuracies
Considerations
  • Slightly higher memory usage than doubles
  • Not optimized for performance-intensive numerical workloads
  • Requires explicit use instead of native numeric types
Supported platformsAndroidiOSWebmacOSWindowsLinux

Install package

flutter pub add decimal

Categories

Dependencies

Dependency list 2 items

Source repository

Related projects

Rankings