forked from firka/firka
add copy jwt
This commit is contained in:
@@ -298,6 +298,26 @@ class _DebugScreen extends FirkaState<DebugScreen> {
|
||||
);
|
||||
},
|
||||
child: const Text('Epikus jegyszerzés (card face debug)'),
|
||||
),
|
||||
ElevatedButton(
|
||||
onPressed: () async {
|
||||
final token = widget.data.settings.getSelectedToken();
|
||||
if (token == null) {
|
||||
ScaffoldMessenger.of(context).showSnackBar(
|
||||
const SnackBar(content: Text('No token available to copy')),
|
||||
);
|
||||
return;
|
||||
}
|
||||
|
||||
await Clipboard.setData(
|
||||
ClipboardData(text: token.accessToken),
|
||||
);
|
||||
if (!context.mounted) return;
|
||||
ScaffoldMessenger.of(context).showSnackBar(
|
||||
const SnackBar(content: Text('Access token copied')),
|
||||
);
|
||||
},
|
||||
child: const Text('Copy JWT'),
|
||||
),
|
||||
ElevatedButton(
|
||||
onPressed: () {
|
||||
|
||||
Reference in New Issue
Block a user