diff --git a/lib/models/theme.dart b/lib/models/theme.dart index 4b4084f..e01a276 100644 --- a/lib/models/theme.dart +++ b/lib/models/theme.dart @@ -350,7 +350,7 @@ class ThemeModel with ChangeNotifier { return Container( height: 216, child: CupertinoPicker( - backgroundColor: CupertinoColors.white, + backgroundColor: palette.background, children: groupItem.items.map((v) => Text(v.text)).toList(), itemExtent: 40, scrollController: FixedExtentScrollController( diff --git a/lib/screens/repository.dart b/lib/screens/repository.dart index e3b5dfd..5960667 100644 --- a/lib/screens/repository.dart +++ b/lib/screens/repository.dart @@ -8,11 +8,11 @@ import 'package:git_touch/scaffolds/refresh_stateful.dart'; import 'package:git_touch/utils/utils.dart'; import 'package:git_touch/widgets/app_bar_title.dart'; import 'package:git_touch/widgets/avatar.dart'; +import 'package:git_touch/widgets/label.dart'; import 'package:git_touch/widgets/mutation_button.dart'; import 'package:git_touch/widgets/link.dart'; import 'package:git_touch/widgets/markdown_view.dart'; import 'package:git_touch/widgets/table_view.dart'; -import 'package:primer/primer.dart'; import 'package:provider/provider.dart'; import 'package:git_touch/models/theme.dart'; import 'package:tuple/tuple.dart'; @@ -191,20 +191,11 @@ class RepositoryScreen extends StatelessWidget { spacing: 4, runSpacing: 4, children: repo.repositoryTopics.nodes.map((node) { - return Container( - padding: - EdgeInsets.symmetric(vertical: 4, horizontal: 8), - decoration: BoxDecoration( - color: PrimerColors.blue000, - borderRadius: BorderRadius.all(Radius.circular(4)), - ), - child: Text( - node.topic.name, - style: TextStyle( - fontSize: 15, - color: theme.palette.primary, - ), - ), + return MyLabel( + name: node.topic.name, + // color: Colors.blue.shade50, + color: theme.palette.grayBackground, + textColor: theme.palette.primary, ); }).toList(), ) diff --git a/lib/widgets/issue_item.dart b/lib/widgets/issue_item.dart index 7a96a25..fa44847 100644 --- a/lib/widgets/issue_item.dart +++ b/lib/widgets/issue_item.dart @@ -91,7 +91,7 @@ class IssueItem extends StatelessWidget { runSpacing: 4, children: (payload['labels']['nodes'] as List) .map((label) { - return Label( + return MyLabel( name: label['name'], cssColor: label['color'], ); diff --git a/lib/widgets/label.dart b/lib/widgets/label.dart index fc387e3..3fb4ad1 100644 --- a/lib/widgets/label.dart +++ b/lib/widgets/label.dart @@ -1,15 +1,17 @@ import 'package:flutter/material.dart'; import 'package:git_touch/utils/utils.dart'; -class Label extends StatelessWidget { +class MyLabel extends StatelessWidget { final String name; final Color color; final String cssColor; + final Color textColor; - Label({ + MyLabel({ @required this.name, this.color, this.cssColor, + this.textColor, }); @override @@ -25,8 +27,8 @@ class Label extends StatelessWidget { name, style: TextStyle( fontSize: 13, - color: getFontColorByBrightness(_color), - fontWeight: FontWeight.w600, + color: textColor ?? getFontColorByBrightness(_color), + // fontWeight: FontWeight.w600, ), ), ); diff --git a/lib/widgets/notification_item.dart b/lib/widgets/notification_item.dart index 4565e2e..eeed269 100644 --- a/lib/widgets/notification_item.dart +++ b/lib/widgets/notification_item.dart @@ -68,9 +68,11 @@ class _NotificationItemState extends State { } Widget _buildCheckIcon() { + final theme = Provider.of(context); return Icon( payload.unread ? Octicons.check : Octicons.primitive_dot, - color: loading ? Colors.black12 : Colors.black45, + color: + loading ? theme.palette.grayBackground : theme.palette.tertiaryText, size: 24, ); } diff --git a/lib/widgets/timeline_item.dart b/lib/widgets/timeline_item.dart index 958e87b..0ebb8f1 100644 --- a/lib/widgets/timeline_item.dart +++ b/lib/widgets/timeline_item.dart @@ -68,7 +68,7 @@ class TimelineItem extends StatelessWidget { InlineSpan _buildLabel(p) { return WidgetSpan( - child: Label( + child: MyLabel( name: p['label']['name'], cssColor: p['label']['color'], ),