Toast | jaspr_daisyui_components
jaspr_daisyui_components
pub.dev ↗

Toast

Toast is a wrapper to stack elements, positioned on the corner of page.

Class name Type Description
toast Component Container element that sticks to the corner of page
toast-start Placement align horizontally to the left
toast-center Placement align horizontally to the center
toast-end Placement align horizontally to the right
toast-top Placement align vertically to top
toast-middle Placement align vertically to middle
toast-bottom Placement align vertically to bottom

toast with alert inside

New message arrived.
<div class="toast">
  <div class="alert alert-info">
    <span>New message arrived.</span>
  </div>
</div>
Toast([Alert([span([Component.text('New message arrived.')])], color: AlertColor.info)]);

toast-top toast-start

New mail arrived.
Message sent successfully.
<div class="toast toast-top toast-start">
  <div class="alert alert-info">
    <span>New mail arrived.</span>
  </div>
  <div class="alert alert-success">
    <span>Message sent successfully.</span>
  </div>
</div>
Toast(
  [
    Alert([span([Component.text('New mail arrived.')])], color: AlertColor.info),
    Alert([span([Component.text('Message sent successfully.')])], color: AlertColor.success),
  ],
  placement: ToastPlacement.top,
);

toast-top toast-center

New mail arrived.
Message sent successfully.
<div class="toast toast-top toast-center">
  <div class="alert alert-info">
    <span>New mail arrived.</span>
  </div>
  <div class="alert alert-success">
    <span>Message sent successfully.</span>
  </div>
</div>
Toast(
  [
    Alert([span([Component.text('New mail arrived.')])], color: AlertColor.info),
    Alert([span([Component.text('Message sent successfully.')])], color: AlertColor.success),
  ],
  placement: ToastPlacement.top,
);

toast-top toast-end

New mail arrived.
Message sent successfully.
<div class="toast toast-top toast-end">
  <div class="alert alert-info">
    <span>New mail arrived.</span>
  </div>
  <div class="alert alert-success">
    <span>Message sent successfully.</span>
  </div>
</div>
Toast(
  [
    Alert([span([Component.text('New mail arrived.')])], color: AlertColor.info),
    Alert([span([Component.text('Message sent successfully.')])], color: AlertColor.success),
  ],
  placement: ToastPlacement.top,
);

toast-start toast-middle

New mail arrived.
Message sent successfully.
<div class="toast toast-start toast-middle">
  <div class="alert alert-info">
    <span>New mail arrived.</span>
  </div>
  <div class="alert alert-success">
    <span>Message sent successfully.</span>
  </div>
</div>
Toast(
  [
    Alert([span([Component.text('New mail arrived.')])], color: AlertColor.info),
    Alert([span([Component.text('Message sent successfully.')])], color: AlertColor.success),
  ],
  placement: ToastPlacement.start,
);

toast-center toast-middle

New mail arrived.
Message sent successfully.
<div class="toast toast-center toast-middle">
  <div class="alert alert-info">
    <span>New mail arrived.</span>
  </div>
  <div class="alert alert-success">
    <span>Message sent successfully.</span>
  </div>
</div>
Toast(
  [
    Alert([span([Component.text('New mail arrived.')])], color: AlertColor.info),
    Alert([span([Component.text('Message sent successfully.')])], color: AlertColor.success),
  ],
  placement: ToastPlacement.center,
);

toast-end toast-middle

New mail arrived.
Message sent successfully.
<div class="toast toast-end toast-middle">
  <div class="alert alert-info">
    <span>New mail arrived.</span>
  </div>
  <div class="alert alert-success">
    <span>Message sent successfully.</span>
  </div>
</div>
Toast(
  [
    Alert([span([Component.text('New mail arrived.')])], color: AlertColor.info),
    Alert([span([Component.text('Message sent successfully.')])], color: AlertColor.success),
  ],
  placement: ToastPlacement.end,
);

toast-start toast-bottom (default)

New mail arrived.
Message sent successfully.
<div class="toast toast-start">
  <div class="alert alert-info">
    <span>New mail arrived.</span>
  </div>
  <div class="alert alert-success">
    <span>Message sent successfully.</span>
  </div>
</div>
Toast(
  [
    Alert([span([Component.text('New mail arrived.')])], color: AlertColor.info),
    Alert([span([Component.text('Message sent successfully.')])], color: AlertColor.success),
  ],
  placement: ToastPlacement.start,
);

toast-center toast-bottom (default)

New mail arrived.
Message sent successfully.
<div class="toast toast-center">
  <div class="alert alert-info">
    <span>New mail arrived.</span>
  </div>
  <div class="alert alert-success">
    <span>Message sent successfully.</span>
  </div>
</div>
Toast(
  [
    Alert([span([Component.text('New mail arrived.')])], color: AlertColor.info),
    Alert([span([Component.text('Message sent successfully.')])], color: AlertColor.success),
  ],
  placement: ToastPlacement.center,
);

toast-end (default) toast-bottom (default)

New mail arrived.
Message sent successfully.
<div class="toast toast-end">
  <div class="alert alert-info">
    <span>New mail arrived.</span>
  </div>
  <div class="alert alert-success">
    <span>Message sent successfully.</span>
  </div>
</div>
Toast(
  [
    Alert([span([Component.text('New mail arrived.')])], color: AlertColor.info),
    Alert([span([Component.text('Message sent successfully.')])], color: AlertColor.success),
  ],
  placement: ToastPlacement.end,
);