Skip to content

BuildInfo

Category: Config

Source: build_info.dart

Classes

BuildInfo

Build metadata injected via dart compile --define flags.

Populated by just build / just release with the build timestamp and git commit information. When absent (e.g. dart run), values are empty and the formatted output falls back to (dev).

Properties

PropertyTypeDescription
buildTimeconst StringISO-8601 UTC timestamp of when the binary was compiled.
gitShaconst StringShort git SHA (e.g. a1b2c3d) at compile time.
gitDirtyconst StringNon-empty marker (e.g. +dirty) when the working tree had uncommitted changes at compile time.
builtByconst StringHost that produced the build — typically $USER@$HOSTNAME or ci.
isReleaseBuildbool getTrue when any build metadata was injected at compile time.
isReleaseBuildbool getTrue when any build metadata was injected at compile time.
summaryString getCompact single-line summary, e.g. a1b2c3d+dirty, 2026-04-20T14:23:11Z or dev when no metadata is present.

Methods

static String details({String? appVersion})

Multi-line detailed report for --version / debug banners.

Released under the MIT License.