Toast

toast

Toast notifications are small messages, based on user actions. It can be used to provide feedback about an operation or to display a system message.

Usage

XelaToast(
  title: "Changes saved",
  firstActionButton: XelaButton(removePaddings: true, onPressed: (){}, text: "Undo", background: Colors.transparent, foregroundColor: XelaColor.Blue3,),
  rightButton: XelaButton(leftIcon: Icon(Icons.clear, color: XelaColor.Gray2, size: 20,), onPressed: () {  }, size: XelaButtonSize.SMALL, background: Colors.transparent,),
  background: XelaColor.Gray12,
  titleColor: XelaColor.Gray2,
  descriptionColor: XelaColor.Gray6,
)

Properties

Name Type Default Value Required Description
title String - YES Toast title string
description String? null NO Toast description string
icon Widget? null NO Toast icon widget
avatar XelaUserAvatar? null NO Avatar for toast
rightButton Widget? null NO Right button for toast
firstActionButton Widget? null NO First action widget
secondActionButton Widget? null NO Second action widget
autoresize bool false NO Autoresize width for toast
background Color Colors.white NO Toast background color
titleColor Color XelaColor.Gray2 NO Title text color
descriptionColor Color XelaColor.Gray6 NO Description text color