IntExtension extension
- on
-
- int?
Methods
-
formatDate(
{String toFormat = 'dd MM yyyy'}) → String? -
Available on int?, provided by the IntExtension extension
Formats the integer (assumed as millisecondsSinceEpoch) using a specifiedtoFormat. -
isExpired(
) → bool -
Available on int?, provided by the IntExtension extension
Returnstrueif the timestamp (millisecondsSinceEpoch) has already passed. -
isExpiredWith(
{Duration grace = Duration.zero}) → bool -
Available on int?, provided by the IntExtension extension
Returnstrueif the timestamp plus a givengraceduration has already passed. -
isNegative(
) → bool -
Available on int?, provided by the IntExtension extension
Returns true if the integer is less than zero. -
isPositive(
) → bool -
Available on int?, provided by the IntExtension extension
Returns true if the integer is greater than zero. -
safe(
) → int -
Available on int?, provided by the IntExtension extension
Returns the integer value or 0 if null. -
toCurrency(
{CurrencyCountry country = CurrencyCountry.ID, bool usingSymbol = true, int decimalDigits = 0}) → String -
Available on int?, provided by the IntExtension extension
Converts the integer into a formatted currency string using CurrencyCountry. -
toDate(
) → DateTime? -
Available on int?, provided by the IntExtension extension
Converts the integer (assumed as millisecondsSinceEpoch) to a DateTime. -
toPercentage(
{required int total, int fixInto = 2}) → String? -
Available on int?, provided by the IntExtension extension
Converts the integer to a percentage. based on total Example: -
toRupiah(
{bool usingSymbol = true}) → String -
Available on int?, provided by the IntExtension extension
Converts the integer (assumed as monetary value) into Indonesian Rupiah format.