From 353d12a63edad8d3d36106f30d34a2f19b87a95e Mon Sep 17 00:00:00 2001 From: Timm Preetz Date: Mon, 19 Aug 2024 21:24:48 +0200 Subject: [PATCH] Stricter analysis options Prepare release --- CHANGELOG.md | 6 ++++++ analysis_options.yaml | 16 ++++++++++++++-- example/pubspec.lock | 2 +- lib/src/declarative_navigator.dart | 8 ++++---- pubspec.yaml | 2 +- 5 files changed, 26 insertions(+), 8 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index eec4671..8b260e2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,9 @@ +## 0.0.3 + +* Add CI +* Publish tags automatically from GitHub +* Stricter analysis options + ## 0.0.2 * Switch to new Flutter 3.24.0 Navigator API: `onDidRemovePage` diff --git a/analysis_options.yaml b/analysis_options.yaml index a5744c1..05f8b0c 100644 --- a/analysis_options.yaml +++ b/analysis_options.yaml @@ -1,4 +1,16 @@ include: package:flutter_lints/flutter.yaml -# Additional information about this file can be found at -# https://dart.dev/guides/language/analysis-options +linter: + rules: + always_declare_return_types: true + avoid_void_async: true + prefer_final_fields: true + prefer_final_in_for_each: true + prefer_final_locals: true + prefer_single_quotes: true + unawaited_futures: true + +analyzer: + language: + strict-casts: true + strict-raw-types: true diff --git a/example/pubspec.lock b/example/pubspec.lock index 2d55253..4727745 100644 --- a/example/pubspec.lock +++ b/example/pubspec.lock @@ -63,7 +63,7 @@ packages: path: ".." relative: true source: path - version: "0.0.2" + version: "0.0.3" flutter: dependency: "direct main" description: flutter diff --git a/lib/src/declarative_navigator.dart b/lib/src/declarative_navigator.dart index fb895c2..554e1ce 100644 --- a/lib/src/declarative_navigator.dart +++ b/lib/src/declarative_navigator.dart @@ -123,7 +123,7 @@ class __ManagingDeclarativeNavigatorState sealed class DeclarativeNavigatable {} -typedef PageBuilder = Page Function(VoidCallback? onPop); +typedef PageBuilder = Page Function(VoidCallback? onPop); class DeclarativeNavigatablePage implements DeclarativeNavigatable { DeclarativeNavigatablePage({ @@ -134,7 +134,7 @@ class DeclarativeNavigatablePage implements DeclarativeNavigatable { final PageBuilder _builder; - final Page page; + final Page page; final VoidCallback? onPop; } @@ -225,7 +225,7 @@ extension DeclarativeNavigatableFromWidget on Widget { } } -class _CupertinoModalPopupPage extends Page { +class _CupertinoModalPopupPage extends Page { const _CupertinoModalPopupPage({ super.key, super.name, @@ -237,7 +237,7 @@ class _CupertinoModalPopupPage extends Page { final Widget child; @override - Route createRoute(BuildContext context) { + Route createRoute(BuildContext context) { return CupertinoModalPopupRoute( settings: this, barrierDismissible: true, // TODO(tp): Adapt diff --git a/pubspec.yaml b/pubspec.yaml index 7f98afd..7b1f6ee 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,6 +1,6 @@ name: fdr description: "Fully declarative routing for Flutter applications." -version: 0.0.2 +version: 0.0.3 homepage: "https://github.com/relentless-works/fdr" repository: "https://github.com/relentless-works/fdr"