Skip to content

API reference

The full API reference is generated from the source code and hosted on pub.dev:

pub.dev/documentation/nepali_utils/latest

Everything below is exported by one library:

import 'package:nepali_utils/nepali_utils.dart';
Symbol Kind Description Guide
Language enum english or nepali; converts to and from locale identifiers. Language
NepaliUtils class (static) defaultLanguage, currentLanguage and withLanguage. Language
Symbol Kind Description Guide
NepaliDateTime class A Bikram Sambat DateTime in local time, UTC or Nepal Time. Date & time
ENepaliDateTime extension on DateTime toNepaliDateTime(). Date & time
NepaliDateFormat class intl-style date formatting with skeletons and pattern letters. Date formatting
Symbol Kind Description Guide
NepaliNumberFormat class Lakh/crore grouping, currency, percent, compact, words and parsing. Number formatting
Symbol Kind Description Guide
NepaliMoment class format, formatDuration, formatUnit and calendar. Relative time
MomentUnit enum second … year, for formatUnit. Relative time
MomentStyle enum long (3 hours ago) or short (3 hr. ago). Relative time
Symbol Kind Description Guide
NepaliUnicode class (Converter) Romanized ↔ Devanagari conversion, live typing and streams. Nepali Unicode
NepaliUnicodeStyle enum classic, google, mppRomanized and mppTraditional. Nepali Unicode
Preeti class (static) Converts between the Preeti font encoding and Unicode. Preeti
Devanagari class (static) Detection, digit conversion and akshara splitting. Devanagari
Symbol Kind Description Guide
NepaliArea class Land area: ropani-aana-paisa-daam, bigha-kattha-dhur and metric. Measurement
AreaUnit enum Area units, from ropani to hectare. Measurement
AreaSystem enum ropani or bigha mixed-unit system. Measurement
NepaliWeight class Weight: tola-lal, dharni-ser-pau-chhatak and metric. Measurement
WeightUnit enum Weight units, from tola to kilogram. Measurement
WeightSystem enum tola or dharni mixed-unit system. Measurement
NepaliVolume class Grain volume: muri-pathi-mana-muthi and litres. Measurement
VolumeUnit enum Volume units, from muri to liter. Measurement
Symbol Kind Description Guide
NepaliPhoneNumber class Parses, validates, formats and finds mobile and landline numbers. Phone numbers
PhoneNumberMatch class A number found by findAll: start, end, text, number. Phone numbers
PhoneType enum mobile or landline. Phone numbers
PhoneFormat enum national, international or e164. Phone numbers
MobileOperator enum nepalTelecom, ncell, smart and utl, with their prefixes. Phone numbers