This commit is contained in:
Vadim 2024-05-17 11:01:44 +02:00
parent 48dc1e0870
commit 5865140574
2 changed files with 2 additions and 3 deletions

View file

@ -38,8 +38,7 @@ Future<int> main(List<String> args) async {
platformFolder: platform, platformFolder: platform,
); );
final file = final file = await File(screenshotArgs.toPath(layout.name)).create(recursive: true);
await File('screenshots/generated/$platform/${layout.name}/${screenshotArgs.name}.png').create(recursive: true);
file.writeAsBytesSync( file.writeAsBytesSync(
encodePng( encodePng(
screenshot.convertToStoreScreenshot( screenshot.convertToStoreScreenshot(

View file

@ -31,7 +31,7 @@ class ScreenshotArgs {
String toPathRaw() => String toPathRaw() =>
'$_folderPrefix/raw/$platformFolder/$deviceName/$nameWithTheme$_pathArgsDelimited$backgroundColor.png'; '$_folderPrefix/raw/$platformFolder/$deviceName/$nameWithTheme$_pathArgsDelimited$backgroundColor.png';
String toPath() => '$_folderPrefix/$platformFolder/$deviceName/$name.png'; String toPath(String layoutName) => '$_folderPrefix/$platformFolder/$layoutName/$nameWithTheme.png';
@override @override
String toString() => jsonEncode(_toJson()); String toString() => jsonEncode(_toJson());