MultimodalImageHandler class

Main integration class for handling multimodal image processing in Flutter Gemma to prevent AI image corruption and repeating text pattern issues.

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

createDiagnosticReport({required Uint8List imageBytes, required ModelType modelType, String? processedBase64, String? prompt, String? response}) DiagnosticReport
Creates a diagnostic report for troubleshooting
createMultimodalMessage({required String text, required ProcessedImage processedImage, required ModelType modelType, bool isUser = true}) Message
Creates a properly formatted message for multimodal AI models
createTokenizedPrompt({required String text, required ProcessedImage processedImage, required ModelType modelType}) String
Creates a properly tokenized prompt for the AI model
extractBase64FromPrompt(String prompt) String?
Utility method to safely extract Base64 from various formats
processImageForAI({required Uint8List imageBytes, required ModelType modelType, String? originalFormat, bool enableValidation = true, bool enableProcessing = true}) Future<MultimodalImageResult>
Processes and validates an image for use with AI models
validateModelResponse(String response, {required String originalPrompt, required ProcessedImage? processedImage}) ResponseValidationResult
Validates and handles model responses for corruption patterns