dartboard_resume/lib/models/dartboard_misc.dart
2024-09-10 15:09:15 -06:00

27 lines
642 B
Dart

import 'package:dartboard_resume/models/document_text.dart';
class DartboardMisc {
DartboardMisc({required this.subsection, required this.attributes});
final String subsection;
final List<DocumentText> attributes;
@override
int get hashCode {
return Object.hashAll([subsection, ...attributes]);
}
@override
bool operator ==(Object other) {
return super.hashCode == other.hashCode;
}
static bool filter(dynamic e) {
if (e is! List || e.firstOrNull is! Map) {
return false;
}
final entries = (e.first as Map).entries;
return entries.length == 1 && entries.first.key == 'attributes';
}
}