mirror of
https://github.com/JGeek00/adguard-home-manager.git
synced 2025-06-28 20:09:51 +00:00
Added block/unblock domain and copy to clipboard on logs
This commit is contained in:
parent
7fc68ec8c6
commit
58d6da2d9e
3 changed files with 107 additions and 15 deletions
20
lib/functions/copy_clipboard.dart
Normal file
20
lib/functions/copy_clipboard.dart
Normal file
|
@ -0,0 +1,20 @@
|
|||
// ignore_for_file: use_build_context_synchronously
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
|
||||
void copyToClipboard({
|
||||
required BuildContext context,
|
||||
required String value,
|
||||
required String successMessage
|
||||
}) async {
|
||||
await Clipboard.setData(
|
||||
ClipboardData(text: value)
|
||||
);
|
||||
ScaffoldMessenger.of(context).showSnackBar(
|
||||
SnackBar(
|
||||
content: Text(successMessage),
|
||||
backgroundColor: Colors.green,
|
||||
)
|
||||
);
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue