mirror of
https://github.com/gabehf/Fladder.git
synced 2026-03-17 19:26:35 -07:00
feature: More info playback state (#219)
Co-authored-by: PartyDonut <PartyDonut@users.noreply.github.com>
This commit is contained in:
parent
cf53f02d90
commit
f259151336
7 changed files with 112 additions and 186 deletions
17
lib/util/clipboard_helper.dart
Normal file
17
lib/util/clipboard_helper.dart
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
|
||||
import 'package:fladder/screens/shared/fladder_snackbar.dart';
|
||||
import 'package:fladder/util/localization_helper.dart';
|
||||
|
||||
extension ClipboardHelper on BuildContext {
|
||||
Future<void> copyToClipboard(String value, {String? customMessage}) async {
|
||||
await Clipboard.setData(ClipboardData(text: value));
|
||||
if (mounted) {
|
||||
fladderSnackbar(
|
||||
this,
|
||||
title: customMessage ?? localized.copiedToClipboard,
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue