2024-05-31 23:21:24 +02:00
|
|
|
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: [
|
2024-06-01 03:06:02 +02:00
|
|
|
FilledButton(
|
|
|
|
style: FilledButton.styleFrom(textStyle: const TextStyle(fontSize: 20)),
|
2024-05-31 23:21:24 +02:00
|
|
|
onPressed: () => Toaster.success("Hello World", "This was a triumph!"),
|
|
|
|
child: const Text('Show Success Notification'),
|
|
|
|
),
|
2024-06-01 03:06:02 +02:00
|
|
|
FilledButton(
|
|
|
|
style: FilledButton.styleFrom(textStyle: const TextStyle(fontSize: 20)),
|
2024-05-31 23:21:24 +02:00
|
|
|
onPressed: () => Toaster.info("Hello World", "This was a triumph!"),
|
|
|
|
child: const Text('Show Info Notification'),
|
|
|
|
),
|
2024-06-01 03:06:02 +02:00
|
|
|
FilledButton(
|
|
|
|
style: FilledButton.styleFrom(textStyle: const TextStyle(fontSize: 20)),
|
2024-05-31 23:21:24 +02:00
|
|
|
onPressed: () => Toaster.warn("Hello World", "This was a triumph!"),
|
|
|
|
child: const Text('Show Warn Notification'),
|
|
|
|
),
|
2024-06-01 03:06:02 +02:00
|
|
|
FilledButton(
|
|
|
|
style: FilledButton.styleFrom(textStyle: const TextStyle(fontSize: 20)),
|
2024-05-31 23:21:24 +02:00
|
|
|
onPressed: () => Toaster.error("Hello World", "This was a triumph!"),
|
|
|
|
child: const Text('Show Info Notification'),
|
|
|
|
),
|
2024-06-01 03:06:02 +02:00
|
|
|
FilledButton(
|
|
|
|
style: FilledButton.styleFrom(textStyle: const TextStyle(fontSize: 20)),
|
2024-05-31 23:21:24 +02:00
|
|
|
onPressed: () => Toaster.simple("Hello World"),
|
|
|
|
child: const Text('Show Simple Notification'),
|
|
|
|
),
|
|
|
|
SizedBox(height: 20),
|
2024-06-02 16:27:03 +02:00
|
|
|
FilledButton(
|
|
|
|
style: FilledButton.styleFrom(textStyle: const TextStyle(fontSize: 20)),
|
|
|
|
onPressed: _sendTokenToServer,
|
|
|
|
child: const Text('Send FCM Token to Server'),
|
|
|
|
),
|
2024-05-31 23:21:24 +02:00
|
|
|
],
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
);
|
|
|
|
}
|
2024-06-02 16:27:03 +02:00
|
|
|
|
|
|
|
void _sendTokenToServer() {
|
|
|
|
//TODO
|
|
|
|
}
|
2024-05-31 23:21:24 +02:00
|
|
|
}
|