Add maxRootNodeWidth to JSON Previewer

Fixes #106
This commit is contained in:
Ashita Prasad
2024-01-15 00:44:26 +05:30
parent 88ba536167
commit 14dfa720e0
2 changed files with 126 additions and 101 deletions

View File

@ -59,3 +59,13 @@ Color getDarkModeColor(Color col) {
kColorWhite,
);
}
double? getJsonPreviewerMaxRootNodeWidth(double w) {
if (w < 300) {
return 150;
}
if (w < 400) {
return 200;
}
return null;
}