Developer Hand-Builds Flutter Treemap for Disk Browser After Packages Fall Short
A developer building Helm, a macOS disk storage tool, chose to write a custom treemap widget from scratch instead of using existing Flutter charting packages. The decision was driven by four requirements that off-the-shelf packages could not handle together: precise hit-testing to identify folders, navigation as a stateful operation with breadcrumb support, adaptive labels based on rectangle size, and layout computed one tree level at a time rather than over a flat list. The implementation uses the squarified treemap algorithm, which keeps rectangles closer to square by sorting values descending and greedily accumulating tiles before closing each row. To handle large volumes with hundreds of thousands of files, scanning runs off the main isolate and layout is computed only for the currently visible level. Helm is released under the MIT licence, with the treemap widget available in its open-source GitHub repository.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.
Discussion (0)
Log in to join the discussion and vote.
Log in