Skip to content

Conversation

@parlough
Copy link
Member

@parlough parlough commented Jan 6, 2026

Enables and fixes the resulting diagnostics from:

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request enables stricter static analysis for dynamic types, which is a great improvement for the overall code health and maintainability. The changes across the codebase correctly address the new lint rules by providing explicit type arguments and avoiding dynamic. I found one minor issue where an incorrect type argument was used, and I've left a suggestion to fix it. Otherwise, the changes look solid. Well done!


class _AppNavigatorState extends ConsumerState<AppNavigator> {
StreamSubscription? _subscription;
StreamSubscription<void>? _subscription;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

The type argument for StreamSubscription should be String to match the stream it's subscribing to. The surfaceUpdateController.stream is a Stream<String>, so the subscription should be of type StreamSubscription<String>? to correctly reflect the type of data flowing through the stream.

Suggested change
StreamSubscription<void>? _subscription;
StreamSubscription<String>? _subscription;

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In this case, we explicitly don't care about the data flowing through the stream. We only use the subscription for cancellation, so void helps indicate we shouldn't/don't want to access the data through it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant