feat(about): show compiled short Git commit

This commit is contained in:
zarzet
2026-09-06 14:54:35 +07:00
parent 8daae638f6
commit 4b7e731474
5 changed files with 18 additions and 3 deletions
+4
View File
@@ -5,6 +5,10 @@ class AppInfo {
static const String buildNumber = '143';
static const String fullVersion = '$version+$buildNumber';
static const String gitCommit = String.fromEnvironment('GIT_COMMIT');
static String get shortGitCommit =>
gitCommit.length > 8 ? gitCommit.substring(0, 8) : gitCommit;
static String get displayVersion => kDebugMode ? 'Internal' : version;
static const String appName = 'SpotiFLAC Mobile';
+4 -1
View File
@@ -223,7 +223,10 @@ class AboutPage extends StatelessWidget {
padding: const EdgeInsets.all(24),
child: Center(
child: Text(
AppInfo.copyright,
AppInfo.shortGitCommit.isEmpty
? AppInfo.copyright
: '${AppInfo.copyright} · ${AppInfo.shortGitCommit}',
textAlign: TextAlign.center,
style: Theme.of(context).textTheme.bodySmall?.copyWith(
color: colorScheme.onSurfaceVariant,
),