0

我正在学习颤振。我使用 Slider 类创建滑块(在 android 中称为 Seekbar),在这里我想将拇指图标更改为矩形,这是否可能,请让我知道任何解决方案?

SliderTheme.of(context).copyWith(
                      trackShape: CustomTrackShape(),
                      thumbShape: RoundSliderThumbShape(
                        enabledThumbRadius: 15,
                        disabledThumbRadius: 5,
                      ),

                  ),
                  child: Slider(
                    inactiveColor: Colors.black12,
                    value: _sliderValue,
                    min: 5000,
                    max: 500000,
                    divisions: 1000,
                    label: _sliderValue.round().toString(),
                    onChanged: (value) {
                      setState(() {
                        _sliderValue = value;
                        print("slider value" + _sliderValue.toString());
                        // _amountController.text = value.floor().toString();
                        _amountController.text =
                            getChangedAmount(value.floor().toString());
                        // print("amount controller value" + _amountController.text);
                      });
                    },
                  ),
                ),

在此处输入图像描述

** 我想要下面的类型 **

在此处输入图像描述

4

0 回答 0