alitorki2651 / flutter_gauge Goto Github PK
View Code? Open in Web Editor NEWLicense: Other
License: Other
activeColor losses in android or while scrolling big listview in iPhone
please fix it
Hey,
could you please specify a licence for your code? Thinking about using your gauge or something similar in an app and need to be certain our usage is license-compliant.
thanks!
First of all, many thanks for the great work.
When I set isCircle to true and width lower or equals to 200, the circle is not displaying correctly around the minutes circle. You can see reselt here: http://belatar.info/cours/flutter_gauge_pbm.png
Here is my Code:
FlutterGauge(
handSize: 30,widthCircle: 5,width: 200,handColor: Colors.deepOrangeAccent,
index: (sDevice!=null&&sDevice.speedKPH!=null)?sDevice.speedKPH:0,
fontFamily: "Iran",
end: 240,
number: Number.endAndCenterAndStart,
secondsMarker: SecondsMarker.secondsAndMinute,
hand: Hand.short,
counterStyle: TextStyle(color: Colors.blueAccent,fontSize: 22,fontWeight: FontWeight.w700),
counterAlign: CounterAlign.center,
isDecimal: false,isCircle: true,
),
How to show semi and full circle in progress gauge?
Expanded(child: Container(color: Colors.black38,child: FlutterGauge(inactiveColor: Colors.white38,activeColor: Colors.white,handSize: 30,width: 200,index: 65.0,fontFamily: "Iran",end: 400,number: Number.none,secondsMarker: SecondsMarker.minutes,isCircle: false,hand: Hand.none,counterAlign: CounterAlign.center,counterStyle: TextStyle(color: Colors.white,fontSize: 30,),isDecimal: false,)),),
Can you please tell me whether it is acheivable?
Regards,
Sri Gayathri.G
Hi! I'm using Provider as injector to change index value in realtime. Index value changes, but not widget update happening. Any clue? Thank you!
Hi! I love this widget! It's terrific! but.....I have a problem. I wanna start from not 0 value. I'm using start parameter but it continue starting from 0 to the end parameter. Any clue? Thank you!
I am working with flutter_gauge. Thanks for the great work.
════════ Exception caught by animation library ═════════════════════════════════════════════════════
The following assertion was thrown while notifying listeners for AnimationController:
setState() called after dispose(): _FlutterGaugeMainState#57037(lifecycle state: defunct, not mounted, tickers: tracking 1 ticker)
This error happens if you call setState() on a State object for a widget that no longer appears in the widget tree (e.g., whose parent widget no longer includes the widget in its build). This error can occur when code calls setState() from a timer or an animation callback.
The preferred solution is to cancel the timer or stop listening to the animation in the dispose() callback. Another solution is to check the "mounted" property of this object before calling setState() to ensure the object is still in the tree.
This error might indicate a memory leak if setState() is being called because another object is retaining a reference to this State object after it has been removed from the tree. To avoid memory leaks, consider breaking the reference to this object during dispose().
When the exception was thrown, this was the stack:
#0 State.setState.<anonymous closure> (package:flutter/src/widgets/framework.dart:1112:9)
#1 State.setState (package:flutter/src/widgets/framework.dart:1147:6)
#2 new _FlutterGaugeMainState.<anonymous closure> (package:flutter_gauge/fluttergauge.dart:89:9)
#3 AnimationLocalListenersMixin.notifyListeners (package:flutter/src/animation/listener_helpers.dart:124:19)
#4 AnimationController.value= (package:flutter/src/animation/animation_controller.dart:362:5)
...
The AnimationController notifying listeners was: AnimationController#c0c4a(⏮ 0.000; paused)
════════ (5) Exception caught by animation library ═════════════════════════════════════════════════
'package:flutter/src/widgets/framework.dart': Failed assertion: line 3867 pos 12: '_debugLifecycleState != _ElementLifecycle.defunct': is not true.
════════════════════════════════════════════════════════════════════════════════════════════════════
════════ Exception caught by widgets library ═══════════════════════════════════════════════════════
The following assertion was thrown while finalizing the widget tree:
_FlutterGaugeMainState#89854(tickers: tracking 1 ticker) was disposed with an active Ticker.
_FlutterGaugeMainState created a Ticker via its TickerProviderStateMixin, but at the time dispose() was called on the mixin, that Ticker was still active. All Tickers must be disposed before calling super.dispose().
Tickers used by AnimationControllers should be disposed by calling dispose() on the AnimationController itself. Otherwise, the ticker will leak.
The offending ticker was: _WidgetTicker(created by _FlutterGaugeMainState#89854(lifecycle state: created, no widget, not mounted, tickers: tracking 0 tickers))
The stack trace when the _WidgetTicker was actually created was:
#0 new Ticker.<anonymous closure> (package:flutter/src/scheduler/ticker.dart:66:40)
#1 new Ticker (package:flutter/src/scheduler/ticker.dart:68:6)
#2 new _WidgetTicker (package:flutter/src/widgets/ticker_provider.dart:237:80)
#3 TickerProviderStateMixin.createTicker (package:flutter/src/widgets/ticker_provider.dart:168:34)
#4 new AnimationController (package:flutter/src/animation/animation_controller.dart:245:21)
#5 new _FlutterGaugeMainState (package:flutter_gauge/fluttergauge.dart:84:41)
#6 FlutterGaugeMain.createState (package:flutter_gauge/fluttergauge.dart:60:47)
#7 new StatefulElement (package:flutter/src/widgets/framework.dart:4306:25)
#8 StatefulWidget.createElement (package:flutter/src/widgets/framework.dart:809:38)
#9 Element.inflateWidget (package:flutter/src/widgets/framework.dart:3189:40)
#10 Element.updateChild (package:flutter/src/widgets/framework.dart:2988:12)
#11 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:4243:16)
#12 Element.rebuild (package:flutter/src/widgets/framework.dart:3947:5)
#13 ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:4206:5)
#14 StatefulElement._firstBuild (package:flutter/src/widgets/framework.dart:4381:11)
#15 ComponentElement.mount (package:flutter/src/widgets/framework.dart:4201:5)
#16 Element.inflateWidget (package:flutter/src/widgets/framework.dart:3194:14)
#17 MultiChildRenderObjectElement.mount (package:flutter/src/widgets/framework.dart:5551:32)
#18 Element.inflateWidget (package:flutter/src/widgets/framework.dart:3194:14)
#19 Element.updateChild (package:flutter/src/widgets/framework.dart:2988:12)
#20 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:4243:16)
#21 Element.rebuild (package:flutter/src/widgets/framework.dart:3947:5)
#22 ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:4206:5)
#23 ComponentElement.mount (package:flutter/src/widgets/framework.dart:4201:5)
#24 Element.inflateWidget (package:flutter/src/widgets/framework.dart:3194:14)
#25 Element.updateChild (package:flutter/src/widgets/framework.dart:2988:12)
#26 SingleChildRenderObjectElement.mount (package:flutter/src/widgets/framework.dart:5445:14)
#27 Element.inflateWidget (package:flutter/src/widgets/framework.dart:3194:14)
#28 Element.updateChild (package:flutter/src/widgets/framework.dart:2988:12)
#29 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:4243:16)
#30 Element.rebuild (package:flutter/src/widgets/framework.dart:3947:5)
#31 ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:4206:5)
#32 StatefulElement._firstBuild (package:flutter/src/widgets/framework.dart:4381:11)
#33 ComponentElement.mount (package:flutter/src/widgets/framework.dart:4201:5)
#34 Element.inflateWidget (package:flutter/src/widgets/framework.dart:3194:14)
#35 Element.updateChild (package:flutter/src/widgets/framework.dart:2988:12)
#36 SingleChildRenderObjectElement.mount (package:flutter/src/widgets/framework.dart:5445:14)
#37 Element.inflateWidget (package:flutter/src/widgets/framework.dart:3194:14)
#38 Element.updateChild (package:flutter/src/widgets/framework.dart:2988:12)
#39 SingleChildRenderObjectElement.mount (package:flutter/src/widgets/framework.dart:5445:14)
#40 Element.inflateWidget (package:flutter/src/widgets/framework.dart:3194:14)
#41 Element.updateChild (package:flutter/src/widgets/framework.dart:2988:12)
#42 SingleChildRenderObjectElement.mount (package:flutter/src/widgets/framework.dart:5445:14)
#43 Element.inflateWidget (package:flutter/src/widgets/framework.dart:3194:14)
#44 Element.updateChild (package:flutter/src/widgets/framework.dart:2988:12)
#45 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:4243:16)
#46 Element.rebuild (package:flutter/src/widgets/framework.dart:3947:5)
#47 ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:4206:5)
#48 ComponentElement.mount (package:flutter/src/widgets/framework.dart:4201:5)
#49 Element.inflateWidget (package:flutter/src/widgets/framework.dart:3194:14)
#50 Element.updateChild (package:flutter/src/widgets/framework.dart:2988:12)
#51 SingleChildRenderObjectElement.update (package:flutter/src/widgets/framework.dart:5452:14)
#52 Element.updateChild (package:flutter/src/widgets/framework.dart:2977:15)
#53 RenderObjectElement.updateChildren (package:flutter/src/widgets/framework.dart:5161:32)
#54 MultiChildRenderObjectElement.update (package:flutter/src/widgets/framework.dart:5561:17)
#55 Element.updateChild (package:flutter/src/widgets/framework.dart:2977:15)
#56 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:4243:16)
#57 Element.rebuild (package:flutter/src/widgets/framework.dart:3947:5)
#58 StatelessElement.update (package:flutter/src/widgets/framework.dart:4298:5)
#59 Element.updateChild (package:flutter/src/widgets/framework.dart:2977:15)
#60 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:4243:16)
#61 Element.rebuild (package:flutter/src/widgets/framework.dart:3947:5)
#62 ProxyElement.update (package:flutter/src/widgets/framework.dart:4557:5)
#63 Element.updateChild (package:flutter/src/widgets/framework.dart:2977:15)
#64 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:4243:16)
#65 Element.rebuild (package:flutter/src/widgets/framework.dart:3947:5)
#66 ProxyElement.update (package:flutter/src/widgets/framework.dart:4557:5)
#67 Element.updateChild (package:flutter/src/widgets/framework.dart:2977:15)
#68 RenderObjectElement.updateChildren (package:flutter/src/widgets/framework.dart:5161:32)
#69 MultiChildRenderObjectElement.update (package:flutter/src/widgets/framework.dart:5561:17)
#70 Element.updateChild (package:flutter/src/widgets/framework.dart:2977:15)
#71 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:4243:16)
#72 Element.rebuild (package:flutter/src/widgets/framework.dart:3947:5)
#73 StatefulElement.update (package:flutter/src/widgets/framework.dart:4413:5)
#74 Element.updateChild (package:flutter/src/widgets/framework.dart:2977:15)
#75 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:4243:16)
#76 Element.rebuild (package:flutter/src/widgets/framework.dart:3947:5)
#77 ProxyElement.update (package:flutter/src/widgets/framework.dart:4557:5)
#78 Element.updateChild (package:flutter/src/widgets/framework.dart:2977:15)
#79 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:4243:16)
#80 Element.rebuild (package:flutter/src/widgets/framework.dart:3947:5)
#81 StatefulElement.update (package:flutter/src/widgets/framework.dart:4413:5)
#82 Element.updateChild (package:flutter/src/widgets/framework.dart:2977:15)
#83 SingleChildRenderObjectElement.update (package:flutter/src/widgets/framework.dart:5452:14)
#84 Element.updateChild (package:flutter/src/widgets/framework.dart:2977:15)
#85 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:4243:16)
#86 Element.rebuild (package:flutter/src/widgets/framework.dart:3947:5)
#87 StatelessElement.update (package:flutter/src/widgets/framework.dart:4298:5)
#88 Element.updateChild (package:flutter/src/widgets/framework.dart:2977:15)
#89 SingleChildRenderObjectElement.update (package:flutter/src/widgets/framework.dart:5452:14)
#90 Element.updateChild (package:flutter/src/widgets/framework.dart:2977:15)
#91 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:4243:16)
#92 Element.rebuild (package:flutter/src/widgets/framework.dart:3947:5)
#93 StatefulElement.update (package:flutter/src/widgets/framework.dart:4413:5)
#94 Element.updateChild (package:flutter/src/widgets/framework.dart:2977:15)
#95 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:4243:16)
#96 Element.rebuild (package:flutter/src/widgets/framework.dart:3947:5)
#97 StatefulElement.update (package:flutter/src/widgets/framework.dart:4413:5)
#98 Element.updateChild (package:flutter/src/widgets/framework.dart:2977:15)
#99 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:4243:16)
#100 Element.rebuild (package:flutter/src/widgets/framework.dart:3947:5)
#101 ProxyElement.update (package:flutter/src/widgets/framework.dart:4557:5)
#102 Element.updateChild (package:flutter/src/widgets/framework.dart:2977:15)
#103 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:4243:16)
#104 Element.rebuild (package:flutter/src/widgets/framework.dart:3947:5)
#105 ProxyElement.update (package:flutter/src/widgets/framework.dart:4557:5)
#106 Element.updateChild (package:flutter/src/widgets/framework.dart:2977:15)
#107 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:4243:16)
#108 Element.rebuild (package:flutter/src/widgets/framework.dart:3947:5)
#109 StatefulElement.update (package:flutter/src/widgets/framework.dart:4413:5)
#110 Element.updateChild (package:flutter/src/widgets/framework.dart:2977:15)
#111 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:4243:16)
#112 Element.rebuild (package:flutter/src/widgets/framework.dart:3947:5)
#113 BuildOwner.buildScope (package:flutter/src/widgets/framework.dart:2432:33)
#114 WidgetsBinding.drawFrame (package:flutter/src/widgets/binding.dart:773:20)
#115 RendererBinding._handlePersistentFrameCallback (package:flutter/src/rendering/binding.dart:283:5)
#116 SchedulerBinding._invokeFrameCallback (package:flutter/src/scheduler/binding.dart:1102:15)
#117 SchedulerBinding.handleDrawFrame (package:flutter/src/scheduler/binding.dart:1041:9)
#118 SchedulerBinding._handleDrawFrame (package:flutter/src/scheduler/binding.dart:957:5)
#122 _invoke (dart:ui/hooks.dart:259:10)
#123 _drawFrame (dart:ui/hooks.dart:217:3)
(elided 3 frames from package dart:async)
On run, I encountered this error
Error: Cannot run with sound null safety, because the following dependencies don't support null safety:
- package:flutter_gauge
I think this is due to recent requirements for null safety in Flutter. There is a migration tool and other solutions found at https://dart.dev/go/unsound-null-safety.
On the whole, null safety is not a bad idea and I don't imagine that it'd be too hard to work through the code to ensure it. Depending on demand, I may be willing to put a PR together.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.