最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

TextStyle color does not effect on chips in flutter - Stack Overflow

programmeradmin0浏览0评论

The color of choice chips have a blury effect and does not show real color. Why this happen? Choice chips :

                  if (index == 0) {
                    return ChoiceChip(
                      label: Text('selected'),
                      selected: true,
                      showCheckmark: false,
                      avatar: TelmisIcon.reviewsOutlined,
                      color: WidgetStatePropertyAll(Colors.blue),
                    );
                  }
                  return ChoiceChip(
                    label: Text('data'),
                    selected: false,
                    showCheckmark: false,
                    avatar: TelmisIcon.reviewsOutlined,
                  );

Theme file :

  ChipThemeData get _chipTheme => ChipThemeData(
    shape: StadiumBorder(),
    side: BorderSide.none,
    backgroundColor: colorExtenstion.white,
    color: WidgetStatePropertyAll(colorExtenstion.white),
    labelStyle: fontsExtenstion.labelLarge.copyWith(
      color: colorExtenstion.grey80, // This color is almost black but on screen does not effect well
    ),
  );

发布评论

评论列表(0)

  1. 暂无评论