Skip to content

Commit

Permalink
Stricter analysis options
Browse files Browse the repository at this point in the history
Prepare release
  • Loading branch information
tp committed Aug 19, 2024
1 parent fe12f9a commit 353d12a
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 8 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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`
Expand Down
16 changes: 14 additions & 2 deletions analysis_options.yaml
Original file line number Diff line number Diff line change
@@ -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
2 changes: 1 addition & 1 deletion example/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ packages:
path: ".."
relative: true
source: path
version: "0.0.2"
version: "0.0.3"
flutter:
dependency: "direct main"
description: flutter
Expand Down
8 changes: 4 additions & 4 deletions lib/src/declarative_navigator.dart
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ class __ManagingDeclarativeNavigatorState

sealed class DeclarativeNavigatable {}

typedef PageBuilder = Page Function(VoidCallback? onPop);
typedef PageBuilder = Page<Object?> Function(VoidCallback? onPop);

class DeclarativeNavigatablePage implements DeclarativeNavigatable {
DeclarativeNavigatablePage({
Expand All @@ -134,7 +134,7 @@ class DeclarativeNavigatablePage implements DeclarativeNavigatable {

final PageBuilder _builder;

final Page page;
final Page<Object?> page;

final VoidCallback? onPop;
}
Expand Down Expand Up @@ -225,7 +225,7 @@ extension DeclarativeNavigatableFromWidget on Widget {
}
}

class _CupertinoModalPopupPage extends Page {
class _CupertinoModalPopupPage<T> extends Page<T> {
const _CupertinoModalPopupPage({
super.key,
super.name,
Expand All @@ -237,7 +237,7 @@ class _CupertinoModalPopupPage extends Page {
final Widget child;

@override
Route createRoute(BuildContext context) {
Route<T> createRoute(BuildContext context) {
return CupertinoModalPopupRoute(
settings: this,
barrierDismissible: true, // TODO(tp): Adapt
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -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"

Expand Down

0 comments on commit 353d12a

Please sign in to comment.