fix compile error in the example code#103261
Conversation
|
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). For more information, open the CLA check for this pull request. |
|
I signed CLA |
There was a problem hiding this comment.
To ensure that we never break this example code again, it would be best to wrap this in a {@tool snippet} section similarly to how it is done here:
flutter/packages/flutter/lib/src/animation/animation.dart
Lines 109 to 123 in 8560d91
That way, this example gets analyzed by the analyzer and doesn't break that easily. Would you be up for refactoring that?
|
To fix one of the analyzer errors you probably need to create an "Examples can assume:" section and add _throwShotAway to it, similar to how it is done here: flutter/packages/flutter/lib/src/foundation/annotations.dart Lines 5 to 6 in e7b7ebc |
|
Thank you. |
7881862 to
ce43be5
Compare
justinmc
left a comment
There was a problem hiding this comment.
LGTM, thanks for the fix 👍
Changes only documentation.
This sample code has compile error on my machine.
Pre-launch Checklist
///).If you need help, consider asking for advice on the #hackers-new channel on Discord.