getPossibleEntries method
Implementation
List<CSSEntry> getPossibleEntries() {
var list = [
_getEntry('color', sampleValue: CSSColor.parse('#000000')),
_getEntry(
'background-color',
sampleValue: CSSColor.parse('rgba(0,0,0, 0.50)'),
),
_getEntry(
'width',
sampleValue: CSSLength(1),
defaultValue: CSSGeneric('auto'),
),
_getEntry(
'height',
sampleValue: CSSLength(1),
defaultValue: CSSGeneric('auto'),
),
_getEntry('border', sampleValue: CSSBorder.parse('1px solid #000000')),
_getEntry('opacity', sampleValue: CSSNumber(1)),
_getEntry('display', sampleValue: CSSGeneric('inline')),
];
var map = LinkedHashMap<String, CSSEntry>.fromEntries(
list
.where((e) => e != null)
.whereType<CSSEntry<CSSValue>>()
.map((e) => MapEntry(e.name, e)),
);
for (var entry in _entries.values) {
if (map.containsKey(entry.name)) {
continue;
}
map[entry.name] = entry;
}
return map.values.toList();
}