28 lines
793 B
Dart
28 lines
793 B
Dart
import 'package:flutter/material.dart';
|
|
|
|
class ClearConfirmDialog extends StatelessWidget {
|
|
const ClearConfirmDialog({super.key});
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return AlertDialog(
|
|
title: const Text('Clear all data?'),
|
|
content: const Text(
|
|
'This will discard all packets and log entries currently in memory. '
|
|
'Cannot be undone.',
|
|
),
|
|
actions: [
|
|
TextButton(
|
|
onPressed: () => Navigator.of(context).pop(false),
|
|
child: const Text('Cancel'),
|
|
),
|
|
FilledButton(
|
|
onPressed: () => Navigator.of(context).pop(true),
|
|
style:
|
|
FilledButton.styleFrom(backgroundColor: Colors.red.shade700),
|
|
child: const Text('Clear all'),
|
|
),
|
|
],
|
|
);
|
|
}
|
|
} |