glass_toast_flutter 0.0.1
glass_toast_flutter: ^0.0.1 copied to clipboard
A Flutter package for displaying beautiful glass-morphism toast notifications with blur effect and smooth animations.
Transparent Toast Mirror #
A Flutter package for displaying beautiful glass-morphism toast notifications with blur effect and smooth animations.
Features #
- π¨ Beautiful glass-morphism effect
- π Blur effect for modern look
- β‘ Smooth fade animations
- π± Multiple position options (top, center, bottom)
- π― Customizable appearance
- π Lightweight and easy to use
Installation #
Add the following to your pubspec.yaml:
dependencies:
transparent_toast_mirror: ^0.0.1
Then run:
flutter pub get
Usage #
import 'package:transparent_toast_mirror/transparent_toast_mirror.dart';
// Show a simple toast
TransparentToastMirror.show(
context,
'Hello, World!',
);
// Show a toast with custom options
TransparentToastMirror.show(
context,
'Custom Toast',
position: GlassToastPosition.center,
duration: Duration(seconds: 3),
backgroundColor: Colors.blue,
backgroundOpacity: 0.7,
);
Parameters #
| Parameter | Type | Default | Description |
|---|---|---|---|
| context | BuildContext | required | The BuildContext of the current widget |
| message | String | required | The text to display in the toast |
| duration | Duration | 2 seconds | How long the toast should be visible |
| position | GlassToastPosition | bottom | Where the toast should appear |
| backgroundColor | Color | Colors.black | The color of the toast background |
| backgroundOpacity | double | 0.5 | The opacity of the background |
GlassToastPosition #
top: Shows the toast at the top of the screencenter: Shows the toast in the center of the screenbottom: Shows the toast at the bottom of the screen
Contributing #
Contributions are welcome! Please feel free to submit a Pull Request.
License #
This project is licensed under the MIT License - see the LICENSE file for details.