toastViewport function
Viewport container mounted at application root to render active toasts.
Implementation
BloomNode toastViewport() {
return Live(() {
final list = toastList.value;
if (list.isEmpty) return const Fragment(children: []);
return Div(
className:
'fixed bottom-4 right-4 z-50 flex flex-col gap-2 max-w-sm w-full pointer-events-none px-4 sm:px-0',
children: list.map((t) => _toastCard(t)).toList(),
);
});
}