remove unnecessary string interpolations - #49352
Conversation
Piinks
left a comment
There was a problem hiding this comment.
LGTM! Thank you!
I aded a nit below that you can choose to use or ignore. :)
| cells: <DataCell>[ | ||
| DataCell(Text('${dessert.name}')), | ||
| DataCell(Text(dessert.name)), | ||
| DataCell(Text('${dessert.calories}')), |
There was a problem hiding this comment.
Are some of these needing interpolation? (Other than those appending '%')
There was a problem hiding this comment.
the other are not String. The string interpolation is used to convert the value to String. They could be replaced by expression.toString() (in this case where a string is needed as Text argument). '${expression}' vs. expression.toString() : not sure I can find a winner.
There was a problem hiding this comment.
FWIW, I would have left this one as-is because now there's weird inconsistencies from line to line.
|
This pull request is not suitable for automatic merging in its current state.
|
|
Some of these were guarding null - in particular, in _isolates_io.dart, debugLabel could be null. Returning the uninterpolated value results in returning null instead of |
I just checked. It looks like it was the only place guarding |
Description
Remove unnecessary string interpolations
Related Issues
None
Tests
None
Checklist
Before you create this PR confirm that it meets all requirements listed below by checking the relevant checkboxes (
[x]). This will ensure a smooth and quick review process.///).flutter analyze --flutter-repo) does not report any problems on my PR.Breaking Change
Did any tests fail when you ran them? Please read Handling breaking changes.