mirror of
https://github.com/zarzet/SpotiFLAC-Mobile.git
synced 2026-09-21 00:50:58 +02:00
feat(about): show compiled short Git commit
This commit is contained in:
@@ -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';
|
||||
|
||||
@@ -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,
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user