Components
Toast
Surface snackbar stack aligned with HeroUI v3 toast region — shadow card, semantic title, muted description, indicator, action, and close.
Wrap your app with RiseToast.wrap in MaterialApp.builder so overlays paint above routes. Defaults mirror HeroUI constants.ts (DEFAULT_TOAST_TIMEOUT 4000 ms, DEFAULT_GAP 12, DEFAULT_MAX_VISIBLE_TOAST 3, DEFAULT_TOAST_WIDTH 460).
HeroUI story parity
Default / Accent (`toast.info`) / Success / Warning / Danger with description, indicator, and action — mirrors Storybook `Template`.
RiseToast.show(
context,
variant: RiseToastVariant.default_,
title: 'You have been invited to join a team',
description: 'Bob sent you an invitation to join HeroUI team',
indicator: Icon(Icons.people_outline, size: 16),
action: RiseToastAction(
label: 'Dismiss',
onPressed: RiseToast.clear,
),
);Placements
`RiseToastPlacement`: top · top-start · top-end · bottom · bottom-start · bottom-end (toast-region placements in toast.css).
RiseToast.show(
context,
title: 'Placement: Top start',
placement: RiseToastPlacement.topStart,
);Loading
`isLoading: true` shows [RiseSpinner] in the indicator slot; `duration: Duration.zero` keeps the toast until dismissed.
RiseToast.show(
context,
title: 'Saving…',
showDefaultIndicator: false,
isLoading: true,
duration: Duration.zero,
);