mirror of
https://git.selfprivacy.org/kherel/selfprivacy.org.app.git
synced 2024-11-12 19:53:51 +00:00
feat: proper separate getter for clipboard content
This commit is contained in:
parent
47f3d5f53c
commit
6eb5299d46
|
@ -33,7 +33,7 @@ sealed class ConsoleLog {
|
||||||
|
|
||||||
/// data available for copy in dialog
|
/// data available for copy in dialog
|
||||||
String? get shareableData => '$title\n'
|
String? get shareableData => '$title\n'
|
||||||
'$content';
|
'{\n$content\n}';
|
||||||
|
|
||||||
static final DateFormat _formatter = DateFormat('hh:mm:ss');
|
static final DateFormat _formatter = DateFormat('hh:mm:ss');
|
||||||
String get timeString => _formatter.format(time);
|
String get timeString => _formatter.format(time);
|
||||||
|
|
|
@ -112,7 +112,7 @@ class ConsoleItemDialog extends StatelessWidget {
|
||||||
// A button to copy the request to the clipboard
|
// A button to copy the request to the clipboard
|
||||||
if (log.shareableData?.isNotEmpty ?? false)
|
if (log.shareableData?.isNotEmpty ?? false)
|
||||||
TextButton(
|
TextButton(
|
||||||
onPressed: () => PlatformAdapter.setClipboard(log.content),
|
onPressed: () => PlatformAdapter.setClipboard(log.shareableData!),
|
||||||
child: Text('console_page.copy'.tr()),
|
child: Text('console_page.copy'.tr()),
|
||||||
),
|
),
|
||||||
// close dialog
|
// close dialog
|
||||||
|
|
Loading…
Reference in a new issue