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,
);
final file =
await File('screenshots/generated/$platform/${layout.name}/${screenshotArgs.name}.png').create(recursive: true);
final file = await File(screenshotArgs.toPath(layout.name)).create(recursive: true);
file.writeAsBytesSync(
encodePng(
screenshot.convertToStoreScreenshot(

View file

@ -31,7 +31,7 @@ class ScreenshotArgs {
String toPathRaw() =>
'$_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
String toString() => jsonEncode(_toJson());