custom_toaster_plus 0.0.2
custom_toaster_plus: ^0.0.2 copied to clipboard
Toaster by bright roots. Use toaster for customization and have creative toasts
example/main.dart
import 'package:flutter/material.dart';
import 'package:custom_toaster_plus/custom_toaster_plus.dart';
void main() {
runApp(const ToastExampleApp());
}
class ToastExampleApp extends StatelessWidget {
const ToastExampleApp({super.key});
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Custom Toast Demo',
home: const ToastDemoPage(),
);
}
}
class ToastDemoPage extends StatelessWidget {
const ToastDemoPage({super.key});
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(title: const Text('Custom Toast Demo')),
body: Center(
child: ElevatedButton(
onPressed: () => CustomToast.show(
context,
message: "Toast with Custom Style",
backgroundColor: Colors.blue,
borderRadius: 40,
icon: Icons.ac_unit,
fromBottom: true,
),
child: const Text("Show Custom Bottom Toast"),
),
),
);
}
}