dvStudioEffectiveProperties function
Map<String, Object?>
dvStudioEffectiveProperties(
- DVPageNode node, [
- Map<
String, Object?> ? properties
The properties node is drawn and exported with.
A node's own, except for a button that sets no fill, border or padding at all -- one stored before the palette styled its buttons -- which takes dvStudioButtonDefaults under them rather than rendering as a bare word.
properties are the node's at one breakpoint, when not its base ones.
Implementation
Map<String, Object?> dvStudioEffectiveProperties(
DVPageNode node, [
Map<String, Object?>? properties,
]) {
final Map<String, Object?> own = properties ?? node.properties;
if (node.type != 'button') return own;
const Set<String> look = <String>{
'backgroundColor',
'gradientFrom',
'borderColor',
'borderWidth',
'padding',
'paddingTop',
'paddingBottom',
'paddingLeft',
'paddingRight',
'decoration',
'card',
};
if (own.keys.any(look.contains)) return own;
return <String, Object?>{...dvStudioButtonDefaults, ...own};
}