File tree Expand file tree Collapse file tree
lib/components/progress_bar Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -183,6 +183,7 @@ class _GFProgressBarState extends State<GFProgressBar>
183183 void _updateProgress () {
184184 setState (() {
185185 _percentage = widget.percentage;
186+ _progress = _percentage;
186187 });
187188 }
188189
@@ -255,8 +256,8 @@ class _GFProgressBarState extends State<GFProgressBar>
255256 }
256257
257258 void _onDragUpdateCircular (Offset position, Size size) {
258- final dx = position.dx - size.width / 2 ;
259- final dy = position.dy - size.height / 2 ;
259+ final dx = position.dx;
260+ final dy = position.dy + widget.radius ! / 2 ;
260261 final angle = atan2 (dy, dx);
261262 final progress = angle / (2 * pi) + 0.5 ;
262263
@@ -278,7 +279,9 @@ class _GFProgressBarState extends State<GFProgressBar>
278279 final containerWidget = Container (
279280 margin: widget.margin,
280281 width: hasSetWidth ? widget.width : MediaQuery .of (context).size.width,
281- height: widget.lineHeight,
282+ height: widget.type == GFProgressType .linear
283+ ? widget.lineHeight
284+ : widget.radius! ,
282285 padding: widget.padding,
283286 child: widget.type == GFProgressType .linear
284287 ? GestureDetector (
You can’t perform that action at this time.
0 commit comments