BloomIsland constructor
BloomIsland({})
Creates a server-side island placeholder descriptor.
Implementation
BloomIsland({
required String name,
BloomNode? child,
List<BloomNode>? children,
HydrationStrategy strategy = HydrationStrategy.immediate,
Map<String, dynamic>? props,
String? rootMargin,
String? media,
String tag = 'div',
String? className,
String? style,
Map<String, String>? attrs,
}) : super(
tag,
className: className,
style: style,
attrs: {
if (attrs != null) ...attrs,
bloomIslandAttribute: name,
if (strategy != HydrationStrategy.immediate)
bloomStrategyAttribute: strategy.value,
if (props != null && props.isNotEmpty)
bloomPropsAttribute: jsonEncode(props),
if (rootMargin != null)
bloomRootMarginAttribute: rootMargin,
if (media != null)
bloomMediaAttribute: media,
},
children: [
if (child != null) child,
if (children != null) ...children,
],
);