mirror of
https://github.com/Yubico/yubioath-flutter.git
synced 2024-11-22 00:12:09 +03:00
Add lint rules for relative imports and order.
This commit is contained in:
parent
d5bd6e4c3e
commit
40809881b2
@ -26,6 +26,9 @@ linter:
|
||||
prefer_single_quotes: true # Uncomment to enable the `prefer_single_quotes` rule
|
||||
unawaited_futures: true # Explicitly mark futures which are not being awaited
|
||||
use_super_parameters: true
|
||||
prefer_relative_imports: true
|
||||
avoid_relative_lib_imports: true
|
||||
directives_ordering: true
|
||||
|
||||
# Additional information about this file can be found at
|
||||
# https://dart.dev/guides/language/analysis-options
|
||||
|
@ -14,8 +14,8 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import 'package:flutter_test/flutter_test.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_test/flutter_test.dart';
|
||||
import 'package:integration_test/integration_test.dart';
|
||||
import 'package:yubico_authenticator/app/views/keys.dart' as app_keys;
|
||||
import 'package:yubico_authenticator/management/views/keys.dart'
|
||||
|
@ -14,14 +14,26 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import 'dart:io';
|
||||
import 'dart:async';
|
||||
import 'dart:io';
|
||||
|
||||
import 'package:integration_test/integration_test_driver_extended.dart';
|
||||
|
||||
Future<void> main() async {
|
||||
await Process.run('adb' , ['shell' ,'pm', 'grant', 'com.yubico.yubioath', 'android.permission.CAMERA']);
|
||||
await Process.run('adb' , ['shell' ,'pm', 'grant', 'com.yubico.yubioath', 'android.permission.WRITE_EXTERNAL_STORAGE']);
|
||||
await Process.run('adb', [
|
||||
'shell',
|
||||
'pm',
|
||||
'grant',
|
||||
'com.yubico.yubioath',
|
||||
'android.permission.CAMERA'
|
||||
]);
|
||||
await Process.run('adb', [
|
||||
'shell',
|
||||
'pm',
|
||||
'grant',
|
||||
'com.yubico.yubioath',
|
||||
'android.permission.WRITE_EXTERNAL_STORAGE'
|
||||
]);
|
||||
|
||||
await integrationDriver();
|
||||
}
|
||||
}
|
||||
|
@ -16,14 +16,14 @@
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_test/flutter_test.dart';
|
||||
import 'package:yubico_authenticator/core/state.dart';
|
||||
import 'package:yubico_authenticator/app/views/keys.dart' as app_keys;
|
||||
import 'package:yubico_authenticator/core/state.dart';
|
||||
import 'package:yubico_authenticator/oath/keys.dart' as keys;
|
||||
import 'package:yubico_authenticator/oath/views/account_list.dart';
|
||||
import 'package:yubico_authenticator/oath/views/account_view.dart';
|
||||
|
||||
import 'android/util.dart';
|
||||
import '../utils/test_util.dart';
|
||||
import 'android/util.dart';
|
||||
|
||||
class Account {
|
||||
final String? issuer;
|
||||
|
@ -18,7 +18,7 @@ import 'dart:convert';
|
||||
|
||||
import 'package:flutter/services.dart';
|
||||
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
||||
import 'package:yubico_authenticator/android/state.dart';
|
||||
import 'state.dart';
|
||||
|
||||
const appMethodsChannel = MethodChannel('app.methods');
|
||||
|
||||
|
@ -23,12 +23,9 @@ import 'package:flutter/services.dart';
|
||||
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
||||
import 'package:logging/logging.dart';
|
||||
import 'package:shared_preferences/shared_preferences.dart';
|
||||
import 'package:yubico_authenticator/android/logger.dart';
|
||||
import 'package:yubico_authenticator/android/oath/otp_auth_link_handler.dart';
|
||||
import 'package:yubico_authenticator/android/window_state_provider.dart';
|
||||
import 'package:yubico_authenticator/app/logging.dart';
|
||||
|
||||
import '../app/app.dart';
|
||||
import '../app/logging.dart';
|
||||
import '../app/models.dart';
|
||||
import '../app/state.dart';
|
||||
import '../app/views/main_page.dart';
|
||||
@ -36,11 +33,14 @@ import '../core/state.dart';
|
||||
import '../management/state.dart';
|
||||
import '../oath/state.dart';
|
||||
import 'app_methods.dart';
|
||||
import 'logger.dart';
|
||||
import 'management/state.dart';
|
||||
import 'oath/otp_auth_link_handler.dart';
|
||||
import 'oath/state.dart';
|
||||
import 'qr_scanner/qr_scanner_provider.dart';
|
||||
import 'state.dart';
|
||||
import 'tap_request_dialog.dart';
|
||||
import 'window_state_provider.dart';
|
||||
|
||||
Future<Widget> initialize() async {
|
||||
_initSystemUi();
|
||||
|
@ -16,7 +16,7 @@
|
||||
|
||||
import 'package:flutter/services.dart';
|
||||
import 'package:logging/logging.dart';
|
||||
import 'package:yubico_authenticator/app/logging.dart';
|
||||
import '../app/logging.dart';
|
||||
|
||||
final _log = Logger('android.logger');
|
||||
|
||||
|
@ -17,10 +17,10 @@
|
||||
import 'dart:async';
|
||||
|
||||
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
||||
import 'package:yubico_authenticator/management/models.dart';
|
||||
|
||||
import '../../app/models.dart';
|
||||
import '../../app/state.dart';
|
||||
import '../../management/models.dart';
|
||||
import '../../management/state.dart';
|
||||
|
||||
final androidManagementState = AsyncNotifierProvider.autoDispose
|
||||
|
@ -19,16 +19,16 @@ import 'dart:convert';
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
||||
import 'package:flutter_gen/gen_l10n/app_localizations.dart';
|
||||
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
||||
import 'package:logging/logging.dart';
|
||||
import 'package:yubico_authenticator/exception/cancellation_exception.dart';
|
||||
|
||||
import '../../app/logging.dart';
|
||||
import '../../app/models.dart';
|
||||
import '../../app/state.dart';
|
||||
import '../../app/views/user_interaction.dart';
|
||||
import '../../core/models.dart';
|
||||
import '../../exception/cancellation_exception.dart';
|
||||
import '../../exception/platform_exception_decoder.dart';
|
||||
import '../../oath/models.dart';
|
||||
import '../../oath/state.dart';
|
||||
|
@ -16,8 +16,8 @@
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_gen/gen_l10n/app_localizations.dart';
|
||||
import 'package:yubico_authenticator/android/qr_scanner/qr_scanner_provider.dart';
|
||||
|
||||
import 'qr_scanner_provider.dart';
|
||||
import 'qr_scanner_scan_status.dart';
|
||||
import 'qr_scanner_widgets.dart';
|
||||
|
||||
|
@ -20,14 +20,14 @@ import 'package:file_picker/file_picker.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_gen/gen_l10n/app_localizations.dart';
|
||||
import 'package:qrscanner_zxing/qrscanner_zxing_method_channel.dart';
|
||||
import 'package:yubico_authenticator/android/app_methods.dart';
|
||||
import 'package:yubico_authenticator/app/state.dart';
|
||||
import 'package:yubico_authenticator/exception/cancellation_exception.dart';
|
||||
import 'package:yubico_authenticator/theme.dart';
|
||||
|
||||
import '../../app/message.dart';
|
||||
import '../../app/state.dart';
|
||||
import '../../exception/cancellation_exception.dart';
|
||||
import '../../oath/views/add_account_page.dart';
|
||||
import '../../oath/views/utils.dart';
|
||||
import '../../theme.dart';
|
||||
import '../app_methods.dart';
|
||||
import 'qr_scanner_view.dart';
|
||||
|
||||
class AndroidQrScanner implements QrScanner {
|
||||
|
@ -17,9 +17,9 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_gen/gen_l10n/app_localizations.dart';
|
||||
import 'package:qrscanner_zxing/qrscanner_zxing_view.dart';
|
||||
import 'package:yubico_authenticator/android/app_methods.dart';
|
||||
|
||||
import '../../oath/models.dart';
|
||||
import '../app_methods.dart';
|
||||
import 'qr_scanner_overlay_view.dart';
|
||||
import 'qr_scanner_permissions_view.dart';
|
||||
import 'qr_scanner_scan_status.dart';
|
||||
|
@ -18,9 +18,9 @@ import 'package:flutter/material.dart';
|
||||
import 'package:flutter_gen/gen_l10n/app_localizations.dart';
|
||||
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
||||
|
||||
import '../state.dart';
|
||||
import '../models.dart';
|
||||
import '../keys.dart' as keys;
|
||||
import '../models.dart';
|
||||
import '../state.dart';
|
||||
|
||||
class NfcTapActionView extends ConsumerWidget {
|
||||
const NfcTapActionView({super.key});
|
||||
|
@ -17,11 +17,11 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
||||
import 'package:logging/logging.dart';
|
||||
import 'package:yubico_authenticator/android/state.dart';
|
||||
import 'package:yubico_authenticator/app/logging.dart';
|
||||
|
||||
import '../app/logging.dart';
|
||||
import '../app/models.dart';
|
||||
import 'app_methods.dart';
|
||||
import 'state.dart';
|
||||
|
||||
final _log = Logger('android.window_state_provider');
|
||||
|
||||
@ -35,8 +35,8 @@ final androidWindowStateProvider = Provider<WindowState>(
|
||||
|
||||
class _WindowStateNotifier extends StateNotifier<WindowState>
|
||||
with WidgetsBindingObserver {
|
||||
final StateNotifierProviderRef<_WindowStateNotifier, WindowState> _ref;
|
||||
_WindowStateNotifier(this._ref)
|
||||
final StateNotifierProviderRef<_WindowStateNotifier, WindowState> _ref;
|
||||
_WindowStateNotifier(this._ref)
|
||||
: super(WindowState(focused: true, visible: true, active: true)) {
|
||||
_init();
|
||||
}
|
||||
|
@ -20,8 +20,8 @@ import 'package:flutter/material.dart';
|
||||
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
||||
import 'package:logging/logging.dart';
|
||||
|
||||
import '../core/state.dart';
|
||||
import '../android/state.dart';
|
||||
import '../core/state.dart';
|
||||
|
||||
String _pad(int value, int zeroes) => value.toString().padLeft(zeroes, '0');
|
||||
|
||||
|
@ -16,8 +16,8 @@
|
||||
|
||||
import 'package:collection/collection.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:freezed_annotation/freezed_annotation.dart';
|
||||
import 'package:flutter_gen/gen_l10n/app_localizations.dart';
|
||||
import 'package:freezed_annotation/freezed_annotation.dart';
|
||||
|
||||
import '../../management/models.dart';
|
||||
import '../core/models.dart';
|
||||
|
@ -19,15 +19,15 @@ import 'dart:io';
|
||||
import 'dart:ui';
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_gen/gen_l10n/app_localizations.dart';
|
||||
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
||||
import 'package:logging/logging.dart';
|
||||
import 'package:shared_preferences/shared_preferences.dart';
|
||||
import 'package:flutter_gen/gen_l10n/app_localizations.dart';
|
||||
import 'package:yubico_authenticator/app/logging.dart';
|
||||
|
||||
import '../core/state.dart';
|
||||
import 'models.dart';
|
||||
import 'features.dart' as features;
|
||||
import 'logging.dart';
|
||||
import 'models.dart';
|
||||
|
||||
final _log = Logger('app.state');
|
||||
|
||||
|
@ -16,8 +16,8 @@
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_gen/gen_l10n/app_localizations.dart';
|
||||
import 'package:yubico_authenticator/core/state.dart';
|
||||
|
||||
import '../../core/state.dart';
|
||||
import '../../widgets/delayed_visibility.dart';
|
||||
import '../message.dart';
|
||||
import 'keys.dart';
|
||||
|
@ -17,8 +17,8 @@
|
||||
import 'dart:io';
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
||||
import 'package:flutter_gen/gen_l10n/app_localizations.dart';
|
||||
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
||||
|
||||
import '../../core/models.dart';
|
||||
import '../../desktop/state.dart';
|
||||
|
@ -15,9 +15,9 @@
|
||||
*/
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_gen/gen_l10n/app_localizations.dart';
|
||||
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
||||
import 'package:shared_preferences/shared_preferences.dart';
|
||||
import 'package:flutter_gen/gen_l10n/app_localizations.dart';
|
||||
|
||||
import '../../android/state.dart';
|
||||
import '../../core/state.dart';
|
||||
@ -151,8 +151,7 @@ class DevicePickerContent extends ConsumerWidget {
|
||||
selected: currentNode == null,
|
||||
extended: extended,
|
||||
),
|
||||
if (androidNoKeyWidget != null)
|
||||
androidNoKeyWidget,
|
||||
if (androidNoKeyWidget != null) androidNoKeyWidget,
|
||||
...devices.map(
|
||||
(e) => e.path == currentNode?.path
|
||||
? _buildCurrentDeviceRow(
|
||||
|
@ -15,8 +15,8 @@
|
||||
*/
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
||||
import 'package:flutter_gen/gen_l10n/app_localizations.dart';
|
||||
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
||||
|
||||
import '../../management/views/management_screen.dart';
|
||||
import '../message.dart';
|
||||
|
@ -19,8 +19,8 @@ import 'dart:convert';
|
||||
|
||||
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
||||
import 'package:logging/logging.dart';
|
||||
import 'package:yubico_authenticator/app/logging.dart';
|
||||
|
||||
import '../app/logging.dart';
|
||||
import '../app/models.dart';
|
||||
import '../app/state.dart';
|
||||
import '../core/models.dart';
|
||||
|
@ -20,8 +20,8 @@ import 'dart:io';
|
||||
|
||||
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
||||
import 'package:logging/logging.dart';
|
||||
import 'package:yubico_authenticator/app/logging.dart';
|
||||
|
||||
import '../../app/logging.dart';
|
||||
import '../../app/models.dart';
|
||||
import '../../app/state.dart';
|
||||
import '../../fido/models.dart';
|
||||
|
@ -18,12 +18,12 @@ import 'dart:async';
|
||||
|
||||
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
||||
import 'package:logging/logging.dart';
|
||||
import 'package:yubico_authenticator/app/logging.dart';
|
||||
import 'package:yubico_authenticator/management/models.dart';
|
||||
|
||||
import '../../app/logging.dart';
|
||||
import '../../app/models.dart';
|
||||
import '../../app/state.dart';
|
||||
import '../../core/models.dart';
|
||||
import '../../management/models.dart';
|
||||
import '../../management/state.dart';
|
||||
import '../rpc.dart';
|
||||
import '../state.dart';
|
||||
|
@ -19,8 +19,8 @@ import 'dart:convert';
|
||||
import 'dart:math';
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
||||
import 'package:flutter_gen/gen_l10n/app_localizations.dart';
|
||||
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
||||
import 'package:logging/logging.dart';
|
||||
|
||||
import '../../app/logging.dart';
|
||||
|
@ -18,8 +18,8 @@ import 'dart:async';
|
||||
import 'dart:convert';
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
||||
import 'package:flutter_gen/gen_l10n/app_localizations.dart';
|
||||
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
||||
import 'package:logging/logging.dart';
|
||||
|
||||
import '../../app/logging.dart';
|
||||
|
@ -15,10 +15,10 @@
|
||||
*/
|
||||
|
||||
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
||||
import 'package:yubico_authenticator/app/state.dart';
|
||||
import 'package:yubico_authenticator/desktop/state.dart';
|
||||
|
||||
import '../app/state.dart';
|
||||
import 'rpc.dart';
|
||||
import 'state.dart';
|
||||
|
||||
class RpcQrScanner implements QrScanner {
|
||||
final RpcSession _rpc;
|
||||
|
@ -19,10 +19,10 @@ import 'dart:convert';
|
||||
import 'dart:io';
|
||||
import 'dart:math';
|
||||
|
||||
import 'package:logging/logging.dart';
|
||||
import 'package:async/async.dart';
|
||||
import 'package:yubico_authenticator/app/logging.dart';
|
||||
import 'package:logging/logging.dart';
|
||||
|
||||
import '../app/logging.dart';
|
||||
import '../app/models.dart';
|
||||
import 'models.dart';
|
||||
|
||||
|
@ -19,11 +19,11 @@ import 'dart:io';
|
||||
|
||||
import 'package:flutter/foundation.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_gen/gen_l10n/app_localizations.dart';
|
||||
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
||||
import 'package:local_notifier/local_notifier.dart';
|
||||
import 'package:tray_manager/tray_manager.dart';
|
||||
import 'package:window_manager/window_manager.dart';
|
||||
import 'package:flutter_gen/gen_l10n/app_localizations.dart';
|
||||
|
||||
import '../app/models.dart';
|
||||
import '../app/shortcuts.dart';
|
||||
|
@ -19,8 +19,8 @@ import 'package:flutter_gen/gen_l10n/app_localizations.dart';
|
||||
|
||||
import '../../app/models.dart';
|
||||
import '../../app/shortcuts.dart';
|
||||
import '../keys.dart' as keys;
|
||||
import '../features.dart' as features;
|
||||
import '../keys.dart' as keys;
|
||||
|
||||
List<ActionItem> buildFingerprintActions(AppLocalizations l10n) {
|
||||
return [
|
||||
|
@ -22,8 +22,8 @@ import 'package:flutter/material.dart';
|
||||
import 'package:flutter_gen/gen_l10n/app_localizations.dart';
|
||||
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
||||
import 'package:logging/logging.dart';
|
||||
import 'package:yubico_authenticator/app/logging.dart';
|
||||
|
||||
import '../../app/logging.dart';
|
||||
import '../../app/message.dart';
|
||||
import '../../app/models.dart';
|
||||
import '../../desktop/models.dart';
|
||||
|
@ -5,8 +5,8 @@ import 'package:flutter_riverpod/flutter_riverpod.dart';
|
||||
import '../../app/message.dart';
|
||||
import '../../app/shortcuts.dart';
|
||||
import '../../app/state.dart';
|
||||
import '../../app/views/fs_dialog.dart';
|
||||
import '../../app/views/action_list.dart';
|
||||
import '../../app/views/fs_dialog.dart';
|
||||
import '../../core/state.dart';
|
||||
import '../features.dart' as features;
|
||||
import '../models.dart';
|
||||
|
@ -21,11 +21,11 @@ import 'package:flutter_gen/gen_l10n/app_localizations.dart';
|
||||
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
||||
|
||||
import '../../app/message.dart';
|
||||
import '../../app/models.dart';
|
||||
import '../../app/state.dart';
|
||||
import '../../widgets/responsive_dialog.dart';
|
||||
import '../models.dart';
|
||||
import '../state.dart';
|
||||
import '../../app/models.dart';
|
||||
import '../../app/state.dart';
|
||||
|
||||
class DeleteCredentialDialog extends ConsumerWidget {
|
||||
final DevicePath devicePath;
|
||||
|
@ -19,11 +19,11 @@ import 'package:flutter_gen/gen_l10n/app_localizations.dart';
|
||||
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
||||
|
||||
import '../../app/message.dart';
|
||||
import '../../app/models.dart';
|
||||
import '../../app/state.dart';
|
||||
import '../../widgets/responsive_dialog.dart';
|
||||
import '../models.dart';
|
||||
import '../state.dart';
|
||||
import '../../app/models.dart';
|
||||
import '../../app/state.dart';
|
||||
|
||||
class DeleteFingerprintDialog extends ConsumerWidget {
|
||||
final DevicePath devicePath;
|
||||
|
@ -5,11 +5,11 @@ import 'package:flutter_riverpod/flutter_riverpod.dart';
|
||||
import '../../app/message.dart';
|
||||
import '../../app/shortcuts.dart';
|
||||
import '../../app/state.dart';
|
||||
import '../../app/views/fs_dialog.dart';
|
||||
import '../../app/views/action_list.dart';
|
||||
import '../../app/views/fs_dialog.dart';
|
||||
import '../../core/state.dart';
|
||||
import '../models.dart';
|
||||
import '../features.dart' as features;
|
||||
import '../models.dart';
|
||||
import 'actions.dart';
|
||||
import 'delete_fingerprint_dialog.dart';
|
||||
import 'rename_fingerprint_dialog.dart';
|
||||
|
@ -19,11 +19,11 @@ import 'package:flutter_gen/gen_l10n/app_localizations.dart';
|
||||
|
||||
import '../../app/message.dart';
|
||||
import '../../app/models.dart';
|
||||
import '../../app/views/fs_dialog.dart';
|
||||
import '../../app/views/action_list.dart';
|
||||
import '../models.dart';
|
||||
import '../keys.dart' as keys;
|
||||
import '../../app/views/fs_dialog.dart';
|
||||
import '../features.dart' as features;
|
||||
import '../keys.dart' as keys;
|
||||
import '../models.dart';
|
||||
import 'add_fingerprint_dialog.dart';
|
||||
import 'pin_dialog.dart';
|
||||
import 'reset_dialog.dart';
|
||||
|
@ -24,8 +24,8 @@ import '../../app/message.dart';
|
||||
import '../../app/models.dart';
|
||||
import '../../app/state.dart';
|
||||
import '../../desktop/models.dart';
|
||||
import '../../widgets/responsive_dialog.dart';
|
||||
import '../../widgets/app_text_form_field.dart';
|
||||
import '../../widgets/responsive_dialog.dart';
|
||||
import '../models.dart';
|
||||
import '../state.dart';
|
||||
|
||||
|
@ -21,8 +21,8 @@ import 'package:flutter_riverpod/flutter_riverpod.dart';
|
||||
import '../../app/message.dart';
|
||||
import '../../app/models.dart';
|
||||
import '../../desktop/models.dart';
|
||||
import '../../widgets/responsive_dialog.dart';
|
||||
import '../../widgets/app_text_form_field.dart';
|
||||
import '../../widgets/responsive_dialog.dart';
|
||||
import '../../widgets/utf8_utils.dart';
|
||||
import '../models.dart';
|
||||
import '../state.dart';
|
||||
|
@ -20,15 +20,15 @@ import 'package:flutter/material.dart';
|
||||
import 'package:flutter_gen/gen_l10n/app_localizations.dart';
|
||||
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
||||
import 'package:logging/logging.dart';
|
||||
import 'package:yubico_authenticator/app/logging.dart';
|
||||
|
||||
import '../../app/logging.dart';
|
||||
import '../../app/message.dart';
|
||||
import '../../app/models.dart';
|
||||
import '../../core/models.dart';
|
||||
import '../../desktop/models.dart';
|
||||
import '../../fido/models.dart';
|
||||
import '../../widgets/responsive_dialog.dart';
|
||||
import '../state.dart';
|
||||
import '../../fido/models.dart';
|
||||
import '../../app/models.dart';
|
||||
|
||||
final _log = Logger('fido.views.reset_dialog');
|
||||
|
||||
|
@ -27,9 +27,9 @@ import '../../app/views/graphics.dart';
|
||||
import '../../app/views/message_page.dart';
|
||||
import '../../core/state.dart';
|
||||
import '../../widgets/list_title.dart';
|
||||
import '../features.dart' as features;
|
||||
import '../models.dart';
|
||||
import '../state.dart';
|
||||
import '../features.dart' as features;
|
||||
import 'actions.dart';
|
||||
import 'credential_dialog.dart';
|
||||
import 'delete_credential_dialog.dart';
|
||||
|
@ -15,10 +15,10 @@
|
||||
*/
|
||||
|
||||
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
||||
import 'package:yubico_authenticator/management/models.dart';
|
||||
|
||||
import '../app/models.dart';
|
||||
import '../core/state.dart';
|
||||
import 'models.dart';
|
||||
|
||||
final managementStateProvider = AsyncNotifierProvider.autoDispose
|
||||
.family<ManagementStateNotifier, DeviceInfo, DevicePath>(
|
||||
|
@ -21,7 +21,8 @@ import 'package:flutter_riverpod/flutter_riverpod.dart';
|
||||
import 'package:logging/logging.dart';
|
||||
import 'package:path/path.dart';
|
||||
import 'package:path_provider/path_provider.dart';
|
||||
import 'package:yubico_authenticator/app/logging.dart';
|
||||
|
||||
import '../../app/logging.dart';
|
||||
|
||||
final _log = Logger('icon_cache');
|
||||
|
||||
|
@ -24,8 +24,8 @@ import 'package:logging/logging.dart';
|
||||
import 'package:path/path.dart';
|
||||
import 'package:vector_graphics/vector_graphics.dart';
|
||||
import 'package:vector_graphics_compiler/vector_graphics_compiler.dart';
|
||||
import 'package:yubico_authenticator/app/logging.dart';
|
||||
|
||||
import '../../app/logging.dart';
|
||||
import 'icon_cache.dart';
|
||||
|
||||
final _log = Logger('icon_file_loader');
|
||||
|
@ -20,11 +20,12 @@ import 'package:flutter/material.dart';
|
||||
import 'package:flutter_gen/gen_l10n/app_localizations.dart';
|
||||
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
||||
import 'package:url_launcher/url_launcher.dart';
|
||||
import 'package:yubico_authenticator/app/message.dart';
|
||||
import 'package:yubico_authenticator/app/state.dart';
|
||||
import 'package:yubico_authenticator/oath/icon_provider/icon_pack.dart';
|
||||
import 'package:yubico_authenticator/oath/icon_provider/icon_pack_manager.dart';
|
||||
import 'package:yubico_authenticator/widgets/responsive_dialog.dart';
|
||||
|
||||
import '../../app/message.dart';
|
||||
import '../../app/state.dart';
|
||||
import '../../widgets/responsive_dialog.dart';
|
||||
import 'icon_pack.dart';
|
||||
import 'icon_pack_manager.dart';
|
||||
|
||||
class IconPackDialog extends ConsumerWidget {
|
||||
const IconPackDialog({super.key});
|
||||
|
@ -24,8 +24,8 @@ import 'package:io/io.dart';
|
||||
import 'package:logging/logging.dart';
|
||||
import 'package:path/path.dart';
|
||||
import 'package:path_provider/path_provider.dart';
|
||||
import 'package:yubico_authenticator/app/logging.dart';
|
||||
|
||||
import '../../app/logging.dart';
|
||||
import 'icon_cache.dart';
|
||||
import 'icon_pack.dart';
|
||||
|
||||
|
@ -14,11 +14,12 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import 'dart:typed_data';
|
||||
import 'dart:convert';
|
||||
import 'dart:typed_data';
|
||||
|
||||
import 'package:base32/base32.dart';
|
||||
import 'package:freezed_annotation/freezed_annotation.dart';
|
||||
import 'package:flutter_gen/gen_l10n/app_localizations.dart';
|
||||
import 'package:freezed_annotation/freezed_annotation.dart';
|
||||
|
||||
import '../core/models.dart';
|
||||
|
||||
|
@ -17,14 +17,14 @@
|
||||
import 'dart:async';
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
||||
import 'package:flutter_gen/gen_l10n/app_localizations.dart';
|
||||
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
||||
|
||||
import '../../app/message.dart';
|
||||
import '../../app/shortcuts.dart';
|
||||
import '../../app/state.dart';
|
||||
import '../../app/views/fs_dialog.dart';
|
||||
import '../../app/views/action_list.dart';
|
||||
import '../../app/views/fs_dialog.dart';
|
||||
import '../../core/models.dart';
|
||||
import '../../core/state.dart';
|
||||
import '../features.dart' as features;
|
||||
|
@ -28,9 +28,9 @@ import '../../core/state.dart';
|
||||
import '../../widgets/circle_timer.dart';
|
||||
import '../../widgets/custom_icons.dart';
|
||||
import '../features.dart' as features;
|
||||
import '../keys.dart' as keys;
|
||||
import '../models.dart';
|
||||
import '../state.dart';
|
||||
import '../keys.dart' as keys;
|
||||
import 'actions.dart';
|
||||
|
||||
/// Support class for presenting an OATH account.
|
||||
|
@ -20,10 +20,11 @@ import 'package:flutter/material.dart';
|
||||
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
||||
import 'package:path/path.dart';
|
||||
import 'package:vector_graphics/vector_graphics.dart';
|
||||
import 'package:yubico_authenticator/oath/icon_provider/icon_file_loader.dart';
|
||||
import 'package:yubico_authenticator/oath/icon_provider/icon_pack.dart';
|
||||
import 'package:yubico_authenticator/oath/icon_provider/icon_pack_manager.dart';
|
||||
import 'package:yubico_authenticator/widgets/delayed_visibility.dart';
|
||||
|
||||
import '../../widgets/delayed_visibility.dart';
|
||||
import '../icon_provider/icon_file_loader.dart';
|
||||
import '../icon_provider/icon_pack.dart';
|
||||
import '../icon_provider/icon_pack_manager.dart';
|
||||
|
||||
class AccountIcon extends ConsumerWidget {
|
||||
final String? issuer;
|
||||
|
@ -24,8 +24,8 @@ import '../../app/shortcuts.dart';
|
||||
import '../../app/state.dart';
|
||||
import '../../app/views/app_list_item.dart';
|
||||
import '../../core/state.dart';
|
||||
import '../models.dart';
|
||||
import '../features.dart' as features;
|
||||
import '../models.dart';
|
||||
import '../state.dart';
|
||||
import 'account_dialog.dart';
|
||||
import 'account_helper.dart';
|
||||
|
@ -15,16 +15,16 @@
|
||||
*/
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
||||
import 'package:flutter_gen/gen_l10n/app_localizations.dart';
|
||||
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
||||
|
||||
import '../../app/message.dart';
|
||||
import '../../app/shortcuts.dart';
|
||||
import '../../app/state.dart';
|
||||
import '../../core/state.dart';
|
||||
import '../../exception/cancellation_exception.dart';
|
||||
import '../models.dart';
|
||||
import '../features.dart' as features;
|
||||
import '../models.dart';
|
||||
import '../state.dart';
|
||||
|
||||
class TogglePinIntent extends Intent {
|
||||
|
@ -15,15 +15,16 @@
|
||||
*/
|
||||
|
||||
import 'dart:convert';
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_gen/gen_l10n/app_localizations.dart';
|
||||
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
||||
import 'package:yubico_authenticator/app/message.dart';
|
||||
import 'package:yubico_authenticator/app/state.dart';
|
||||
import 'package:yubico_authenticator/widgets/responsive_dialog.dart';
|
||||
|
||||
import '../../app/message.dart';
|
||||
import '../../app/models.dart';
|
||||
import '../../app/state.dart';
|
||||
import '../../widgets/file_drop_target.dart';
|
||||
import '../../widgets/responsive_dialog.dart';
|
||||
import '../models.dart';
|
||||
import '../state.dart';
|
||||
import 'add_account_page.dart';
|
||||
|
@ -35,11 +35,11 @@ import '../../desktop/models.dart';
|
||||
import '../../exception/apdu_exception.dart';
|
||||
import '../../exception/cancellation_exception.dart';
|
||||
import '../../management/models.dart';
|
||||
import '../../widgets/app_text_field.dart';
|
||||
import '../../widgets/choice_filter_chip.dart';
|
||||
import '../../widgets/file_drop_target.dart';
|
||||
import '../../widgets/focus_utils.dart';
|
||||
import '../../widgets/responsive_dialog.dart';
|
||||
import '../../widgets/app_text_field.dart';
|
||||
import '../../widgets/utf8_utils.dart';
|
||||
import '../keys.dart' as keys;
|
||||
import '../models.dart';
|
||||
|
@ -1,23 +1,21 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_gen/gen_l10n/app_localizations.dart';
|
||||
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
||||
import 'package:logging/logging.dart';
|
||||
import 'package:yubico_authenticator/app/logging.dart';
|
||||
import 'package:yubico_authenticator/exception/apdu_exception.dart';
|
||||
|
||||
import '../../android/oath/state.dart';
|
||||
import '../../app/models.dart';
|
||||
import '../../core/models.dart';
|
||||
import '../../desktop/models.dart';
|
||||
import '../../widgets/responsive_dialog.dart';
|
||||
|
||||
import 'package:flutter_gen/gen_l10n/app_localizations.dart';
|
||||
import '../models.dart';
|
||||
import '../../app/state.dart';
|
||||
import '../../core/state.dart';
|
||||
import '../state.dart';
|
||||
import '../../app/logging.dart';
|
||||
import '../../app/message.dart';
|
||||
|
||||
import '../../app/models.dart';
|
||||
import '../../app/state.dart';
|
||||
import '../../core/models.dart';
|
||||
import '../../core/state.dart';
|
||||
import '../../desktop/models.dart';
|
||||
import '../../exception/apdu_exception.dart';
|
||||
import '../../exception/cancellation_exception.dart';
|
||||
import '../../widgets/responsive_dialog.dart';
|
||||
import '../models.dart';
|
||||
import '../state.dart';
|
||||
import 'rename_account_dialog.dart';
|
||||
|
||||
final _log = Logger('oath.views.list_screen');
|
||||
|
@ -23,9 +23,9 @@ import '../../app/models.dart';
|
||||
import '../../app/state.dart';
|
||||
import '../../exception/cancellation_exception.dart';
|
||||
import '../../widgets/responsive_dialog.dart';
|
||||
import '../keys.dart' as keys;
|
||||
import '../models.dart';
|
||||
import '../state.dart';
|
||||
import '../keys.dart' as keys;
|
||||
import 'utils.dart';
|
||||
|
||||
class DeleteAccountDialog extends ConsumerWidget {
|
||||
|
@ -15,21 +15,21 @@
|
||||
*/
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
||||
import 'package:flutter_gen/gen_l10n/app_localizations.dart';
|
||||
import 'package:yubico_authenticator/oath/icon_provider/icon_pack_dialog.dart';
|
||||
import 'package:yubico_authenticator/oath/views/add_account_dialog.dart';
|
||||
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
||||
|
||||
import '../../android/qr_scanner/qr_scanner_provider.dart';
|
||||
import '../../app/message.dart';
|
||||
import '../../app/models.dart';
|
||||
import '../../app/state.dart';
|
||||
import '../../app/views/fs_dialog.dart';
|
||||
import '../../app/views/action_list.dart';
|
||||
import '../../app/views/fs_dialog.dart';
|
||||
import '../../core/state.dart';
|
||||
import '../models.dart';
|
||||
import '../features.dart' as features;
|
||||
import '../icon_provider/icon_pack_dialog.dart';
|
||||
import '../keys.dart' as keys;
|
||||
import '../models.dart';
|
||||
import 'add_account_dialog.dart';
|
||||
import 'manage_password_dialog.dart';
|
||||
import 'reset_dialog.dart';
|
||||
|
||||
@ -59,7 +59,6 @@ Widget oathBuildActions(
|
||||
icon: const Icon(Icons.person_add_alt_1_outlined),
|
||||
onTap: used != null && (capacity == null || capacity > used)
|
||||
? (context) async {
|
||||
|
||||
Navigator.of(context).pop();
|
||||
if (isAndroid) {
|
||||
final withContext = ref.read(withContextProvider);
|
||||
|
@ -17,10 +17,10 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_gen/gen_l10n/app_localizations.dart';
|
||||
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
||||
import 'package:yubico_authenticator/widgets/app_text_field.dart';
|
||||
|
||||
import '../../app/message.dart';
|
||||
import '../../app/models.dart';
|
||||
import '../../widgets/app_text_field.dart';
|
||||
import '../../widgets/focus_utils.dart';
|
||||
import '../../widgets/responsive_dialog.dart';
|
||||
import '../keys.dart' as keys;
|
||||
|
@ -25,9 +25,9 @@ import '../../app/models.dart';
|
||||
import '../../app/state.dart';
|
||||
import '../../desktop/models.dart';
|
||||
import '../../exception/cancellation_exception.dart';
|
||||
import '../../widgets/app_text_form_field.dart';
|
||||
import '../../widgets/focus_utils.dart';
|
||||
import '../../widgets/responsive_dialog.dart';
|
||||
import '../../widgets/app_text_form_field.dart';
|
||||
import '../../widgets/utf8_utils.dart';
|
||||
import '../keys.dart' as keys;
|
||||
import '../models.dart';
|
||||
|
@ -19,10 +19,10 @@ import 'package:flutter_gen/gen_l10n/app_localizations.dart';
|
||||
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
||||
|
||||
import '../../app/message.dart';
|
||||
import '../../widgets/responsive_dialog.dart';
|
||||
import '../state.dart';
|
||||
import '../../app/models.dart';
|
||||
import '../../app/state.dart';
|
||||
import '../../widgets/responsive_dialog.dart';
|
||||
import '../state.dart';
|
||||
|
||||
class ResetDialog extends ConsumerWidget {
|
||||
final DevicePath devicePath;
|
||||
|
@ -14,8 +14,8 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import 'package:freezed_annotation/freezed_annotation.dart';
|
||||
import 'package:flutter_gen/gen_l10n/app_localizations.dart';
|
||||
import 'package:freezed_annotation/freezed_annotation.dart';
|
||||
|
||||
import '../core/models.dart';
|
||||
|
||||
|
@ -18,18 +18,18 @@ import 'dart:io';
|
||||
|
||||
import 'package:file_picker/file_picker.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
||||
import 'package:flutter_gen/gen_l10n/app_localizations.dart';
|
||||
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
||||
|
||||
import '../../app/message.dart';
|
||||
import '../../app/models.dart';
|
||||
import '../../app/shortcuts.dart';
|
||||
import '../../app/state.dart';
|
||||
import '../../app/models.dart';
|
||||
import '../../core/state.dart';
|
||||
import '../features.dart' as features;
|
||||
import '../keys.dart' as keys;
|
||||
import '../models.dart';
|
||||
import '../state.dart';
|
||||
import '../keys.dart' as keys;
|
||||
import '../features.dart' as features;
|
||||
import 'authentication_dialog.dart';
|
||||
import 'delete_certificate_dialog.dart';
|
||||
import 'generate_key_dialog.dart';
|
||||
|
@ -21,8 +21,8 @@ import 'package:flutter_riverpod/flutter_riverpod.dart';
|
||||
|
||||
import '../../app/models.dart';
|
||||
import '../../exception/cancellation_exception.dart';
|
||||
import '../../widgets/responsive_dialog.dart';
|
||||
import '../../widgets/app_text_field.dart';
|
||||
import '../../widgets/responsive_dialog.dart';
|
||||
import '../keys.dart' as keys;
|
||||
import '../models.dart';
|
||||
import '../state.dart';
|
||||
|
@ -23,9 +23,9 @@ import '../../app/models.dart';
|
||||
import '../../app/state.dart';
|
||||
import '../../exception/cancellation_exception.dart';
|
||||
import '../../widgets/responsive_dialog.dart';
|
||||
import '../keys.dart' as keys;
|
||||
import '../models.dart';
|
||||
import '../state.dart';
|
||||
import '../keys.dart' as keys;
|
||||
|
||||
class DeleteCertificateDialog extends ConsumerWidget {
|
||||
final DevicePath devicePath;
|
||||
|
@ -22,9 +22,9 @@ import '../../app/message.dart';
|
||||
import '../../app/models.dart';
|
||||
import '../../app/state.dart';
|
||||
import '../../core/models.dart';
|
||||
import '../../widgets/app_text_field.dart';
|
||||
import '../../widgets/choice_filter_chip.dart';
|
||||
import '../../widgets/responsive_dialog.dart';
|
||||
import '../../widgets/app_text_field.dart';
|
||||
import '../keys.dart' as keys;
|
||||
import '../models.dart';
|
||||
import '../state.dart';
|
||||
|
@ -23,8 +23,8 @@ import 'package:flutter_riverpod/flutter_riverpod.dart';
|
||||
import '../../app/message.dart';
|
||||
import '../../app/models.dart';
|
||||
import '../../app/state.dart';
|
||||
import '../../widgets/responsive_dialog.dart';
|
||||
import '../../widgets/app_text_field.dart';
|
||||
import '../../widgets/responsive_dialog.dart';
|
||||
import '../keys.dart' as keys;
|
||||
import '../models.dart';
|
||||
import '../state.dart';
|
||||
|
@ -15,16 +15,16 @@
|
||||
*/
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
||||
import 'package:flutter_gen/gen_l10n/app_localizations.dart';
|
||||
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
||||
|
||||
import '../../app/message.dart';
|
||||
import '../../app/models.dart';
|
||||
import '../../app/views/fs_dialog.dart';
|
||||
import '../../app/views/action_list.dart';
|
||||
import '../models.dart';
|
||||
import '../keys.dart' as keys;
|
||||
import '../../app/views/fs_dialog.dart';
|
||||
import '../features.dart' as features;
|
||||
import '../keys.dart' as keys;
|
||||
import '../models.dart';
|
||||
import 'manage_key_dialog.dart';
|
||||
import 'manage_pin_puk_dialog.dart';
|
||||
import 'reset_dialog.dart';
|
||||
|
@ -20,8 +20,8 @@ import 'package:flutter_riverpod/flutter_riverpod.dart';
|
||||
|
||||
import '../../app/message.dart';
|
||||
import '../../app/models.dart';
|
||||
import '../../widgets/responsive_dialog.dart';
|
||||
import '../../widgets/app_text_field.dart';
|
||||
import '../../widgets/responsive_dialog.dart';
|
||||
import '../keys.dart' as keys;
|
||||
import '../state.dart';
|
||||
|
||||
|
@ -20,8 +20,8 @@ import 'package:flutter_riverpod/flutter_riverpod.dart';
|
||||
|
||||
import '../../app/models.dart';
|
||||
import '../../exception/cancellation_exception.dart';
|
||||
import '../../widgets/responsive_dialog.dart';
|
||||
import '../../widgets/app_text_field.dart';
|
||||
import '../../widgets/responsive_dialog.dart';
|
||||
import '../keys.dart' as keys;
|
||||
import '../state.dart';
|
||||
|
||||
|
@ -27,9 +27,9 @@ import '../../app/views/app_page.dart';
|
||||
import '../../app/views/message_page.dart';
|
||||
import '../../core/state.dart';
|
||||
import '../../widgets/list_title.dart';
|
||||
import '../features.dart' as features;
|
||||
import '../models.dart';
|
||||
import '../state.dart';
|
||||
import '../features.dart' as features;
|
||||
import 'actions.dart';
|
||||
import 'key_actions.dart';
|
||||
import 'slot_dialog.dart';
|
||||
|
@ -19,10 +19,10 @@ import 'package:flutter_gen/gen_l10n/app_localizations.dart';
|
||||
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
||||
|
||||
import '../../app/message.dart';
|
||||
import '../../widgets/responsive_dialog.dart';
|
||||
import '../state.dart';
|
||||
import '../../app/models.dart';
|
||||
import '../../app/state.dart';
|
||||
import '../../widgets/responsive_dialog.dart';
|
||||
import '../state.dart';
|
||||
|
||||
class ResetDialog extends ConsumerWidget {
|
||||
final DevicePath devicePath;
|
||||
|
@ -19,8 +19,8 @@ import 'package:flutter_gen/gen_l10n/app_localizations.dart';
|
||||
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
||||
|
||||
import '../../app/state.dart';
|
||||
import '../../app/views/fs_dialog.dart';
|
||||
import '../../app/views/action_list.dart';
|
||||
import '../../app/views/fs_dialog.dart';
|
||||
import '../models.dart';
|
||||
import '../state.dart';
|
||||
import 'actions.dart';
|
||||
|
@ -16,7 +16,8 @@
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_gen/gen_l10n/app_localizations.dart';
|
||||
import 'package:yubico_authenticator/core/state.dart';
|
||||
|
||||
import '../core/state.dart';
|
||||
|
||||
class ResponsiveDialog extends StatefulWidget {
|
||||
final Widget? title;
|
||||
|
Loading…
Reference in New Issue
Block a user