MessageFormatter class

Utility class for formatting messages and timestamps

Constructors

MessageFormatter()

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

formatFileSize(int bytes) → String
Formats file size in a human-readable format
formatMessagePreview(String message, {int maxLength = 30}) → String
Formats a message for preview (truncates long messages)
formatMessageStatus(String status) → String
Formats the display of message status
formatTimestamp(DateTime timestamp, {bool showDate = false}) → String
Formats a timestamp for display in the chat UI
getGreeting() → String
Returns the appropriate greeting based on time of day
timeAgo(DateTime timestamp) → String
Returns a short representation of time ago