【问题标题】:How to add border for SliderTheme in flutter?如何在颤动中为 SliderTheme 添加边框?
【发布时间】:2022-08-04 03:30:04
【问题描述】:

我有来自卡片 player 的这个滑块,但我需要为这个滑块的右边框添加边框半径 like this

    标签: flutter dart


    【解决方案1】:

    我想我会将 ActiveTrackColor 与 thumbColor 匹配:

                    data: SliderTheme.of(context).copyWith(
                      activeTrackColor: Colors.blue, <-- THIS -->
                      trackHeight: trackHeight,
                      thumbShape:
                          const RoundSliderThumbShape(enabledThumbRadius: trackHeight / 2),
                      thumbColor: Colors.blue <-- MATCHING THIS -->
                    ),```
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2019-02-17
      • 2022-01-11
      • 1970-01-01
      • 1970-01-01
      • 2021-10-12
      • 2017-11-20
      • 2020-01-26
      • 1970-01-01
      相关资源
      最近更新 更多