humanizer library
A Dart library to convert values into human-friendly Strings.
Classes
- ApproximateRelativeTimeTransformation
- A transformation to convert a Duration representing an offset of time from "now", into an approximate, human-friendly description.
- Area
- A unit of measurement representing a two-dimensional area.
- AreaFormat
- Allows an Area to be formatted.
- AreaRate
- Represents a rate of change in Area.
- AreaRateFormat
- Allows an AreaRate to be formatted.
- AreaRateTransformation
- A transformation to convert an AreaRate to a human-readable String by using an AreaRateFormat.
- AreaTransformation
- A transformation to convert an Area to a human-readable String by using an AreaFormat.
- AreaUnits
- Provides convenience sets of commonly used AreaUnits.
- CardinalWordsTransformation
- A transformation to convert an input int into cardinal form.
- InformationRate
- Represents a rate of transfer of InformationSize.
- InformationRateFormat
- Allows an InformationRate to be formatted.
- InformationRateTransformation
- A transformation to convert an InformationRate to a human-readable String by using an InformationRateFormat.
- InformationSize
- A unit of measurement representing information size.
- InformationSizeFormat
- Allows an InformationSize to be formatted.
- InformationSizeTransformation
- A transformation to convert an InformationSize to a human-readable String by using an InformationSizeFormat.
- InformationUnits
- Provides convenience sets of commonly used InformationUnits.
- Length
- A unit of measurement representing a one-dimensional length.
- LengthFormat
- Allows a Length to be formatted.
- LengthRate
- Represents a rate of change in Length (a.k.a. a speed).
- LengthRateFormat
- Allows a LengthRate to be formatted.
- LengthRateTransformation
- A transformation to convert an LengthRate to a human-readable String by using a LengthRateFormat.
- LengthTransformation
- A transformation to convert an Length to a human-readable String by using a LengthFormat.
- LengthUnits
- Provides convenience sets of commonly used LengthUnits.
- OrdinalNumericalTransformation
- A transformation to convert an input int into numerical ordinal form.
- OrdinalWordsTransformation
- A transformation to convert an input int into word ordinal form.
- PluralityTransformation
- A transformation to convert the plural form of an input String.
- RateUnits
- Provides convenience sets of commonly used RateUnits.
- SymbolNameTransformation
- A transformation to convert a String containing a symbol name into a human-friendly representation thereof. The symbol name can be camel-, pascal-, snake-, or kebab-cased.
- Temperature
- A unit of measurement representing a temperature.
- TemperatureFormat
- Allows a Length to be formatted.
- TemperatureRate
- Represents a rate of change in Temperature.
- TemperatureRateFormat
- Allows a TemperatureRate to be formatted.
- TemperatureRateTransformation
- A transformation to convert an TemperatureRate to a human-readable String by using a TemperatureRateFormat.
- TemperatureTransformation
- A transformation to convert an Temperature to a human-readable String by using a TemperatureFormat.
- TemperatureUnits
- Provides convenience sets of commonly used TemperatureUnits.
- Time
- A unit of measurement representing time.
- TimeFormat
- Allows a Time to be formatted.
- TimeRate
- Represents a rate of change in Time.
- TimeRateFormat
- Allows a TimeRate to be formatted.
- TimeRateTransformation
- A transformation to convert an TimeRate to a human-readable String by using a TimeRateFormat.
- TimeTransformation
- A transformation to convert an Time to a human-readable String by using a TimeFormat.
- TimeUnits
- Provides convenience sets of commonly used TimeUnits.
- ToSentenceCaseTransformation
- A transformation to convert a String into sentence case.
- ToTitleCaseTransformation
- A transformation to convert a String into title case.
-
Transformation<
T, U> -
Facilitates transforming a value of type
T
to typeU
. - TruncateToFixedLengthTransformation
- A transformation to convert a String into a truncated variant that contains at most length characters.
- TruncateToFixedNonWhitespaceLengthTransformation
- A transformation to convert a String into a truncated variant that contains at most length non-whitespace characters.
- TruncateToFixedWordLengthTransformation
- A transformation to convert a String into a truncated variant that contains at most length words.
-
UnitOfMeasurement<
TUnit, TValue extends UnitOfMeasurement< TUnit, dynamic> > - Base class for units of measurement.
-
UnitOfMeasurementFormat<
TValue, TUnit> - Base class for unit of measurement formats.
-
UnitOfMeasurementRate<
TValue extends UnitOfMeasurement> - Base class for a unit of measurement rate.
- Volume
- A unit of measurement representing a three-dimensional volume.
- VolumeFormat
- Allows a Volume to be formatted.
- VolumeRate
- Represents a rate of change in Volume.
- VolumeRateFormat
- Allows a VolumeRate to be formatted.
- VolumeRateTransformation
- A transformation to convert an VolumeRate to a human-readable String by using a VolumeRateFormat.
- VolumeTransformation
- A transformation to convert an Volume to a human-readable String by using a VolumeFormat.
- VolumeUnits
- Provides convenience sets of commonly used VolumeUnits.
- Weight
- A unit of measurement representing a weight.
- WeightFormat
- Allows a Weight to be formatted.
- WeightRate
- Represents a rate of change in Weight.
- WeightRateFormat
- Allows a WeightRate to be formatted.
- WeightRateTransformation
- A transformation to convert an WeightRate to a human-readable String by using a WeightRateFormat.
- WeightTransformation
- A transformation to convert an Weight to a human-readable String by using a WeightFormat.
- WeightUnits
- Provides convenience sets of commonly used WeightUnits.
Enums
- AreaUnit
- Defines supported units of area.
- Granularity
- Defines levels of granularity a DateTime can be humanized by a ApproximateRelativeTimeTransformation.
- InformationUnit
- Defines supported units of information.
- LengthUnit
- Defines supported units of length.
- Plurality
- Defines possible plurality values.
- RateUnit
- Defines valid units for rates.
- TemperatureUnit
- Defines supported units of temperature.
- TimeUnit
- Defines supported units of time.
- TruncateAt
- Defines possible locations to truncate a String.
- VolumeUnit
- Defines supported units of volume.
- WeightUnit
- Defines supported units of weight.
Extensions
- ApproximateRelativeTimeExtensions on DateTime
- Provides humanizing extensions on DateTime.
- AreaExtensions on Area
- Provides humanizing extensions on Area.
- AreaRateExtensions on AreaRate
- Provides humanizing extensions on AreaRate.
- AreaUnitExtensions on AreaUnit
- Contains extensions for AreaUnit.
- CardinalExtensions on int
- Provides cardinal-related extensions on int.
- InformationRateExtensions on InformationRate
- Provides humanizing extensions on InformationRate.
- InformationSizeExtensions on InformationSize
- Provides humanizing extensions on InformationSize.
- InformationUnitExtensions on InformationUnit
- Contains extensions for InformationUnit.
- LengthExtensions on Length
- Provides humanizing extensions on Length.
- LengthRateExtensions on LengthRate
- Provides humanizing extensions on LengthRate.
- LengthUnitExtensions on LengthUnit
- Contains extensions for LengthUnit.
- OrdinalExtensions on int
- Provides ordinal-related extensions on int.
- PluralityExtensions on String
- Provides plurality-related extension methods on String.
- RateUnitExtensions on RateUnit
- Defines extensions on RateUnit.
- StringCasingExtensions on String
- Provides casing-related extension methods on String.
- StringTruncateExtensions on String
- Provides truncation-related extensions on String.
- SymbolNameExtensions on String
- Provides symbol-related humanizing extensions on String.
- TemperatureExtensions on Temperature
- Provides humanizing extensions on Temperature.
- TemperatureRateExtensions on TemperatureRate
- Provides humanizing extensions on TemperatureRate.
- TemperatureUnitExtensions on TemperatureUnit
- Contains extensions for TemperatureUnit.
- TimeExtensions on Time
- Provides humanizing extensions on Time.
- TimeRateExtensions on TimeRate
- Provides humanizing extensions on TimeRate.
- TimeUnitExtensions on TimeUnit
- Contains extensions for TimeUnit.
-
TransformationExtensions
on Transformation<
T, U> - Provides useful extensions against Transformation.
- UnitsOfMeasurementDecimalExtensions on Decimal
- Provides extensions on int related to units of measurement.
- UnitsOfMeasurementIntExtensions on int
- Provides extensions on int related to units of measurement.
- VolumeExtensions on Volume
- Provides humanizing extensions on Volume.
- VolumeRateExtensions on VolumeRate
- Provides humanizing extensions on VolumeRate.
- VolumeUnitExtensions on VolumeUnit
- Contains extensions for VolumeUnit.
- WeightExtensions on Weight
- Provides humanizing extensions on Weight.
- WeightRateExtensions on WeightRate
- Provides humanizing extensions on WeightRate.
- WeightUnitExtensions on WeightUnit
- Contains extensions for WeightUnit.
Constants
- defaultRatePattern → const String
- The default pattern used to format rated unit of measurement values.
- defaultValuePattern → const String
- The default pattern used to format unit of measurement values.