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.
fluffychat/lib/pangea/constructs/construct_form.dart

39 lines
809 B
Dart

import 'package:fluffychat/pangea/constructs/construct_identifier.dart';
class ConstructForm {
/// Form of the construct
final String form;
/// The constructIdenfifier
final ConstructIdentifier cId;
ConstructForm({
required this.form,
required this.cId,
});
@override
bool operator ==(Object other) {
if (identical(this, other)) return true;
return other is ConstructForm && other.form == form && other.cId == cId;
}
@override
int get hashCode => form.hashCode ^ cId.hashCode;
factory ConstructForm.fromJson(Map<String, dynamic> json) {
return ConstructForm(
form: json['form'],
cId: ConstructIdentifier.fromJson(json['cId']),
);
}
Map<String, dynamic> toJson() {
return {
'form': form,
'cId': cId.toJson(),
};
}
}