mirror of
https://github.com/flutter/samples.git
synced 2025-11-08 22:09:06 +00:00
Fix sample index deployment action (#862)
* Update sample index dependencies * Update to tuneup 0.3.8, update dependencies * Upgrade to null safety, lock sass version * fix analyzer warnings * Fix unit tests * Fix issues from upgrading to null safety
This commit is contained in:
@@ -104,12 +104,11 @@ Future<void> _createThumbnails(Directory directory) async {
|
||||
continue;
|
||||
}
|
||||
|
||||
var file = entity as File;
|
||||
var pathPrefix = path.dirname(file.path);
|
||||
var pathPrefix = path.dirname(entity.path);
|
||||
var thumbnailFile = File(path.join(pathPrefix, filename + '_thumb.png'));
|
||||
|
||||
var img = image.decodeImage(await file.readAsBytes());
|
||||
var resized = image.copyResize(img, width: 640);
|
||||
var img = image.decodeImage(await entity.readAsBytes());
|
||||
var resized = image.copyResize(img!, width: 640);
|
||||
filesToWrite.add(thumbnailFile.writeAsBytes(image.encodePng(resized)));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user