fixes and ui.dart
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:simplecloudnotifier/utils/toaster.dart';
|
||||
import 'package:simplecloudnotifier/utils/ui.dart';
|
||||
import 'package:toastification/toastification.dart';
|
||||
|
||||
class DebugActionsPage extends StatefulWidget {
|
||||
@@ -17,36 +18,40 @@ class _DebugActionsPageState extends State<DebugActionsPage> {
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.stretch,
|
||||
children: [
|
||||
FilledButton(
|
||||
style: FilledButton.styleFrom(textStyle: const TextStyle(fontSize: 20)),
|
||||
UI.button(
|
||||
big: false,
|
||||
onPressed: () => Toaster.success("Hello World", "This was a triumph!"),
|
||||
child: const Text('Show Success Notification'),
|
||||
text: 'Show Success Notification',
|
||||
),
|
||||
FilledButton(
|
||||
style: FilledButton.styleFrom(textStyle: const TextStyle(fontSize: 20)),
|
||||
SizedBox(height: 4),
|
||||
UI.button(
|
||||
big: false,
|
||||
onPressed: () => Toaster.info("Hello World", "This was a triumph!"),
|
||||
child: const Text('Show Info Notification'),
|
||||
text: 'Show Info Notification',
|
||||
),
|
||||
FilledButton(
|
||||
style: FilledButton.styleFrom(textStyle: const TextStyle(fontSize: 20)),
|
||||
SizedBox(height: 4),
|
||||
UI.button(
|
||||
big: false,
|
||||
onPressed: () => Toaster.warn("Hello World", "This was a triumph!"),
|
||||
child: const Text('Show Warn Notification'),
|
||||
text: 'Show Warn Notification',
|
||||
),
|
||||
FilledButton(
|
||||
style: FilledButton.styleFrom(textStyle: const TextStyle(fontSize: 20)),
|
||||
SizedBox(height: 4),
|
||||
UI.button(
|
||||
big: false,
|
||||
onPressed: () => Toaster.error("Hello World", "This was a triumph!"),
|
||||
child: const Text('Show Info Notification'),
|
||||
text: 'Show Info Notification',
|
||||
),
|
||||
FilledButton(
|
||||
style: FilledButton.styleFrom(textStyle: const TextStyle(fontSize: 20)),
|
||||
SizedBox(height: 4),
|
||||
UI.button(
|
||||
big: false,
|
||||
onPressed: () => Toaster.simple("Hello World"),
|
||||
child: const Text('Show Simple Notification'),
|
||||
text: 'Show Simple Notification',
|
||||
),
|
||||
SizedBox(height: 20),
|
||||
FilledButton(
|
||||
style: FilledButton.styleFrom(textStyle: const TextStyle(fontSize: 20)),
|
||||
UI.button(
|
||||
big: false,
|
||||
onPressed: _sendTokenToServer,
|
||||
child: const Text('Send FCM Token to Server'),
|
||||
text: 'Send FCM Token to Server',
|
||||
),
|
||||
],
|
||||
),
|
||||
|
@@ -4,6 +4,7 @@ import 'package:font_awesome_flutter/font_awesome_flutter.dart';
|
||||
import 'package:simplecloudnotifier/components/layout/scaffold.dart';
|
||||
import 'package:simplecloudnotifier/state/request_log.dart';
|
||||
import 'package:simplecloudnotifier/utils/toaster.dart';
|
||||
import 'package:simplecloudnotifier/utils/ui.dart';
|
||||
|
||||
class DebugRequestViewPage extends StatelessWidget {
|
||||
final SCNRequest request;
|
||||
@@ -55,17 +56,13 @@ class DebugRequestViewPage extends StatelessWidget {
|
||||
Expanded(
|
||||
child: Text(title, style: TextStyle(fontWeight: FontWeight.bold)),
|
||||
),
|
||||
IconButton(
|
||||
icon: FaIcon(
|
||||
FontAwesomeIcons.copy,
|
||||
),
|
||||
UI.buttonIconOnly(
|
||||
iconSize: 14,
|
||||
padding: EdgeInsets.fromLTRB(0, 0, 4, 0),
|
||||
constraints: BoxConstraints(),
|
||||
onPressed: () {
|
||||
Clipboard.setData(new ClipboardData(text: value));
|
||||
Clipboard.setData(new ClipboardData(text: title));
|
||||
Toaster.info("Clipboard", 'Copied text to Clipboard');
|
||||
},
|
||||
icon: FontAwesomeIcons.copy,
|
||||
),
|
||||
],
|
||||
),
|
||||
|
Reference in New Issue
Block a user