Skip to content

Commit

Permalink
Add copy key to clipboard on Mfkey32 page (#211)
Browse files Browse the repository at this point in the history
  • Loading branch information
GameTec-live authored Sep 4, 2023
1 parent 01649fb commit b3575a6
Showing 1 changed file with 13 additions and 5 deletions.
18 changes: 13 additions & 5 deletions chameleonultragui/lib/gui/page/mfkey32.dart
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import 'package:file_picker/file_picker.dart';
import 'package:file_saver/file_saver.dart';
import 'package:chameleonultragui/gui/menu/dictionary_edit.dart';
import 'package:chameleonultragui/sharedprefsprovider.dart';
import 'package:flutter/services.dart';

// Localizations
import 'package:flutter_gen/gen_l10n/app_localizations.dart';
Expand Down Expand Up @@ -99,13 +100,20 @@ class Mfkey32PageState extends State<Mfkey32Page> {
),
),
const SizedBox(width: 8.0),
Text(
"block $block key $key: ${bytesToHex(u64ToBytes((recoveredKey)[0]).sublist(2, 8)).toUpperCase()}",
style: const TextStyle(
fontSize: 16,
fontWeight: FontWeight.bold,
TextButton(
onPressed: () async {
ClipboardData data = ClipboardData(text: bytesToHex(u64ToBytes((recoveredKey)[0]).sublist(2, 8)).toUpperCase());
await Clipboard.setData(data);
},
child: Text(
"block $block key $key: ${bytesToHex(u64ToBytes((recoveredKey)[0]).sublist(2, 8)).toUpperCase()}",
style: const TextStyle(
fontSize: 16,
fontWeight: FontWeight.bold,
),
),
),

],
)
);
Expand Down

0 comments on commit b3575a6

Please sign in to comment.