git_stamp
5.10.1, released a year ago by aroncode.com
Embeds Git commit, branch, and build metadata into Flutter apps with optional UI screens.
What it does
Generates Dart files containing git information (commit SHA, branch, build date) via a CLI command. Provides await-less access to build information and optional debugging UI screens to inspect commit history and package details.
AI-written summary of version 5.10.1, based on the package's README and metadata. Report an inaccuracy
Use it when
- You need to easily track which Git commit and branch are deployed in a test or production build.
- You want an in-app debug screen to view build metadata, commit lists, and change history.
Skip it when
- You are not using Git for version control.
- You do not want to run a CLI generation step before building your app.
Strengths
- Provides immediate await-less access to build and git metadata.
- Includes helpful built-in UI components and pages for debugging and viewing git history.
Weaknesses
- Requires running a CLI command to generate files during the build process.
- Tightly couples app code to a Git repository context.
Setup
- Kind
- Flutter widgets
- Effort
- Low
- Code generation
- No
- Direct dependencies
- 10
Run `dart run git_stamp --build-type full` to generate the necessary files in your project.
import 'git_stamp/git_stamp.dart';
Text('Version: ${GitStamp.appVersion}');
Text('Branch: ${GitStamp.buildBranch}');
Text('SHA: ${GitStamp.sha}');Alternatives
Packages that do the same job and could replace git_stamp.
- native_toolchain_rust
Build and bundle Rust code into a Dart/Flutter project via build hooks.
88Compare - talker_flutter
Advanced error handler and logger package for Flutter and Dart applications
93Compare - flutter_gpu_shaders
Build tool that compiles Flutter GPU shader bundles via a build hook.
69Compare - msix
CLI tool that creates MSIX installers from Flutter Windows build outputs.
77Compare
Works with
Packages commonly used together with git_stamp: ones it builds on, ones built on it, and its own family.
- pub_semvergit_stamp depends on itVersions and version constraints implementing pub's versioning policy.
- pubspec_parsegit_stamp depends on itParse pubspec.yaml files with a type‑safe API and detailed error reporting.
- argsgit_stamp depends on itLibrary for parsing raw command-line arguments into options and values using GNU and POSIX styles.
- intlgit_stamp depends on itA Dart library for internationalization and localization, providing message translation, plural/gender handling, and date/number formatting.
- url_launchergit_stamp depends on itFlutter plugin for launching URLs across mobile, desktop, and web platforms.
- fl_chartgit_stamp depends on itA highly customizable Flutter chart library that supports Line Chart, Bar Chart, Pie Chart, Scatter Chart, and Radar Chart.
- encryptgit_stamp depends on itHigh‑level Dart APIs for encryption, decryption, signing and secure random generation.
- aron_gradient_linegit_stamp depends on itA Flutter widget that displays an animated gradient line, useful as a divider in AppBar or other UI parts.