diff --git a/integration_test/keyless_test.dart b/integration_test/keyless_test.dart index 6c8a20ee..039386e3 100644 --- a/integration_test/keyless_test.dart +++ b/integration_test/keyless_test.dart @@ -15,6 +15,7 @@ */ @Tags(['desktop', 'android']) +library; import 'package:flutter/material.dart'; import 'package:flutter_test/flutter_test.dart'; diff --git a/integration_test/management_test.dart b/integration_test/management_test.dart index ee5667d3..72a03c5d 100644 --- a/integration_test/management_test.dart +++ b/integration_test/management_test.dart @@ -15,6 +15,8 @@ */ @Tags(['desktop', 'management']) +library; + import 'package:flutter/material.dart'; import 'package:flutter_test/flutter_test.dart'; import 'package:integration_test/integration_test.dart'; diff --git a/integration_test/oath_test.dart b/integration_test/oath_test.dart index 82c6101d..3a2fc252 100644 --- a/integration_test/oath_test.dart +++ b/integration_test/oath_test.dart @@ -15,6 +15,8 @@ */ @Tags(['android', 'desktop', 'oath']) +library; + import 'package:flutter_test/flutter_test.dart'; import 'package:integration_test/integration_test.dart'; import 'package:yubico_authenticator/app/views/keys.dart'; diff --git a/integration_test/otp_test.dart b/integration_test/otp_test.dart index ed97ee79..8d1284e0 100644 --- a/integration_test/otp_test.dart +++ b/integration_test/otp_test.dart @@ -15,6 +15,8 @@ */ @Tags(['desktop', 'otp']) +library; + import 'package:flutter_test/flutter_test.dart'; import 'package:integration_test/integration_test.dart'; import 'package:yubico_authenticator/app/views/keys.dart'; diff --git a/integration_test/passkey_test.dart b/integration_test/passkey_test.dart index d0961260..868c1b75 100644 --- a/integration_test/passkey_test.dart +++ b/integration_test/passkey_test.dart @@ -15,6 +15,8 @@ */ @Tags(['desktop', 'passkey']) +library; + import 'package:flutter_test/flutter_test.dart'; import 'package:integration_test/integration_test.dart'; import 'package:yubico_authenticator/fido/keys.dart'; diff --git a/integration_test/piv_test.dart b/integration_test/piv_test.dart index fa986a85..d31dac6e 100644 --- a/integration_test/piv_test.dart +++ b/integration_test/piv_test.dart @@ -15,6 +15,8 @@ */ @Tags(['desktop', 'piv']) +library; + import 'package:flutter/services.dart'; import 'package:flutter_test/flutter_test.dart'; import 'package:integration_test/integration_test.dart'; diff --git a/integration_test/utils/desktop/util.dart b/integration_test/utils/desktop/util.dart index df0adf0f..63a2047d 100644 --- a/integration_test/utils/desktop/util.dart +++ b/integration_test/utils/desktop/util.dart @@ -19,4 +19,5 @@ import 'package:yubico_authenticator/desktop/init.dart'; Future startUp(WidgetTester tester, [Map? startUpParams]) async => - tester.pumpWidget(await initialize([]), const Duration(milliseconds: 2000)); + tester.pumpWidget(await initialize([]), + duration: const Duration(milliseconds: 2000)); diff --git a/lib/fido/views/passkeys_screen.dart b/lib/fido/views/passkeys_screen.dart index 18b1b60b..4708e2b9 100644 --- a/lib/fido/views/passkeys_screen.dart +++ b/lib/fido/views/passkeys_screen.dart @@ -427,7 +427,7 @@ class _FidoUnlockedPageState extends ConsumerState<_FidoUnlockedPage> { onFieldSubmitted: (value) { Focus.of(context).focusInDirection(TraversalDirection.down); }, - ), + ).init(), ); }), ), diff --git a/lib/oath/views/oath_screen.dart b/lib/oath/views/oath_screen.dart index b0c2eda0..51087cde 100755 --- a/lib/oath/views/oath_screen.dart +++ b/lib/oath/views/oath_screen.dart @@ -429,7 +429,7 @@ class _UnlockedViewState extends ConsumerState<_UnlockedView> { onFieldSubmitted: (value) { Focus.of(context).focusInDirection(TraversalDirection.down); }, - ), + ).init(), ); }), ), diff --git a/lint/lib/lint.dart b/lint/lib/lint.dart index c3ffc036..17023c7c 100644 --- a/lint/lib/lint.dart +++ b/lint/lib/lint.dart @@ -57,7 +57,7 @@ class UseRecommendedWidget extends DartLintRule { ) { context.registry.addInstanceCreationExpression((node) { if (node.constructorName.toString() == discouraged) { - reporter.reportErrorForNode(code, node.constructorName); + reporter.atNode(node.constructorName, code); } }); } @@ -89,7 +89,7 @@ class CallInitAfterCreation extends DartLintRule { return; } } - reporter.reportErrorForNode(code, node.constructorName); + reporter.atNode(node.constructorName, code); } }); }