From d9c50cd0a946971f8bb3bd5024205fd15a087f2b Mon Sep 17 00:00:00 2001 From: Rongjian Zhang Date: Sat, 17 Sep 2022 23:30:47 +0800 Subject: [PATCH] fix: hex color prefix --- lib/screens/gh_issues.dart | 2 +- lib/widgets/timeline_item.dart | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/lib/screens/gh_issues.dart b/lib/screens/gh_issues.dart index 54fb7f9..ad3284e 100644 --- a/lib/screens/gh_issues.dart +++ b/lib/screens/gh_issues.dart @@ -52,7 +52,7 @@ class GhIssuesScreen extends StatelessWidget { ? null : Wrap(spacing: 4, runSpacing: 4, children: [ for (var label in p.labels!.nodes!) - HexColorTag(name: label.name, color: label.color) + HexColorTag(name: label.name, color: '#${label.color}') ]), url: '/github/$owner/$name/issues/${p.number}', ); diff --git a/lib/widgets/timeline_item.dart b/lib/widgets/timeline_item.dart index ca78cfb..249f686 100644 --- a/lib/widgets/timeline_item.dart +++ b/lib/widgets/timeline_item.dart @@ -204,7 +204,8 @@ class TimelineItem extends StatelessWidget { textSpan: TextSpan(children: [ TextSpan(text: ' ${AppLocalizations.of(context)!.added} '), WidgetSpan( - child: HexColorTag(name: p.label.name, color: p.label.color)), + child: HexColorTag( + name: p.label.name, color: '#${p.label.color}')), TextSpan(text: ' ${AppLocalizations.of(context)!.label}'), ]), ); @@ -216,7 +217,8 @@ class TimelineItem extends StatelessWidget { textSpan: TextSpan(children: [ TextSpan(text: ' ${AppLocalizations.of(context)!.removed} '), WidgetSpan( - child: HexColorTag(name: p.label.name, color: p.label.color)), + child: HexColorTag( + name: p.label.name, color: '#${p.label.color}')), TextSpan(text: ' ${AppLocalizations.of(context)!.label}'), ]), );