Skip to content

Commit

Permalink
readable json manifest (#45)
Browse files Browse the repository at this point in the history
Make manifest.json more than one line:
Before, we were using jsonEncode to create the `manifest.json`, by using `JsonEncoder.withIndent`, we can make multiline `manifest.json` files that play nicely with text editors.
  • Loading branch information
briaguya-ai authored Apr 28, 2023
1 parent 70c2735 commit 9557b5b
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,8 @@ class CreateReplaceTexturesViewModel extends ChangeNotifier {
String? manifestOutputPath = "$selectedDirectory/$otrNameForOutputDirectory/manifest.json";
File manifestFile = File(manifestOutputPath);
await manifestFile.create(recursive: true);
String dataToWrite = jsonEncode(processedFiles);
var encoder = const JsonEncoder.withIndent(" ");
String dataToWrite = encoder.convert(processedFiles);
await manifestFile.writeAsString(dataToWrite);

isProcessing = false;
Expand Down

0 comments on commit 9557b5b

Please sign in to comment.