You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
cloudsolutions-atoms/lib/modules/signup/models/group_model.dart

36 lines
717 B
Dart

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<String, dynamic> json) {
return Group(
code: json['code'],
displayName: json['displayName'],
);
}
Map<String, dynamic> 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;
}