MessageFormatter class abstract
An interface to convert a Map<String, dynamic> (JSON) into a readable
text message. You can implement this class to create your own custom
message formatters.
Example:
class MyCustomFormatter implements MessageFormatter {
@override
String format(Map<String, dynamic> data, {ParseMode parseMode = ParseMode.MarkdownV2}) {
// Your custom formatting logic here.
return "Report: ${data['title']}";
}
}
- Implementers
Constructors
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
-
format(
Map< String, dynamic> data, {ParseMode parseMode}) → String - Converts the given map into a formatted string according to the specified parse mode.
-
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