MFormat enum
Value formatting modes for text bindings. How a bound numeric value is rendered.
percent treats the value as a fraction (0.15 → 15%), matching
NumberFormat.getPercentInstance and SwiftUI's .percent. Most web APIs
instead return a change already expressed in percent units (1.33 meaning
1.33%) — use signedPercent for those, or they render 100× too large.
Values
- decimal → const MFormat
-
Locale-grouped number:
1234.5→1,234.5. - currency → const MFormat
-
Locale currency:
1234.5→$1,234.50. - percent → const MFormat
-
Fraction as a percentage:
0.15→15%. - signedPercent → const MFormat
-
A signed change already in percent units:
1.327679→+1.33%,-0.4→-0.94%. Two decimals, explicit sign, no scaling — the shape almost every finance and analytics API returns. - date → const MFormat
-
Epoch milliseconds as a date.
- relativeTime → const MFormat
-
Epoch milliseconds as "3 hours ago".
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- index → int
-
A numeric identifier for the enumerated value.
no setterinherited
- name → String
-
Available on Enum, provided by the EnumName extension
The name of the enum value.no setter - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited