getBlocks method
Returns all the blocks contained in this EasyAttributeStyles
Implementation
EasyAttributeStyles getBlocks({bool getOnlyDefaults = false}) {
final Map<String, EasyAttribute<Object?>> blocks = getAll({
EasyAttribute.codeblock.key,
EasyAttribute.blockquote.key,
EasyAttribute.list.key,
EasyAttribute.header.key,
if (!getOnlyDefaults)
...values.map<String>((e) => e.isInline ? '' : e.key),
}).map<Map<String, EasyAttribute<Object?>>>(
(EasyAttribute<Object?> element) {
return <String, EasyAttribute<Object?>>{element.key: element};
}).reduce((Map<String, EasyAttribute<Object?>> a,
Map<String, EasyAttribute<Object?>> b) =>
<String, EasyAttribute<Object?>>{...a, ...b});
return EasyAttributeStyles(
attributes: blocks,
);
}