operator == method

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

Compares two DropDownModel objects based on their key.

This allows dropdown items to be compared for equality based on their unique key.

Implementation

@override
bool operator ==(Object other) {
  if (other.runtimeType != runtimeType) {
    return false;
  }
  return other is DropDownModel && key == other.key;
}