diff --git a/packages/flutter_tools/lib/src/template.dart b/packages/flutter_tools/lib/src/template.dart index 60fc5e782812..9089d13796ce 100644 --- a/packages/flutter_tools/lib/src/template.dart +++ b/packages/flutter_tools/lib/src/template.dart @@ -17,7 +17,7 @@ import 'dart/package_map.dart'; /// They are escaped in Kotlin files. /// /// https://kotlinlang.org/docs/keyword-reference.html -const List kReservedKotlinKeywords = ['when', 'in']; +const List kReservedKotlinKeywords = ['when', 'in', 'is']; /// Expands templates in a directory to a destination. All files that must /// undergo template expansion should end with the '.tmpl' extension. All files diff --git a/packages/flutter_tools/test/general.shard/android/template_test.dart b/packages/flutter_tools/test/general.shard/android/template_test.dart index 4b6e031fb9d4..5a915e593122 100644 --- a/packages/flutter_tools/test/general.shard/android/template_test.dart +++ b/packages/flutter_tools/test/general.shard/android/template_test.dart @@ -36,12 +36,12 @@ void main() { ); final Map context = { - 'androidIdentifier': 'in.when.there', + 'androidIdentifier': 'is.in.when.there', }; template.render(destination, context); final File destinationFile = destination.childFile(outputClass); - expect(destinationFile.readAsStringSync(), equals('package `in`.`when`.there;')); + expect(destinationFile.readAsStringSync(), equals('package `is`.`in`.`when`.there;')); }); }