Formatters class

Utility class for formatting data for WhatsApp Cloud API.

Properties

hashCode int
The hash code for this object.
no setterinherited
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

Static Methods

formatCurrency(int amount, String currencyCode) String
Formats a currency amount for display.
formatFileSize(int sizeInBytes) String
Formats a file size for display.
formatJson(Map<String, dynamic> jsonObject) String
Formats a JSON object for pretty printing.
formatPhoneNumber(String phoneNumber) String
Formats a phone number for WhatsApp API.
formatTimestamp(DateTime timestamp, {bool includeTime = true}) String
Formats a timestamp for display.
sanitizeText(String text) String
Sanitizes text for use in WhatsApp messages.
truncateString(String text, int maxLength) String
Truncates a string to a maximum length with ellipsis.