@@ -56,6 +56,7 @@ import 'package:flutter_email_sender/flutter_email_sender.dart';
56
56
import 'package:flutter_layout_grid/flutter_layout_grid.dart' ;
57
57
import 'package:flutter_platform_widgets/flutter_platform_widgets.dart' ;
58
58
import 'package:flutter_progress_dialog/flutter_progress_dialog.dart' ;
59
+ import 'package:git_info/git_info.dart' ;
59
60
import 'package:in_app_review/in_app_review.dart' ;
60
61
import 'package:nil/nil.dart' ;
61
62
import 'package:path_provider/path_provider.dart' ;
@@ -236,7 +237,9 @@ class SettingsSubpageState extends PlatformSubpageState<SettingsSubpage> {
236
237
LicenseItem ("device_identity" , LICENSE_MIT ,
237
238
"https://devgit.starschina.com/flutter_open_srouce/device_identity" ),
238
239
LicenseItem ("tutorial_coach_mark" , LICENSE_MIT ,
239
- "https://github.com/RafaelBarbosatec/tutorial_coach_mark" )
240
+ "https://github.com/RafaelBarbosatec/tutorial_coach_mark" ),
241
+ LicenseItem ("git_info" , LICENSE_BSD_3_0_CLAUSE ,
242
+ "https://github.com/Rexios80/git_info" )
240
243
];
241
244
242
245
String ? _clearCacheSubtitle;
@@ -1033,10 +1036,15 @@ class SettingsSubpageState extends PlatformSubpageState<SettingsSubpage> {
1033
1036
//Version
1034
1037
Align (
1035
1038
alignment: Alignment .centerRight,
1036
- child: Text (
1037
- '${S .of (context ).version } ${FlutterApp .versionName } build ${pubspec .build .first }' ,
1038
- textScaleFactor: 0.7 ,
1039
- style: const TextStyle (fontWeight: FontWeight .bold),
1039
+ child: Consumer <GitInformation ?>(
1040
+ builder: (context, value, child) {
1041
+ return Text (
1042
+ '${S .of (context ).version } ${FlutterApp .versionName } build ${pubspec .build .first } #${value ?.hash ?.substring (0 , 7 )}' ,
1043
+ textScaleFactor: 0.7 ,
1044
+ style:
1045
+ const TextStyle (fontWeight: FontWeight .bold),
1046
+ );
1047
+ },
1040
1048
),
1041
1049
),
1042
1050
const SizedBox (height: 4 ),
0 commit comments