You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
Changing start/end of a gauge does not cause a re-render, but changing a Pointer value does. I filed this under bug report as I would expect this to be out of the box behavior, but it can also suffice as a feature request.
To Reproduce
See reproducible code.
Expected behavior
When the start or end values are changed, the gauge is expected to respect these values and re-render.
Screenshots
N/A
Desktop (please complete the following information):
OS: Windows 10 22H2
Browser: N/A, tested on Flutter Desktop
Version: N/A
Additional context
Reproducible code:
import'package:flutter/material.dart';
import'package:geekyants_flutter_gauges/geekyants_flutter_gauges.dart';
voidmain() {
runApp(
constMaterialApp(
debugShowCheckedModeBanner:false,
home:LinearGaugeExample(),
),
);
}
////// The following code is a Simple Example of [LinearGauge] Widget./// You can customize the [LinearGauge] Widget as per your need.///classLinearGaugeExampleextendsStatefulWidget {
constLinearGaugeExample({Key? key}) :super(key: key);
@overrideState<LinearGaugeExample> createState() =>_LinearGaugeExampleState();
}
class_LinearGaugeExampleStateextendsState<LinearGaugeExample> {
double startVal =0.0;
@overrideWidgetbuild(BuildContext context) {
returnScaffold(
body:Center(
child:Column(
children: [
LinearGauge(
start: startVal,
gaugeOrientation:GaugeOrientation.horizontal,
enableGaugeAnimation:true,
rulers:RulerStyle(
rulerPosition:RulerPosition.bottom,
),
pointers:const [
Pointer(
value:50,
shape:PointerShape.circle,
),
],
),
TextButton(
onPressed: () {
setState(() {
if (startVal ==0.0) {
startVal =5.0;
} else {
startVal =0.0;
}
});
},
child:constText('Toggle Start'))
],
),
),
);
}
}
The text was updated successfully, but these errors were encountered:
Describe the bug
Changing start/end of a gauge does not cause a re-render, but changing a Pointer value does. I filed this under bug report as I would expect this to be out of the box behavior, but it can also suffice as a feature request.
To Reproduce
See reproducible code.
Expected behavior
When the start or end values are changed, the gauge is expected to respect these values and re-render.
Screenshots
N/A
Desktop (please complete the following information):
Additional context
Reproducible code:
The text was updated successfully, but these errors were encountered: