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:   }
  
    // Generates any missing basic files for the dynamic feature into a temporary directory.
    Future<Map<String, List<File>>> generateFiles({Directory alternateAndroidDir, bool clearAlternateOutputDir = false}) async {
      final Directory outputDir = alternateAndroidDir?.childDirectory(name) ?? componentDir;
      if (clearAlternateOutputDir && alternateAndroidDir != null) {
        ErrorHandlingFileSystem.deleteIfExists(outputDir);
  
negative.code: // Use of this source code is governed by a BSD-style license that can be
  // found in the LICENSE file.
  
  import 'package:xml/xml.dart';
  
  import '../base/deferred_component.dart';
  