Add clear button to logs
This commit is contained in:
parent
a2e70f7dff
commit
b3718932e1
@ -458,7 +458,27 @@ class _MyHomePageState extends State<MyHomePage> {
|
|||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
final actionButtonLogs = FloatingActionButton(
|
final actionButtonLogs = Row(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.end,
|
||||||
|
children: [
|
||||||
|
Padding(
|
||||||
|
padding: EdgeInsets.only(right: 30),
|
||||||
|
child: FloatingActionButton(
|
||||||
|
onPressed: () {
|
||||||
|
// Clear the logs
|
||||||
|
widget.errorNotifier.value = null;
|
||||||
|
ScaffoldMessenger.of(context).showSnackBar(
|
||||||
|
SnackBar(
|
||||||
|
content: Text("Logs cleared."),
|
||||||
|
duration: const Duration(seconds: 3),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
},
|
||||||
|
tooltip: 'Clear Logs',
|
||||||
|
child: const Icon(Icons.delete),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
FloatingActionButton(
|
||||||
onPressed: () {
|
onPressed: () {
|
||||||
// Copy the logs to the clipboard
|
// Copy the logs to the clipboard
|
||||||
final error = widget.errorNotifier.value;
|
final error = widget.errorNotifier.value;
|
||||||
@ -484,6 +504,8 @@ class _MyHomePageState extends State<MyHomePage> {
|
|||||||
},
|
},
|
||||||
tooltip: 'Copy Logs',
|
tooltip: 'Copy Logs',
|
||||||
child: const Icon(Icons.copy),
|
child: const Icon(Icons.copy),
|
||||||
|
),
|
||||||
|
],
|
||||||
);
|
);
|
||||||
|
|
||||||
final actionButtonInfo = FloatingActionButton(
|
final actionButtonInfo = FloatingActionButton(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user