Clamp GitStamp substring length to avoid out-of-range errors.
This commit is contained in:
@@ -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)),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
|||||||
Reference in New Issue
Block a user