diff --git a/analysis_options.yaml b/analysis_options.yaml index ddab027..001f617 100644 --- a/analysis_options.yaml +++ b/analysis_options.yaml @@ -26,8 +26,11 @@ linter: # `// ignore_for_file: name_of_lint` syntax on the line or in the file # producing the lint. rules: - # avoid_print: false # Uncomment to disable the `avoid_print` rule - # prefer_single_quotes: true # Uncomment to enable the `prefer_single_quotes` rule + prefer_single_quotes: true + always_use_package_imports: true + require_trailing_commas: true + avoid_void_async: true + unawaited_futures: true # Additional information about this file can be found at # https://dart.dev/guides/language/analysis-options diff --git a/lib/main.dart b/lib/main.dart index ed9fa24..4aaacbf 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -8,7 +8,7 @@ import 'package:hive_flutter/hive_flutter.dart'; import 'package:hooks_riverpod/hooks_riverpod.dart'; import 'package:http_hive_cache/http_hive_cache.dart'; -Future main() async { +void main() async { LicenseRegistry.addLicense(() async* { yield const LicenseEntryWithLineBreaks(['google_fonts'], mPlus1License); }); diff --git a/lib/view/home/history/history_widget.dart b/lib/view/home/history/history_widget.dart index 1cee7f9..be92f7e 100644 --- a/lib/view/home/history/history_widget.dart +++ b/lib/view/home/history/history_widget.dart @@ -124,7 +124,7 @@ class HistoryWidget extends ConsumerWidget { IconButton( tooltip: '履歴の削除', onPressed: () async { - showDialog( + await showDialog( context: context, builder: (context) => AlertDialog( title: const Text('履歴の削除'), diff --git a/lib/view/widget/home_app_bar_action.dart b/lib/view/widget/home_app_bar_action.dart index 780df80..04a7ddf 100644 --- a/lib/view/widget/home_app_bar_action.dart +++ b/lib/view/widget/home_app_bar_action.dart @@ -42,7 +42,7 @@ class HomeAppBarAction extends StatelessWidget { onSelected: (value) async { switch (value) { case _HomeAction.cache: - showDialog( + await showDialog( context: context, builder: (context) => const CacheClearDialog(), );