Skip to content

Commit d2615a8

Browse files
committed
pipelines: handle source commit id null
1 parent 41f63fb commit d2615a8

File tree

1 file changed

+16
-14
lines changed

1 file changed

+16
-14
lines changed

lib/src/screens/pipeline_detail/screen_pipeline_detail.dart

Lines changed: 16 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -131,22 +131,24 @@ class _PipelineDetailScreen extends StatelessWidget {
131131
SelectableText(
132132
pipeline.triggerInfo!.ciMessage ?? '',
133133
),
134-
const SizedBox(
135-
height: 10,
136-
),
137-
Text(
138-
'CommitId',
139-
style: context.textTheme.titleSmall!.copyWith(color: context.colorScheme.onSecondary),
140-
),
141-
InkWell(
142-
onTap: pipeline.repository?.name == null ? null : ctrl.goToCommitDetail,
143-
child: Text(
144-
pipeline.triggerInfo!.ciSourceSha!,
145-
style: context.textTheme.titleSmall!.copyWith(
146-
decoration: pipeline.repository?.name == null ? null : TextDecoration.underline,
134+
if (pipeline.triggerInfo!.ciSourceSha != null) ...[
135+
const SizedBox(
136+
height: 10,
137+
),
138+
Text(
139+
'CommitId',
140+
style: context.textTheme.titleSmall!.copyWith(color: context.colorScheme.onSecondary),
141+
),
142+
InkWell(
143+
onTap: pipeline.repository?.name == null ? null : ctrl.goToCommitDetail,
144+
child: Text(
145+
pipeline.triggerInfo!.ciSourceSha!,
146+
style: context.textTheme.titleSmall!.copyWith(
147+
decoration: pipeline.repository?.name == null ? null : TextDecoration.underline,
148+
),
147149
),
148150
),
149-
),
151+
],
150152
const SizedBox(
151153
height: 20,
152154
),

0 commit comments

Comments
 (0)