Unverified Commit 5456cad3 authored by Christopher Fujino's avatar Christopher Fujino Committed by GitHub

Migrate gen_localizations to null-safety (#86051)

parent a666925a
...@@ -68,11 +68,11 @@ void validateEnglishLocalizations(File file) { ...@@ -68,11 +68,11 @@ void validateEnglishLocalizations(File file) {
} }
final bool optional = atResource.containsKey('optional'); final bool optional = atResource.containsKey('optional');
final String description = atResource['description'] as String; final String? description = atResource['description'] as String?;
if (description == null && !optional) if (description == null && !optional)
errorMessages.writeln('No description specified for $atResourceId'); errorMessages.writeln('No description specified for $atResourceId');
final String plural = atResource['plural'] as String; final String? plural = atResource['plural'] as String?;
final String resourceId = atResourceId.substring(1); final String resourceId = atResourceId.substring(1);
if (plural != null) { if (plural != null) {
final String resourceIdOther = '${resourceId}Other'; final String resourceIdOther = '${resourceId}Other';
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment