ImageValue class

Représente une valeur d'image qui peut être un fichier local ou une URL distante. Utilisée pour unifier la gestion des images dans les formulaires et les composants UI.

Constructors

ImageValue.new({XFile? file, String? url, bool isChanged = false})
const
ImageValue.fromDynamic(dynamic value)
Crée une instance à partir d'une valeur dynamique (pour compatibilité avec JSON)
factory
ImageValue.fromFile(XFile file)
Crée une instance à partir d'un fichier local
factory
ImageValue.fromUrl(String url)
Crée une instance à partir d'une URL distante
factory

Properties

displayValue → dynamic
Retourne la valeur à utiliser pour l'affichage/prévisualisation
no setter
file → XFile?
Fichier local si disponible
final
hashCode int
The hash code for this object.
no setterinherited
isChanged bool
Indique si l'image a été modifiée (nouveau fichier sélectionné)
final
isValid bool
Vérifie si l'image est valide (a soit un fichier, soit une URL)
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
url String?
URL distante si disponible
final

Methods

copyWith({XFile? file, String? url, bool? isChanged}) ImageValue
Crée une copie avec des modifications optionnelles
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
Convertit en chaîne pour le débogage
override

Operators

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