Search packages, repositories and app categories

Package detailsv1.0.0

mod97

Calculate the modulo 97.

AndroidiOSWebmacOSWindowsLinux
30-day downloads
26.6K
Likes
0
Pub points
150

Install package

flutter pub add mod97

Package Overview

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

The mod97 package provides a simple and efficient way to calculate the modulo 97 of a number in Dart applications. It is designed for use in mathematical operations where modulo 97 is required, such as in checksum algorithms or financial identifier validation. The package is lightweight, platform-agnostic, and compatible with all major Flutter platforms including Android, iOS, Web, macOS, Windows, and Linux. It offers a straightforward API that integrates seamlessly into existing codebases without additional dependencies.

Use cases

  • Checksum validation
  • Financial identifier processing
  • Data integrity checks
  • Algorithmic computations
  • Numeric verification

Key features

  • Lightweight implementation
  • Cross-platform support
  • Simple API
  • High performance
  • Accurate modulo 97 calculation

Suitable for

  • Developers needing modulo 97 logic
  • Applications requiring data validation
  • Math-heavy Flutter projects
  • Financial or banking software
  • Backend or algorithmic utilities

Considerations

  • Limited to modulo 97 only
  • No support for other moduli
  • Minimal error handling
  • Not suitable for complex number theory

Original README

Original README snapshot from the linked source repository. Visit the repository for the latest content.

mod97

Calculates the MOD 97 10 of the passed number as specified in ISO7064.

Only positive numbers are allowed.

I have copied this code from iban.js

Build Status

Usage

A simple usage example:

import 'package:mod97/mod97.dart';

main() {
  int m = mod97('1234567');
  
  int m2 = mod97('-123', onError: (_) => 5);
  // m2 will be 5
}

The input must be a String. Returned value is an integer.

Invalid characters throw a FormatException unless an onError function is provided.

Categories

Source repository

Projects using this package