Skip to content

Commit

Permalink
Migrate away from deprecated strong-mode analysis options
Browse files Browse the repository at this point in the history
  • Loading branch information
parlough committed Jul 11, 2023
1 parent a8a0d6b commit 60efdc2
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
7 changes: 4 additions & 3 deletions analysis_options.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
include: package:flutter_lints/flutter.yaml

analyzer:
strong-mode:
implicit-casts: false
implicit-dynamic: false
language:
# strict-casts: true -- DISABLED: Enabled in Dart 2.17
strict-inference: true
strict-raw-types: true
exclude:
- "bin/cache/**"
- "**/*.freezed.dart"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,11 @@ class _SerialAlreadyDisposed extends Error {
String toString() => "An instance of $_type has already been disposed";
}

/// A [SerialDisposable] that constains an underlying stream subscription.
class StreamSubscriptionSerialDisposable
extends SerialDisposable<StreamSubscription> {
/// A [SerialDisposable] that contains an underlying stream subscription.
class StreamSubscriptionSerialDisposable<T>
extends SerialDisposable<StreamSubscription<T>> {
StreamSubscriptionSerialDisposable()
: super((StreamSubscription subscription) async {
: super((StreamSubscription<T> subscription) async {
await subscription.cancel();
return const Unit();
});
Expand Down

0 comments on commit 60efdc2

Please sign in to comment.