Message class
- Available extensions
Constructors
- Message.new({required String text, bool isUser = false, Uint8List? imageBytes, MessageType type = MessageType.text, String? toolName})
-
const
- Message.imageOnly({required Uint8List imageBytes, bool isUser = false, String text = ''})
-
factory
- Message.systemInfo({required String text, String? icon})
-
factory
- Message.text({required String text, bool isUser = false})
-
factory
- Message.thinking({required String text})
-
factory
- Message.toolCall({required String text})
-
factory
-
Message.toolResponse({required String toolName, required Map<
String, dynamic> response}) -
factory
- Message.withImage({required String text, required Uint8List imageBytes, bool isUser = false})
-
factory
Properties
Methods
-
copyWith(
{String? text, bool? isUser, Uint8List? imageBytes, MessageType? type, String? toolName}) → Message -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
override
-
transformToChatPrompt(
{ModelType type = ModelType.general, ModelFileType fileType = ModelFileType.binary}) → String -
Available on Message, provided by the MessageExtension extension
Operators
-
operator ==(
Object other) → bool -
The equality operator.
override