-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Open
Labels
P3A lower priority bug or feature requestA lower priority bug or feature requestarea-devexpFor issues related to the analysis server, IDE support, linter, `dart fix`, and diagnostic messages.For issues related to the analysis server, IDE support, linter, `dart fix`, and diagnostic messages.devexp-linterIssues with the analyzer's support for the linter packageIssues with the analyzer's support for the linter packagelinter-lint-proposallinter-status-pendingtype-enhancementA request for a change that isn't a bugA request for a change that isn't a bug
Description
no_nullable_values_in_interpolated_strings
Description
Do not use nullable values in interpolated strings.
Details
TODO:
See: dart-lang/language#2053.
Kind
Error
Good Examples
void main() {
String test = 'hi';
String anotherTest = '$test';
print(anotherTest);
}main() {
String? str = 'there';
print('hi $str');
}String? lastUpdatedTime;
Text('the last updated time is ${lastUpdatedTime!}');Bad Examples
void main() {
String? test;
String anotherTest = '$test';
print(anotherTest);
}String? lastUpdatedTime;
Text('the last updated time is $lastUpdatedTime');Discussion
srawlins and Levi-Lesches
Metadata
Metadata
Assignees
Labels
P3A lower priority bug or feature requestA lower priority bug or feature requestarea-devexpFor issues related to the analysis server, IDE support, linter, `dart fix`, and diagnostic messages.For issues related to the analysis server, IDE support, linter, `dart fix`, and diagnostic messages.devexp-linterIssues with the analyzer's support for the linter packageIssues with the analyzer's support for the linter packagelinter-lint-proposallinter-status-pendingtype-enhancementA request for a change that isn't a bugA request for a change that isn't a bug