Clamp GitStamp substring length to avoid out-of-range errors.

This commit is contained in:
2025-11-10 14:07:47 +01:00
parent f6a48140b4
commit b6b1743285

View File

@@ -189,7 +189,7 @@ class _SettingsRootPageState extends State<SettingsRootPage> {
value: Column( value: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
Text(GitStamp.sha.substring(0, 7) + ' +' + Globals().buildNumber), Text('${GitStamp.sha.substring(0, GitStamp.sha.length.clamp(0, 7))} +${Globals().buildNumber}'),
Text("( " + cfg.dateFormat.dateFormat().format(DateTime.parse(GitStamp.buildDateTime).toLocal()) + " )", style: TextStyle(fontStyle: FontStyle.italic)), Text("( " + cfg.dateFormat.dateFormat().format(DateTime.parse(GitStamp.buildDateTime).toLocal()) + " )", style: TextStyle(fontStyle: FontStyle.italic)),
], ],
), ),