Misc example clean up and updates - #13847
Conversation
parlough
commented
Sep 2, 2026
- Enable and fix some new lints.
- Tighten some dependency constraints.
- Use newer, preferred versions of some functions.
- Improve formatting and clarity of some inline and doc comments.
|
Staged preview of the updated docs.flutter.dev site (updated for commit a553e63): https://flutter-docs-prod--docs-pr13847-misc-example-misc-clea-o0fbwshk.web.app |
|
Staged preview of the updated flutter.dev site (updated for commit a553e63): https://flutter-dev-230821--www-pr13847-misc-example-misc-clea-67vo11k1.web.app |
There was a problem hiding this comment.
Code Review
This pull request introduces various code quality, linting, and dependency updates across multiple Flutter examples and documentation files. Key changes include enabling strict-inference, specifying generic type arguments for Futures and dialogs, updating JSON parsing signatures to use Map<String, Object?>, and upgrading several dev dependencies. The review feedback correctly points out that replacing .catchError with .onError<Exception> in futures.dart and its documentation will fail to catch subclasses of Error (such as TypeError), which could lead to unhandled runtime crashes. It is recommended to use .onError<Object> instead to safely catch all asynchronous errors.