-
Notifications
You must be signed in to change notification settings - Fork 914
Closed as not planned
Labels
featureNew featureNew featuregaugesGauges componentGauges componentuncertainUncertain featureUncertain feature
Description
Bug description
I am using SfRadialGauge in [syncfusion_flux_gauges: ^31.2.2]. After setting MarkerPointer, when sliding quickly, there is a probability that both ends will not be able to slide
Steps to reproduce
I am using SfRadialGauge in [syncfusion_flux_gauges: ^31.2.2]. After setting MarkerPointer, when sliding quickly, there is a probability that both ends will not be able to slide
Code sample
Code sample
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:overseas_ai/universal/common/config/app_style.dart';
import 'package:syncfusion_flutter_gauges/gauges.dart';
import '../../../../universal/common/config/global_theme.dart';
class StrengthGauge extends StatefulWidget {
const StrengthGauge({super.key});
@override
StrengthGaugeState createState() => StrengthGaugeState();
}
class StrengthGaugeState extends State<StrengthGauge> {
double _value = 0.28;
@override
Widget build(BuildContext context) {
final theme = Theme.of(context);
return SfRadialGauge(
axes: <RadialAxis>[
RadialAxis(
minimum: 0.1,
maximum: 1.0,
showLabels: true,
showAxisLine: true,
showTicks: true,
showLastLabel: true,
minorTicksPerInterval: 9,
majorTickStyle: MajorTickStyle(length: 12.w, lengthUnit: GaugeSizeUnit.logicalPixel, color: theme.extension<AColorScheme>()?.colorError ?? Colors.grey),
minorTickStyle: MinorTickStyle(length: 6.w, lengthUnit: GaugeSizeUnit.logicalPixel, color: theme.extension<AColorScheme>()?.colorWarning ?? Colors.grey),
startAngle: 135,
endAngle: 45,
radiusFactor: 1,
axisLineStyle: AxisLineStyle(
thickness: 10.w,
color: theme.extension<AColorScheme>()?.colorError ?? Colors.grey,
cornerStyle: CornerStyle.bothCurve,
),
pointers: <GaugePointer>[
/// 选中的进度线
RangePointer(
value: _value,
width: 10.w,
color: theme.extension<AColorScheme>()?.colorPrimary ?? Colors.blue,
cornerStyle: CornerStyle.bothCurve,
enableDragging: false,
onValueChanged: (value) {
setState(() {
_value = value;
});
},
),
/// 圆点
MarkerPointer(
value: _value,
markerHeight: 15.w,
markerWidth: 15.w,
markerType: MarkerType.circle,
color: theme.extension<AColorScheme>()?.colorPrimary ?? Colors.blue,
enableDragging: true,
onValueChanged: (value) {
setState(() {
_value = value;
});
},
),
],
annotations: <GaugeAnnotation>[
GaugeAnnotation(
widget: Column(
children: [
Text(_value.toStringAsFixed(2), style: AppTS.fontSizeHeadlineExtraLarge.copyWith(color: theme.extension<AColorScheme>()?.colorPrimary ?? Colors.blue),),
Text('Strength'),
],
),
angle: 90,
positionFactor: 0.5,
),
],
),
],
);
}
}
Screenshots or Video
Screenshots / Video demonstration
[Upload media here]
Stack Traces
Stack Traces
[Add the Stack Traces here]On which target platforms have you observed this bug?
Android
Flutter Doctor output
Doctor output
[Add your output here]Metadata
Metadata
Assignees
Labels
featureNew featureNew featuregaugesGauges componentGauges componentuncertainUncertain featureUncertain feature