import 'package:test_sa/models/base.dart'; class Group extends Base { final String? code; final String? displayName; Group({ this.code, this.displayName, }) : super(identifier: code, name: displayName); factory Group.fromJson(Map json) { return Group( code: json['code'], displayName: json['displayName'], ); } Map toJson() { return { 'code': code, 'displayName': displayName, }; } @override bool operator ==(Object other) => identical(this, other) || other is Group && runtimeType == other.runtimeType && code == other.code; @override int get hashCode => code.hashCode; }