Refactors
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
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';
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user