build method
Builds this component's renderable output.
App code can return a node, another component, text, or an iterable of renderable values. The renderer normalizes the value internally.
Implementation
@override
View build() {
return FlintElement(
'span',
props: mergeComponentProps(
props,
className: className,
defaultStyle: const {'position': 'relative', 'display': 'inline-flex'},
dartStyle: dartStyle,
style: style,
),
children: [
toFlintNode(trigger),
// Closed overlays must unmount instead of relying on `hidden`, so the
// floating panel cannot keep stale geometry or interactive DOM around.
if (open)
FlintElement(
'div',
props: {
'role': 'dialog',
'data-placement': placement,
'style': const {
'position': 'absolute',
'z-index': 30,
'min-width': '220px',
'padding': '12px',
'border': '1px solid #e4e7ec',
'border-radius': '8px',
'background': '#ffffff',
'box-shadow': '0 12px 24px rgba(16, 24, 40, 0.14)',
},
},
children: normalizeChildren(child, children),
),
],
);
}