1
0
mirror of https://github.com/flutter/samples.git synced 2026-03-30 16:23:23 +00:00

Deps update, utilize super.key (#1265)

* Deps update, utilize `super.key`

* `flutter format`
This commit is contained in:
Brett Morgan
2022-05-13 12:31:56 -07:00
committed by GitHub
parent 52ef797b9a
commit 58bc5d7a58
244 changed files with 449 additions and 500 deletions

View File

@@ -108,7 +108,7 @@ class Sample {
var screenshotUrl = screenshots.first.url;
var prefix = path.dirname(screenshotUrl);
var filename = path.basenameWithoutExtension(screenshotUrl);
return path.join(prefix, filename + '_thumb.png');
return path.join(prefix, '${filename}_thumb.png');
}
String get searchAttributes {
@@ -155,7 +155,7 @@ class Sample {
if (description.length < 64) {
return description;
}
return description.substring(0, 64) + '...';
return '${description.substring(0, 64)}...';
}
}

View File

@@ -69,12 +69,12 @@ String searchQueryFromParams(Map<String, String> params) {
if (params.containsKey('type')) {
if (buf.isNotEmpty) buf.write(' ');
var value = params['type'];
if (value != null) buf.write('type:' + value);
if (value != null) buf.write('type:$value');
}
if (params.containsKey('platform')) {
if (buf.isNotEmpty) buf.write(' ');
var value = params['platform'];
if (value != null) buf.write('platform:' + value);
if (value != null) buf.write('platform:$value');
}
return buf.toString();

View File

@@ -5,7 +5,7 @@
import 'dart:convert';
String indent(String content, int spaces) =>
LineSplitter.split(content).join('\n' + ' ' * spaces);
LineSplitter.split(content).join('\n${' ' * spaces}');
String kebabCase(String input) => _fixCase(input, '-');

View File

@@ -15,7 +15,7 @@ dependencies:
html: ^0.15.0
dev_dependencies:
grinder: ^0.9.0
flutter_lints: ^1.0.0
flutter_lints: ^2.0.1
test: ^1.17.10
json_serializable: ^6.1.5
build: ^2.0.3

View File

@@ -105,7 +105,7 @@ Future<void> _createThumbnails(Directory directory) async {
}
var pathPrefix = path.dirname(entity.path);
var thumbnailFile = File(path.join(pathPrefix, filename + '_thumb.png'));
var thumbnailFile = File(path.join(pathPrefix, '${filename}_thumb.png'));
var img = image.decodeImage(await entity.readAsBytes());
var resized = image.copyResize(img!, width: 640);