diff --git a/analysis_options.yaml b/analysis_options.yaml index 59a83c1bd6..f396f0c08f 100644 --- a/analysis_options.yaml +++ b/analysis_options.yaml @@ -1,6 +1,4 @@ -include: package:pedantic/analysis_options.1.11.0.yaml -# To see flutter_lints, uncomment this line instead -# include: package:flutter_lints/flutter.yaml +include: package:flutter_lints/flutter.yaml analyzer: strong-mode: @@ -8,25 +6,24 @@ analyzer: implicit-dynamic: false linter: - # In addition to the pedantic lints + # In addition to the flutter_lints rules: + - always_declare_return_types - avoid_types_on_closure_parameters - avoid_void_async - camel_case_types - cancel_subscriptions - close_sinks - - constant_identifier_names - - control_flow_in_finally - directives_ordering - - empty_statements + - flutter_style_todos - hash_and_equals - - implementation_imports - non_constant_identifier_names - package_api_docs - - package_names - package_prefixed_library_names - - prefer_const_constructors - - prefer_const_literals_to_create_immutables + - prefer_single_quotes + - sort_child_properties_last - test_types_in_equals - throw_in_finally + - unawaited_futures - unnecessary_statements + - unsafe_html diff --git a/lib/pages/settings.dart b/lib/pages/settings.dart index 5bf0c73d4a..43ecb0bb9a 100644 --- a/lib/pages/settings.dart +++ b/lib/pages/settings.dart @@ -83,7 +83,6 @@ class _SettingsPageState extends State { /// native name can't be determined, it is omitted. If the locale can't be /// determined, the locale code is used. DisplayOption _getLocaleDisplayOption(BuildContext context, Locale locale) { - // TODO: gsw, fil, and es_419 aren't in flutter_localized_countries' dataset final localeCode = locale.toString(); final localeName = LocaleNames.of(context).nameOf(localeCode); if (localeName != null) { @@ -93,6 +92,8 @@ class _SettingsPageState extends State { ? DisplayOption(localeNativeName, subtitle: localeName) : DisplayOption(localeName); } else { + // gsw, fil, and es_419 aren't in flutter_localized_countries' dataset + // so we handle them separately switch (localeCode) { case 'gsw': return DisplayOption('Schwiizertüütsch', subtitle: 'Swiss German'); diff --git a/lib/studies/rally/finance.dart b/lib/studies/rally/finance.dart index a9e14e0612..f1a5048e92 100644 --- a/lib/studies/rally/finance.dart +++ b/lib/studies/rally/finance.dart @@ -109,10 +109,7 @@ class FinancialEntityCategoryView extends StatelessWidget { label: semanticsLabel, ), excludeSemantics: true, - // TODO(shihaohong): State restoration of - // FinancialEntityCategoryDetailsPage on mobile is blocked because - // OpenContainer does not support restorablePush. - // See https://github.com/flutter/flutter/issues/69924. + // TODO(x): State restoration of FinancialEntityCategoryDetailsPage on mobile is blocked because OpenContainer does not support restorablePush, https://github.com/flutter/gallery/issues/570. child: OpenContainer( transitionDuration: const Duration(milliseconds: 350), transitionType: ContainerTransitionType.fade, diff --git a/lib/studies/reply/adaptive_nav.dart b/lib/studies/reply/adaptive_nav.dart index c453f8ce0b..51f40abb29 100644 --- a/lib/studies/reply/adaptive_nav.dart +++ b/lib/studies/reply/adaptive_nav.dart @@ -1219,9 +1219,7 @@ class _ReplyFabState extends State<_ReplyFab> ), ); } else { - // TODO(shihaohong): State restoration of compose page on mobile is - // blocked because OpenContainer does not support restorablePush. - // See https://github.com/flutter/flutter/issues/69924. + // TODO(x): State restoration of compose page on mobile is blocked because OpenContainer does not support restorablePush, https://github.com/flutter/gallery/issues/570. return OpenContainer( openBuilder: (context, closedContainer) { return const ComposePage(); diff --git a/lib/studies/reply/mail_card_preview.dart b/lib/studies/reply/mail_card_preview.dart index 908abf1651..8806f463c6 100644 --- a/lib/studies/reply/mail_card_preview.dart +++ b/lib/studies/reply/mail_card_preview.dart @@ -35,9 +35,7 @@ class MailPreviewCard extends StatelessWidget { Widget build(BuildContext context) { final theme = Theme.of(context); - // TODO(shihaohong): State restoration of mail view page is - // blocked because OpenContainer does not support restorablePush. - // See https://github.com/flutter/flutter/issues/69924. + // TODO(x): State restoration of mail view page is blocked because OpenContainer does not support restorablePush, https://github.com/flutter/gallery/issues/570. return OpenContainer( openBuilder: (context, closedContainer) { return MailViewPage(id: id, email: email); diff --git a/pubspec.lock b/pubspec.lock index afcdf2f8ca..ee05de24ba 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -430,20 +430,13 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "2.0.4" - pedantic: - dependency: "direct dev" - description: - name: pedantic - url: "https://pub.dartlang.org" - source: hosted - version: "1.11.1" platform: dependency: transitive description: name: platform url: "https://pub.dartlang.org" source: hosted - version: "3.0.2" + version: "3.1.0" plugin_platform_interface: dependency: transitive description: @@ -742,7 +735,7 @@ packages: name: vm_service url: "https://pub.dartlang.org" source: hosted - version: "7.3.0" + version: "7.5.0" watcher: dependency: transitive description: diff --git a/pubspec.yaml b/pubspec.yaml index c44ac5e561..4ec069030b 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -40,7 +40,6 @@ dev_dependencies: flutter_lints: ^1.0.2 grinder: ^0.9.0 path: ^1.8.0 - pedantic: ^1.11.0 string_scanner: ^1.1.0 test: ^1.16.8 web_benchmarks: ^0.0.5 diff --git a/test/restoration_test.dart b/test/restoration_test.dart index be00002dd2..34970c6940 100644 --- a/test/restoration_test.dart +++ b/test/restoration_test.dart @@ -182,6 +182,7 @@ void main() { variant: const TargetPlatformVariant( {TargetPlatform.android}, ), - skip: true, // TODO: Investigate why Inbox tap is failing. In App it works. + skip: true, + // TODO(x): State restoration test is failing at Inbox tap is failing, but works in App, https://github.com/flutter/gallery/issues/570. ); } diff --git a/test_benchmarks/benchmarks/scroll.dart b/test_benchmarks/benchmarks/scroll.dart index 47301c92f1..04eb1dcb07 100644 --- a/test_benchmarks/benchmarks/scroll.dart +++ b/test_benchmarks/benchmarks/scroll.dart @@ -102,8 +102,6 @@ Future scrollUntilVisible({ double pixelsToBeMoved; switch (scrollable.axisDirection) { - /* TODO for the future: - add support for other directions and other alignment policies. */ case AxisDirection.down: pixelsToBeMoved = elementRect.top - visibleWindow.top; break; diff --git a/test_benchmarks/benchmarks_test.dart b/test_benchmarks/benchmarks_test.dart index 69bf4df411..3eaed071c7 100644 --- a/test_benchmarks/benchmarks_test.dart +++ b/test_benchmarks/benchmarks_test.dart @@ -25,7 +25,7 @@ Future main() async { test('Can run a web benchmark', () async { stdout.writeln('Starting web benchmark tests ...'); - // TODO: re-enable this test (https://github.com/flutter/gallery/issues/463) + // TODO(pennzht): Re-enable this test, https://github.com/flutter/gallery/issues/463. return; // ignore: dead_code final taskResult = await serveWebBenchmark(