operator == method

  1. @override
bool operator ==(
  1. Object other
)
override

Equality operator for comparing two DioImageProvider instances.

Two providers are considered equal if they have the same imageUrl and fallbackAssetPath. This is used by Flutter's image caching system to determine if two providers refer to the same image resource.

Implementation

@override
bool operator ==(Object other) {
  if (identical(this, other)) return true;
  if (runtimeType != other.runtimeType) return false;

  final DioImageProvider typedOther = other as DioImageProvider;
  return imageUrl == typedOther.imageUrl &&
      fallbackAssetPath == typedOther.fallbackAssetPath;
}