Toast
Temporary notification popups that appear and disappear automatically.
Installation
bash
flutter_studio add toastbash
flutter pub add flutter_studioUsage
dart
CustomToast.show(
context,
message: 'File saved successfully',
type: ToastType.success,
)Toast Types
dart
// Success toast
CustomToast.show(
context,
message: 'Success!',
type: ToastType.success,
)
// Error toast
CustomToast.show(
context,
message: 'Error occurred',
type: ToastType.error,
)
// Info toast
CustomToast.show(
context,
message: 'Did you know?',
type: ToastType.info,
)API Reference
Properties
| Property | Type | Default | Description |
|---|---|---|---|
message | String | required | Toast message |
type | ToastType | info | Toast type |
duration | Duration | 3s | Display duration |
