From 36e0099c4a9e7ab89f70734db26c5489d46d765d Mon Sep 17 00:00:00 2001 From: Matan Lurey Date: Fri, 27 Dec 2024 14:15:54 -0800 Subject: [PATCH] Bump `flutter_template_images` to remove TODO. (#160917) Towards https://github.com/flutter/flutter/issues/160692. Prior to `flutter_template_images: 4.3.0`, the `app_shared` directory was required. In 4.3.0 it was forked back out to `app` (https://pub.dev/packages/flutter_template_images/changelog), as the `skeleton` template has been removed, and the `skeleton` template was the (only) reason for `app_shared` (to share code between `app` and `skeleton`). This is a NOP change tested by existing tests. --- packages/flutter_tools/lib/src/template.dart | 11 +---------- .../flutter_tools/lib/src/update_packages_pins.dart | 2 +- packages/flutter_tools/pubspec.yaml | 4 ++-- 3 files changed, 4 insertions(+), 13 deletions(-) diff --git a/packages/flutter_tools/lib/src/template.dart b/packages/flutter_tools/lib/src/template.dart index 6b6a7e8e42..0843be0591 100644 --- a/packages/flutter_tools/lib/src/template.dart +++ b/packages/flutter_tools/lib/src/template.dart @@ -173,22 +173,13 @@ class Template { required Logger logger, required TemplateRenderer templateRenderer, }) async { - // TODO(matanl): Remove this once https://github.com/flutter/packages/pull/8336 is merged and published. - // See https://github.com/flutter/flutter/issues/160692. - final List imageNames; - if (names.contains('app')) { - // Emulates what used to happen when app_shared existed. It still exist in package:flutter_template_images. - imageNames = [...names, 'app_shared']; - } else { - imageNames = names; - } // All named templates are placed in the 'templates' directory return Template._( [ for (final String name in names) templatePathProvider.directoryInPackage(name, fileSystem), ], [ - for (final String name in imageNames) + for (final String name in names) if ((await templatePathProvider.imageDirectory(name, fileSystem, logger)).existsSync()) await templatePathProvider.imageDirectory(name, fileSystem, logger), ], diff --git a/packages/flutter_tools/lib/src/update_packages_pins.dart b/packages/flutter_tools/lib/src/update_packages_pins.dart index 0d766655bd..38a7b1e548 100644 --- a/packages/flutter_tools/lib/src/update_packages_pins.dart +++ b/packages/flutter_tools/lib/src/update_packages_pins.dart @@ -22,7 +22,7 @@ const Map kManuallyPinnedDependencies = { // Add pinned packages here. Please leave a comment explaining why. 'archive': '3.6.1', // https://github.com/flutter/flutter/issues/115660 'flutter_gallery_assets': '1.0.2', // Tests depend on the exact version. - 'flutter_template_images': '4.2.0', // Must always exactly match flutter_tools template. + 'flutter_template_images': '4.3.0', // Must always exactly match flutter_tools template. 'google_mobile_ads': '5.1.0', // https://github.com/flutter/flutter/issues/156912 'intl': '0.19.0', // 0.20.0 introduces new transitive dependencies that are not (yet) cleared in Flutter's allow list. diff --git a/packages/flutter_tools/pubspec.yaml b/packages/flutter_tools/pubspec.yaml index 541482ea14..8c82362190 100644 --- a/packages/flutter_tools/pubspec.yaml +++ b/packages/flutter_tools/pubspec.yaml @@ -20,7 +20,7 @@ dependencies: crypto: 3.0.6 ffi: 2.1.3 file: 7.0.1 - flutter_template_images: 4.2.0 + flutter_template_images: 4.3.0 html: 0.15.5 http: 1.2.2 intl: 0.19.0 @@ -121,4 +121,4 @@ dartdoc: # Exclude this package from the hosted API docs. nodoc: true -# PUBSPEC CHECKSUM: fe3b +# PUBSPEC CHECKSUM: 233c