【发布时间】:2021-12-21 05:44:14
【问题描述】:
我正在尝试将渐变颜色应用于我的范围指针,但这不是我想要的结果。这是我目前的结果。
当前结果:
我想要的是,当范围指针在-20到40的范围内时,范围指针渐变颜色应该是绿色的,而不是显示红色的提示。
下面的代码是我用来在范围指针上显示渐变颜色的代码。谁能告诉我这是包裹问题还是我遗漏了什么?谢谢。
RangePointer(value: 20, width: 12, enableAnimation: true,
pointerOffset: -16, cornerStyle: CornerStyle.bothCurve, sizeUnit: GaugeSizeUnit.logicalPixel,
gradient: SweepGradient(
colors: < Color > [Color(0xFF51888e),
Color(0xFF66a86d),
Color(0xFFd5d688),
Color(0xFFdd9d6d),
Color(0xFFd05c50),
], stops: < double > [
0,
0.25,
0.5,
0.75,
1
]
),
)
【问题讨论】:
标签: flutter dart syncfusion gauge radial