1
0
mirror of https://github.com/flutter/samples.git synced 2025-11-10 14:58:34 +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

@@ -17,7 +17,7 @@ Future<bool> run(
var proc = await Process.start(
commandName,
args,
workingDirectory: Directory.current.path + '/' + workingDir,
workingDirectory: '${Directory.current.path}/$workingDir',
mode: ProcessStartMode.inheritStdio,
);

View File

@@ -21,7 +21,7 @@ packages:
name: lints
url: "https://pub.dartlang.org"
source: hosted
version: "1.0.1"
version: "2.0.0"
markdown:
dependency: "direct main"
description:
@@ -44,4 +44,4 @@ packages:
source: hosted
version: "1.8.1"
sdks:
dart: ">=2.12.0 <3.0.0"
dart: ">=2.17.0-206.0.dev <3.0.0"

View File

@@ -9,4 +9,4 @@ dependencies:
path: ^1.8.0
dev_dependencies:
lints: ^1.0.0
lints: ^2.0.0

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);