class Cargo { String type; int price; int weight; Cargo({this.type, this.price, this.weight}); @override String toString() { return type; } @override bool operator ==(Object other) => other is Cargo && other.type == type; @override int get hashCode => type.hashCode; }