Skip to content

Commit

Permalink
Merge pull request #252 from GeekyAnts/fix-valuebar-pointer
Browse files Browse the repository at this point in the history
Fix valuebar pointer
  • Loading branch information
hasnentai authored Oct 4, 2023
2 parents 485b0df + 6d47a45 commit 4682569
Show file tree
Hide file tree
Showing 4 changed files with 40 additions and 22 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
## 1.0.3

**Fixes**

- Fixed Drawing of `Pointer` over `valueBar`


## 1.0.2

**Features**
Expand Down
50 changes: 30 additions & 20 deletions example/lib/gauge_vertical.dart
Original file line number Diff line number Diff line change
Expand Up @@ -14,26 +14,36 @@ class _MyVerticalGaugeState extends State<MyVerticalGauge> {
return Scaffold(
body: Center(
child: Padding(
padding: const EdgeInsets.all(2.0),
child: LinearGauge(
linearGaugeBoxDecoration: const LinearGaugeBoxDecoration(
thickness: 30,
borderRadius: 10,
),
// enableAnimation: true,
gaugeOrientation: GaugeOrientation.horizontal,
rulers: RulerStyle(
primaryRulersWidth: 10,
primaryRulersHeight: 30,
primaryRulerColor: const Color(0xff310072),
inverseRulers: false,
showLabel: false,
showSecondaryRulers: false,
showPrimaryRulers: true,
rulerPosition: RulerPosition.center,
),
),
),
padding: const EdgeInsets.all(2.0),
child: LinearGauge(
end: 126,
gaugeOrientation: GaugeOrientation.vertical,
rulers: RulerStyle(
rulerPosition: RulerPosition.right,
),
pointers: const [
Pointer(
value: 50,
height: 20,
color: Colors.green,
width: 20,
shape: PointerShape.triangle,
isInteractive: true,
onChanged: null,
pointerPosition: PointerPosition.left,
),
],
curves: const [
CustomCurve(
startHeight: 4,
endHeight: 50,
midHeight: 5,
curvePosition: CurvePosition.left,
end: 126,
midPoint: 50 * 0.8,
),
],
)),
),
);
}
Expand Down
3 changes: 2 additions & 1 deletion example/lib/main.dart
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
import 'package:example/gauge_vertical.dart';
import 'package:flutter/material.dart';
import 'package:geekyants_flutter_gauges/geekyants_flutter_gauges.dart';

void main() {
runApp(
const MaterialApp(
debugShowCheckedModeBanner: false,
home: RadialGaugeExample(),
home: MyVerticalGauge(),
),
);
}
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: geekyants_flutter_gauges
description: A linear gauge package for Flutter that displays progress
and can be customized for appearance and behavior.
version: 1.0.2
version: 1.0.3
homepage: https://github.com/GeekyAnts/GaugesFlutter

environment:
Expand Down

0 comments on commit 4682569

Please sign in to comment.