anchor.diff:    // generates default build.gradle and AndroidManifest.xml for the deferred component.
     Future<List<File>> _setupComponentFiles(Directory outputDir) async {
       Template template;
  -    if (_templatesDir != null) {
  -      final Directory templateComponentDir = _templatesDir.childDirectory('module${globals.fs.path.separator}android${globals.fs.path.separator}deferred_component');
  -      template = Template(templateComponentDir, templateComponentDir, _templatesDir,
  +    final Directory? templatesDir = _templatesDir;
  +    if (templatesDir != null) {
  +      final Directory templateComponentDir = templatesDir.childDirectory('module${globals.fs.path.separator}android${globals.fs.path.separator}deferred_component');
  +      template = Template(templateComponentDir, templateComponentDir, templatesDir,
           fileSystem: globals.fs,
           templateManifest: null,
           logger: logger,
  
positive.code: // directory.
  class _DeferredComponentAndroidFiles {
    _DeferredComponentAndroidFiles({
      @required this.name,
      @required this.projectDir,
      this.logger,
      Directory templatesDir,
    }) : _templatesDir = templatesDir;
  
    // The name of the deferred component.
    final String name;
    final Directory projectDir;
    final Logger logger;
    final Directory _templatesDir;
  
    Directory get androidDir => projectDir.childDirectory('android');
    Directory get componentDir => androidDir.childDirectory(name);
  
negative.code:       // wrong string stored.
        for (final XmlElement resources in document.findAllElements('resources')) {
          for (final XmlElement element in resources.findElements('string')) {
            final String? name = element.getAttribute('name');
            if (requiredEntriesMap.containsKey(name)) {
              if (element.text != null && element.text != requiredEntriesMap[name]) {
                element.innerText = requiredEntriesMap[name]!;
                modified = true;
              }
              requiredEntriesMap.remove(name);
            }
          }
          requiredEntriesMap.forEach((String key, String value) {
            modified = true;
            final XmlElement newStringElement = XmlElement(
              XmlName.fromString('string'),
  