Solve errors

This commit is contained in:
Dennis Fokin 2023-07-27 15:47:50 +02:00
parent 75197726ce
commit ed7f99b877
No known key found for this signature in database
GPG Key ID: 870B88256690D8BC
2 changed files with 4 additions and 6 deletions

View File

@ -17,10 +17,8 @@
import 'dart:typed_data';
import 'dart:convert';
import 'package:base32/base32.dart';
import 'package:logging/logging.dart';
import 'package:freezed_annotation/freezed_annotation.dart';
import 'package:flutter_gen/gen_l10n/app_localizations.dart';
import 'package:yubico_authenticator/app/logging.dart';
import '../core/models.dart';
@ -33,8 +31,6 @@ const defaultCounter = 0;
const defaultOathType = OathType.totp;
const defaultHashAlgorithm = HashAlgorithm.sha1;
final _log = Logger('oath.models');
enum HashAlgorithm {
@JsonValue(0x01)
sha1('SHA-1'),

View File

@ -102,7 +102,8 @@ Widget oathBuildActions(
if (qrScanner != null) {
final otpauth = await qrScanner.scanQr();
if (otpauth == null) {
showMessage(context, l10n.l_qr_not_found);
await ref.read(withContextProvider)((context) async =>
showMessage(context, l10n.l_qr_not_found));
} else {
String s = 'otpauth-migration';
if (otpauth.contains(s)) {
@ -131,7 +132,8 @@ Widget oathBuildActions(
}
}
}
Navigator.of(context).pop();
await ref.read(withContextProvider)(
(context) async => Navigator.of(context).pop());
}),
]),
ActionListSection(l10n.s_manage, children: [