size library

Classes

SizeConfig
Config of the optional size: manifest section (S7). Each leg is optional: the consumer declares the legs it ships.

Constants

webMainJsFile → const String
Parses a main.dart.js size out of a web build output directory's manifest-ish file listing, falling back to direct byte counting by the CLI (which owns the file paths). Kept here so the size unit is one definition.

Functions

analysisPathFromBuildOutput(String output) → String?
Extracts the code-size analysis path from flutter build --analyze-size output — the tool prints a sentinel line pointing at the JSON it wrote.
packageSubtreeBytes(dynamic tree, String package) → int?
Sums the bytes of the package:<package> subtree of an analyze-size JSON tree: the node's own value (null on pure containers) plus every descendant's value, exactly as the DevTools size analysis accounts bytes.
packageSubtreeBytesFromJson(String jsonText, String package) → int?
Decodes an analyze-size JSON file's text and sums the solution subtree.