fix: fdroid build (#548)

This commit is contained in:
lollipopkit🏳️‍⚧️
2024-08-25 22:06:55 +08:00
parent 3e7315dac6
commit bcbf1fbc17
4 changed files with 79 additions and 17 deletions

View File

@@ -682,11 +682,11 @@ class _ServerEditPageState extends State<ServerEditPage> with AfterLayoutMixin {
text: libL10n.import,
icon: const Icon(Icons.qr_code, color: Colors.grey),
onTap: () async {
final codes = await BarcodeScannerPage.route.go(
final ret = await BarcodeScannerPage.route.go(
context,
args: const BarcodeScannerPageArgs(),
);
final code = codes?.firstOrNull?.rawValue;
final code = ret?.text;
if (code == null) return;
try {
final spi = Spi.fromJson(json.decode(code));