Switch to better notification library
This commit is contained in:
52
flutter/lib/pages/debug/debug_actions.dart
Normal file
52
flutter/lib/pages/debug/debug_actions.dart
Normal file
@@ -0,0 +1,52 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:simplecloudnotifier/utils/toaster.dart';
|
||||
import 'package:toastification/toastification.dart';
|
||||
|
||||
class DebugActionsPage extends StatefulWidget {
|
||||
@override
|
||||
_DebugActionsPageState createState() => _DebugActionsPageState();
|
||||
}
|
||||
|
||||
class _DebugActionsPageState extends State<DebugActionsPage> {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Container(
|
||||
child: SingleChildScrollView(
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 12),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.stretch,
|
||||
children: [
|
||||
ElevatedButton(
|
||||
style: ElevatedButton.styleFrom(textStyle: const TextStyle(fontSize: 20)),
|
||||
onPressed: () => Toaster.success("Hello World", "This was a triumph!"),
|
||||
child: const Text('Show Success Notification'),
|
||||
),
|
||||
ElevatedButton(
|
||||
style: ElevatedButton.styleFrom(textStyle: const TextStyle(fontSize: 20)),
|
||||
onPressed: () => Toaster.info("Hello World", "This was a triumph!"),
|
||||
child: const Text('Show Info Notification'),
|
||||
),
|
||||
ElevatedButton(
|
||||
style: ElevatedButton.styleFrom(textStyle: const TextStyle(fontSize: 20)),
|
||||
onPressed: () => Toaster.warn("Hello World", "This was a triumph!"),
|
||||
child: const Text('Show Warn Notification'),
|
||||
),
|
||||
ElevatedButton(
|
||||
style: ElevatedButton.styleFrom(textStyle: const TextStyle(fontSize: 20)),
|
||||
onPressed: () => Toaster.error("Hello World", "This was a triumph!"),
|
||||
child: const Text('Show Info Notification'),
|
||||
),
|
||||
ElevatedButton(
|
||||
style: ElevatedButton.styleFrom(textStyle: const TextStyle(fontSize: 20)),
|
||||
onPressed: () => Toaster.simple("Hello World"),
|
||||
child: const Text('Show Simple Notification'),
|
||||
),
|
||||
SizedBox(height: 20),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user