Message class

Available extensions

Constructors

Message.new({required String text, bool isUser = false, Uint8List? imageBytes})
const
Message.imageOnly({required Uint8List imageBytes, bool isUser = false, String text = ''})
factory
Message.text({required String text, bool isUser = false})
factory
Message.withImage({required String text, required Uint8List imageBytes, bool isUser = false})
factory

Properties

hashCode int
The hash code for this object.
no setteroverride
hasImage bool
no setter
imageBytes Uint8List?
final
isUser bool
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
text String
final

Methods

copyWith({String? text, bool? isUser, Uint8List? imageBytes}) 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({required ModelType type}) String
transformToChatPrompt({ModelType type = ModelType.general}) String

Available on Message, provided by the MessageExtension extension

Operators

operator ==(Object other) bool
The equality operator.
override