Search packages, repositories and app categories

Package detailsv2.0.0

digit_to_persian_word

Flutter package for changing digit (up to 16 digits) to the Persian word and add separate to an integer Convenient and practical.

AndroidiOSWebmacOSWindowsLinux
30-day downloads
111
Likes
38
Pub points
150

Install package

flutter pub add digit_to_persian_word

Package Overview

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

A Flutter package that converts numeric digits (up to 16 digits) into their corresponding Persian textual representation. It supports integer values and provides a convenient way to format numbers in Persian for display purposes, such as invoices, receipts, or financial reports. The package is designed for localization needs in Persian-speaking regions, ensuring accurate and culturally appropriate number formatting. It works across all major platforms including Android, iOS, Web, macOS, Windows, and Linux.

Use cases

  • Converting numbers to Persian words in financial documents
  • Displaying amounts in Persian on invoices
  • Localizing number formats for Iranian users
  • Generating readable number text in Persian apps
  • Formatting large numbers in Persian without manual effort

Key features

  • Supports up to 16-digit numbers
  • Converts integers to Persian textual form
  • Simple API with minimal setup
  • Cross-platform compatibility
  • Accurate Persian linguistic rules
  • Automatic word separation for readability

Suitable for

  • Apps targeting Persian-speaking audiences
  • Financial or accounting applications
  • Localization projects requiring number conversion
  • Educational tools using Persian numerals
  • Applications needing human-readable number output

Considerations

  • Only handles integers, not decimals
  • Does not support negative numbers
  • Limited to Persian language only
  • Requires manual handling of decimal parts
  • May need additional logic for currency formatting

Original README

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

digit_to_persian_word

The Flutter package for changing digit to the Persian word and add separate to an integer

demo:

Add dependency

dependencies:
  digit_to_persian_word: ^2.0.0

Usage

import 'package:flutter/material.dart';
import 'package:digit_to_persian_word/digit_to_persian_word.dart';


void main() => runApp(MyApp());

class MyApp extends StatelessWidget {
  // This widget is the root of your application.
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Flutter Demo',
      theme: ThemeData(
        primarySwatch: Colors.blue,
      ),
      home: MyHomePage(),
      debugShowCheckedModeBanner: false,
    );
  }
}

class MyHomePage extends StatelessWidget {
  
  @override
  Widget build(BuildContext context) {

    return Scaffold(
      appBar: AppBar(
        title: Text("Flutter Digit To Persian Word'"),
      ),
      body: Column(
        crossAxisAlignment: CrossAxisAlignment.end,
        children: <Widget>[
          //تبدیل رقم به حروف بدون تبدیل اعداد
          Text(DigitToWord.toWord("123456",StrType.NumWord,isMoney: true)),// 123 هزارو 456 تومان
          //)تبدیل عدد به حروف همراه با تبدیل اعداد
          Text(DigitToWord.toWord("123456",StrType.StrWord),),//صد و بیست و سه هزارو چهارصدو پنجاه و شش
          //تبدیل رقم به حروف 
          Text(DigitToWord.toWord("123.456",StrType.NumWord,isMoney: true,separator: ".")),// 123 هزارو 456 تومان
          //جدا سازی سه رقمی اعداد به صورت معمول
          Text(DigitFormat.convert("123456",separator: ","),),//123,456
          //به جدا سازی سه رقمی اعداد به صورت (TextInputFormatter)
          TextFormField(inputFormatters: [DigitInputFormat()]),
        ],
      ),
    );
  }
}

example

example

An example showing how to use

Categories

Source repository

Projects using this package

No data available yet.