【问题标题】:Change the border radius of underline tab indicator更改下划线标签指示器的边框半径
【发布时间】:2020-02-03 01:06:24
【问题描述】:

如何更改下划线标签指示器的边框半径?如果我使用框装饰,那么指示器会覆盖整个标签

【问题讨论】:

标签: flutter


【解决方案1】:

您可以创建与本文类似的自定义指标https://medium.com/swlh/flutter-custom-tab-indicator-for-tabbar-d72bbc6c9d0c,但将drawCircle(...) 替换为drawRRect(...)

【讨论】:

  • 我离成功太近了!只剩下一件事,那就是我希望指示器采用选项卡标签的大小。有没有机会以某种方式将 TabIndicatorSize.label 转换为双精度值?
  • void paint(Canvas canvas, Offset offset, ImageConfiguration cfg)中,cfg.size.width等于indicatorSize的宽度。
猜你喜欢
  • 2021-11-10
  • 1970-01-01
  • 2021-03-22
  • 2021-04-18
  • 1970-01-01
  • 2022-01-15
  • 1970-01-01
  • 2014-09-06
  • 2021-08-09
相关资源
最近更新 更多