Skip to content

Commit 1aff160

Browse files
upgrade: update dependency flutter to v3.27.2 (#632)
This PR contains the following updates: | Package | Update | Change | |---|---|---| | [flutter](https://flutter.dev) ([source](https://redirect.github.com/flutter/flutter)) | patch | `3.27.1` -> `3.27.2` | --- ### Release Notes <details> <summary>flutter/flutter (flutter)</summary> ### [`v3.27.2`](https://redirect.github.com/flutter/flutter/blob/HEAD/CHANGELOG.md#3272) [Compare Source](https://redirect.github.com/flutter/flutter/compare/3.27.1...3.27.2) - [flutter/159729](https://redirect.github.com/flutter/flutter/issues/159729) Flutter module template triggers a warning when built for Android. - [flutter/161176](https://redirect.github.com/flutter/flutter/issues/161176) Dropdown Menu can create an infinite loop. - [flutter/161330](https://redirect.github.com/flutter/flutter/issues/161330) Using ScrollViewKeyboardDismissBehavior.onDrag in a SingleChildScrollView causes text fields to immediately unfocus if the keyboard opening scrolls the text field to keep it visible. - [flutter/160127](https://redirect.github.com/flutter/flutter/issues/160127) Some Flutter web plugins do not add the `crossOrigin` property to <img> tags. - [flutter/160155](https://redirect.github.com/flutter/flutter/issues/160155) Failed assertion in web engine: "The targeted input element must be the active input element". - [flutter/160199](https://redirect.github.com/flutter/flutter/issues/160199) Some images on the web render blank. - [flutter/160459](https://redirect.github.com/flutter/flutter/issues/160459) Incorrect Z order rendering in drawPoints may cause lines to overlap when one should be drawn in front of the other. - [flutter/160409](https://redirect.github.com/flutter/flutter/issues/160409) App may crashes because of obsolete engine assertion. - [flutter/158192](https://redirect.github.com/flutter/flutter/issues/158192) Positions of display cutouts on Android may not update - as returned by MediaQuery and used by SafeArea - upon screen orientation change. </details> --- ### Configuration 📅 **Schedule**: Branch creation - "every weekend" in timezone Asia/Tokyo, Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR was generated by [Mend Renovate](https://mend.io/renovate/). View the [repository job log](https://developer.mend.io/github/FlutterGen/flutter_gen). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOS4xMDcuMCIsInVwZGF0ZWRJblZlciI6IjM5LjEwNy4wIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119--> --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Alex Li <[email protected]>
1 parent 7f44fa5 commit 1aff160

15 files changed

+66
-97
lines changed

.idea/.gitignore

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.tool-versions

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
flutter 3.27.1-stable
1+
flutter 3.27.2-stable

examples/example/lib/gen/assets.gen.dart

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -99,12 +99,12 @@ class $AssetsLottieGen {
9999

100100
/// List of all assets
101101
List<LottieGenImage> get values => [
102-
xuiIZ9X1Rf,
103-
alarmClockLottieV440,
104-
geometricalAnimation,
105-
hamburgerArrow,
106-
spinningCarrousel,
107-
];
102+
xuiIZ9X1Rf,
103+
alarmClockLottieV440,
104+
geometricalAnimation,
105+
hamburgerArrow,
106+
spinningCarrousel,
107+
];
108108
}
109109

110110
class $AssetsMixGen {

packages/core/lib/flutter_generator.dart

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import 'dart:io' show stdout, Directory, File, Platform;
1+
import 'dart:io' show stdout, Directory, File;
22

33
import 'package:dart_style/dart_style.dart' show DartFormatter;
44
import 'package:flutter_gen_core/generators/assets_generator.dart';
@@ -7,7 +7,6 @@ import 'package:flutter_gen_core/generators/fonts_generator.dart';
77
import 'package:flutter_gen_core/settings/config.dart';
88
import 'package:flutter_gen_core/utils/file.dart';
99
import 'package:path/path.dart' show join, normalize;
10-
import 'package:pub_semver/pub_semver.dart' show Version;
1110

1211
class FlutterGenerator {
1312
const FlutterGenerator(
@@ -33,7 +32,7 @@ class FlutterGenerator {
3332
final output = config.pubspec.flutterGen.output;
3433
final lineLength = config.pubspec.flutterGen.lineLength;
3534
final formatter = DartFormatter(
36-
languageVersion: Version.parse(Platform.version.split(' ').first),
35+
languageVersion: DartFormatter.latestLanguageVersion,
3736
pageWidth: lineLength,
3837
lineEnding: '\n',
3938
);

packages/core/lib/generators/integrations/image_integration.dart

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,7 @@ ${isPackage ? "\n static const String package = '$packageName';" : ''}
5959
bool matchTextDirection = false,
6060
bool gaplessPlayback = true,
6161
bool isAntiAlias = false,
62-
${isPackage ? deprecationMessagePackage : ''}
63-
String? package$packageParameter,
62+
${isPackage ? '$deprecationMessagePackage\n' : ''}String? package$packageParameter,
6463
FilterQuality filterQuality = FilterQuality.medium,
6564
int? cacheWidth,
6665
int? cacheHeight,
@@ -95,8 +94,7 @@ ${isPackage ? "\n static const String package = '$packageName';" : ''}
9594
9695
ImageProvider provider({
9796
AssetBundle? bundle,
98-
${isPackage ? deprecationMessagePackage : ''}
99-
String? package$packageParameter,
97+
${isPackage ? '$deprecationMessagePackage\n' : ''}String? package$packageParameter,
10098
}) {
10199
return AssetImage(
102100
_assetName,
@@ -157,7 +155,10 @@ ${isPackage ? "\n static const String package = '$packageName';" : ''}
157155
/// Extract metadata from the asset.
158156
ImageMetadata? _getMetadata(AssetType asset) {
159157
try {
160-
final size = ImageSizeGetter.getSize(FileInput(File(asset.fullPath)));
158+
final result = ImageSizeGetter.getSizeResult(
159+
FileInput(File(asset.fullPath)),
160+
);
161+
final size = result.size;
161162
return ImageMetadata(size.width.toDouble(), size.height.toDouble());
162163
} catch (e) {
163164
stderr

packages/core/lib/generators/integrations/lottie_integration.dart

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,7 @@ ${isPackage ? "\n static const String package = '$packageName';" : ''}
7070
double? height,
7171
BoxFit? fit,
7272
AlignmentGeometry? alignment,
73-
${isPackage ? deprecationMessagePackage : ''}
74-
String? package$packageExpression,
73+
${isPackage ? '$deprecationMessagePackage\n' : ''}String? package$packageExpression,
7574
bool? addRepaintBoundary,
7675
FilterQuality? filterQuality,
7776
void Function(String)? onWarning,

packages/core/lib/generators/integrations/svg_integration.dart

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,7 @@ ${isPackage ? "\n static const String package = '$packageName';" : ''}
4444
Key? key,
4545
bool matchTextDirection = false,
4646
AssetBundle? bundle,
47-
${isPackage ? deprecationMessagePackage : ''}
48-
String? package$packageExpression,
47+
${isPackage ? '$deprecationMessagePackage\n' : ''}String? package$packageExpression,
4948
double? width,
5049
double? height,
5150
BoxFit fit = BoxFit.contain,

packages/core/pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ dependencies:
2929
args: ^2.0.0
3030
pub_semver: ^2.0.0
3131
vector_graphics_compiler: ^1.1.9
32-
image_size_getter: ^2.1.2
32+
image_size_getter: ^2.4.0
3333

3434
dev_dependencies:
3535
lints: any # Ignoring the version to allow editing across SDK versions.

packages/core/test/assets_gen_test.dart

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ void main() {
6060
final pubspec = File('test_resources/pubspec_assets_no_list.yaml');
6161
final config = loadPubspecConfig(pubspec);
6262
final formatter = DartFormatter(
63-
languageVersion: currentDartVersion,
63+
languageVersion: dartFormatterLanguageVersion,
6464
pageWidth: config.pubspec.flutterGen.lineLength,
6565
lineEnding: '\n',
6666
);
@@ -103,9 +103,12 @@ void main() {
103103
});
104104

105105
test('Assets with directory path and package parameter enabled', () async {
106-
const pubspec = 'test_resources/pubspec_assets_directory_path_with_package_parameter.yaml';
107-
const fact = 'test_resources/actual_data/assets_directory_path_with_package_parameter.gen.dart';
108-
const generated = 'test_resources/lib/gen/assets_directory_path_with_package_parameter.gen.dart';
106+
const pubspec =
107+
'test_resources/pubspec_assets_directory_path_with_package_parameter.yaml';
108+
const fact =
109+
'test_resources/actual_data/assets_directory_path_with_package_parameter.gen.dart';
110+
const generated =
111+
'test_resources/lib/gen/assets_directory_path_with_package_parameter.gen.dart';
109112
await expectedAssetsGen(pubspec, generated, fact);
110113
});
111114

@@ -271,8 +274,9 @@ void main() {
271274
buildFile.writeAsStringSync(
272275
File('test_resources/build_assets.yaml').readAsStringSync(),
273276
);
274-
await expectedAssetsGen(pubspec, generated, fact);
275-
buildFile.writeAsStringSync(originalBuildContent);
277+
await expectedAssetsGen(pubspec, generated, fact).whenComplete(() {
278+
buildFile.writeAsStringSync(originalBuildContent);
279+
});
276280
});
277281
});
278282

packages/core/test/colors_gen_test.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ void main() {
2323
final pubspec = File('test_resources/pubspec_colors_no_inputs.yaml');
2424
final config = loadPubspecConfig(pubspec);
2525
final formatter = DartFormatter(
26-
languageVersion: currentDartVersion,
26+
languageVersion: dartFormatterLanguageVersion,
2727
pageWidth: config.pubspec.flutterGen.lineLength,
2828
lineEnding: '\n',
2929
);
@@ -38,7 +38,7 @@ void main() {
3838
final pubspec = File('test_resources/pubspec_colors_no_inputs_list.yaml');
3939
final config = loadPubspecConfig(pubspec);
4040
final formatter = DartFormatter(
41-
languageVersion: currentDartVersion,
41+
languageVersion: dartFormatterLanguageVersion,
4242
pageWidth: config.pubspec.flutterGen.lineLength,
4343
lineEnding: '\n',
4444
);

packages/core/test/fonts_gen_test.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ void main() {
2323
File('test_resources/pubspec_fonts_no_family.yaml'),
2424
);
2525
final formatter = DartFormatter(
26-
languageVersion: currentDartVersion,
26+
languageVersion: dartFormatterLanguageVersion,
2727
pageWidth: config.pubspec.flutterGen.lineLength,
2828
lineEnding: '\n',
2929
);

packages/core/test/gen_test_helper.dart

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,9 @@ import 'package:flutter_gen_core/generators/colors_generator.dart';
77
import 'package:flutter_gen_core/generators/fonts_generator.dart';
88
import 'package:flutter_gen_core/settings/config.dart';
99
import 'package:path/path.dart' as p;
10-
import 'package:pub_semver/pub_semver.dart' show Version;
1110
import 'package:test/test.dart';
1211

13-
final currentDartVersion = Version.parse(Platform.version.split(' ').first);
12+
final dartFormatterLanguageVersion = DartFormatter.latestLanguageVersion;
1413

1514
Future<void> clearTestResults() async {}
1615

@@ -35,7 +34,7 @@ Future<List<String>> runAssetsGen(
3534
stdout.writeln('[DEBUG] test: Generate from API...');
3635
final config = loadPubspecConfig(pubspecFile, buildFile: buildFile);
3736
final formatter = DartFormatter(
38-
languageVersion: currentDartVersion,
37+
languageVersion: dartFormatterLanguageVersion,
3938
pageWidth: config.pubspec.flutterGen.lineLength,
4039
lineEnding: '\n',
4140
);
@@ -79,7 +78,7 @@ Future<List<String>> runColorsGen(
7978
final pubspecFile = File(pubspec);
8079
final config = loadPubspecConfig(pubspecFile);
8180
final formatter = DartFormatter(
82-
languageVersion: currentDartVersion,
81+
languageVersion: dartFormatterLanguageVersion,
8382
pageWidth: config.pubspec.flutterGen.lineLength,
8483
lineEnding: '\n',
8584
);
@@ -123,7 +122,7 @@ Future<List<String>> runFontsGen(
123122
final pubspecFile = File(pubspec);
124123
final config = loadPubspecConfig(pubspecFile);
125124
final formatter = DartFormatter(
126-
languageVersion: currentDartVersion,
125+
languageVersion: dartFormatterLanguageVersion,
127126
pageWidth: config.pubspec.flutterGen.lineLength,
128127
lineEnding: '\n',
129128
);

packages/core/test_resources/actual_data/assets_lottie_integrations.gen.dart

Lines changed: 8 additions & 11 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/core/test_resources/actual_data/assets_no_integrations.gen.dart

Lines changed: 10 additions & 16 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/core/test_resources/actual_data/build_assets.gen.dart

Lines changed: 12 additions & 36 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)