class TestDevice { final int id; final String name; TestDevice(this.id, this.name); @override bool operator ==(Object other) => identical(this, other) || other is TestDevice && id == other.id && name == other.name; @override int get hashCode => id.hashCode ^ name.hashCode; }