Fix some deprecation issues

This commit is contained in:
Dain Nilsson 2024-07-03 12:44:20 +02:00
parent 7f1c849506
commit d9227990be
No known key found for this signature in database
GPG Key ID: F04367096FBA95E8
10 changed files with 17 additions and 5 deletions

View File

@ -15,6 +15,7 @@
*/ */
@Tags(['desktop', 'android']) @Tags(['desktop', 'android'])
library;
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter_test/flutter_test.dart'; import 'package:flutter_test/flutter_test.dart';

View File

@ -15,6 +15,8 @@
*/ */
@Tags(['desktop', 'management']) @Tags(['desktop', 'management'])
library;
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter_test/flutter_test.dart'; import 'package:flutter_test/flutter_test.dart';
import 'package:integration_test/integration_test.dart'; import 'package:integration_test/integration_test.dart';

View File

@ -15,6 +15,8 @@
*/ */
@Tags(['android', 'desktop', 'oath']) @Tags(['android', 'desktop', 'oath'])
library;
import 'package:flutter_test/flutter_test.dart'; import 'package:flutter_test/flutter_test.dart';
import 'package:integration_test/integration_test.dart'; import 'package:integration_test/integration_test.dart';
import 'package:yubico_authenticator/app/views/keys.dart'; import 'package:yubico_authenticator/app/views/keys.dart';

View File

@ -15,6 +15,8 @@
*/ */
@Tags(['desktop', 'otp']) @Tags(['desktop', 'otp'])
library;
import 'package:flutter_test/flutter_test.dart'; import 'package:flutter_test/flutter_test.dart';
import 'package:integration_test/integration_test.dart'; import 'package:integration_test/integration_test.dart';
import 'package:yubico_authenticator/app/views/keys.dart'; import 'package:yubico_authenticator/app/views/keys.dart';

View File

@ -15,6 +15,8 @@
*/ */
@Tags(['desktop', 'passkey']) @Tags(['desktop', 'passkey'])
library;
import 'package:flutter_test/flutter_test.dart'; import 'package:flutter_test/flutter_test.dart';
import 'package:integration_test/integration_test.dart'; import 'package:integration_test/integration_test.dart';
import 'package:yubico_authenticator/fido/keys.dart'; import 'package:yubico_authenticator/fido/keys.dart';

View File

@ -15,6 +15,8 @@
*/ */
@Tags(['desktop', 'piv']) @Tags(['desktop', 'piv'])
library;
import 'package:flutter/services.dart'; import 'package:flutter/services.dart';
import 'package:flutter_test/flutter_test.dart'; import 'package:flutter_test/flutter_test.dart';
import 'package:integration_test/integration_test.dart'; import 'package:integration_test/integration_test.dart';

View File

@ -19,4 +19,5 @@ import 'package:yubico_authenticator/desktop/init.dart';
Future<void> startUp(WidgetTester tester, Future<void> startUp(WidgetTester tester,
[Map<dynamic, dynamic>? startUpParams]) async => [Map<dynamic, dynamic>? startUpParams]) async =>
tester.pumpWidget(await initialize([]), const Duration(milliseconds: 2000)); tester.pumpWidget(await initialize([]),
duration: const Duration(milliseconds: 2000));

View File

@ -427,7 +427,7 @@ class _FidoUnlockedPageState extends ConsumerState<_FidoUnlockedPage> {
onFieldSubmitted: (value) { onFieldSubmitted: (value) {
Focus.of(context).focusInDirection(TraversalDirection.down); Focus.of(context).focusInDirection(TraversalDirection.down);
}, },
), ).init(),
); );
}), }),
), ),

View File

@ -429,7 +429,7 @@ class _UnlockedViewState extends ConsumerState<_UnlockedView> {
onFieldSubmitted: (value) { onFieldSubmitted: (value) {
Focus.of(context).focusInDirection(TraversalDirection.down); Focus.of(context).focusInDirection(TraversalDirection.down);
}, },
), ).init(),
); );
}), }),
), ),

View File

@ -57,7 +57,7 @@ class UseRecommendedWidget extends DartLintRule {
) { ) {
context.registry.addInstanceCreationExpression((node) { context.registry.addInstanceCreationExpression((node) {
if (node.constructorName.toString() == discouraged) { if (node.constructorName.toString() == discouraged) {
reporter.reportErrorForNode(code, node.constructorName); reporter.atNode(node.constructorName, code);
} }
}); });
} }
@ -89,7 +89,7 @@ class CallInitAfterCreation extends DartLintRule {
return; return;
} }
} }
reporter.reportErrorForNode(code, node.constructorName); reporter.atNode(node.constructorName, code);
} }
}); });
} }