Comments (7)
I'd forked the project and published the fix @locrianmark
https://pub.dev/packages/flutter_circular_chart_two
from flutter_circular_chart.
ancestorStateOfType has been depreciated.
final AnimatedCircularChartState result = context.ancestorStateOfType(const TypeMatcher());
becomes:
final AnimatedCircularChartState result = context.findAncestorStateOfType();
from flutter_circular_chart.
@GusRodrigues86 thanks. Gotta ditch this library asap, but your fork just saved me some time 🙌
from flutter_circular_chart.
for a null safety version https://pub.dev/packages/awesome_circular_chart
from flutter_circular_chart.
@xjodoin I am unable to update the chart using your fork. This is what I am getting when I run widget._chartKey.currentState!.updateData(nextData);
The following RenderObject was being processed when the exception was fired: _RenderColoredBox#19f3e relayoutBoundary=up11
... parentData: offset=Offset(0.0, 0.0); flex=null; fit=null (can use size)
... constraints: BoxConstraints(0.0<=w<=428.0, 0.0<=h<=Infinity)
... size: MISSING
... behavior: opaque
RenderObject: _RenderColoredBox#19f3e relayoutBoundary=up11
parentData: offset=Offset(0.0, 0.0); flex=null; fit=null (can use size)
constraints: BoxConstraints(0.0<=w<=428.0, 0.0<=h<=Infinity)
size: MISSING
behavior: opaque
... child: RenderPadding#20c9c relayoutBoundary=up12 NEEDS-PAINT
... parentData: <none> (can use size)
... constraints: BoxConstraints(0.0<=w<=428.0, 0.0<=h<=Infinity)
... size: MISSING
... padding: EdgeInsets(0.0, 0.0, 0.0, 15.0)
... textDirection: ltr
... child: RenderFlex#af33f relayoutBoundary=up13 NEEDS-PAINT
... parentData: offset=Offset(0.0, 0.0) (can use size)
... constraints: BoxConstraints(0.0<=w<=428.0, 0.0<=h<=Infinity)
... size: MISSING
... direction: horizontal
... mainAxisAlignment: center
... mainAxisSize: max
... crossAxisAlignment: center
... textDirection: ltr
... verticalDirection: down
... child 1: RenderStack#9e3ec relayoutBoundary=up14 NEEDS-PAINT
... parentData: offset=Offset(0.0, 0.0); flex=null; fit=null (can use size)
... constraints: BoxConstraints(unconstrained)
... size: MISSING
... alignment: AlignmentDirectional.topStart
... textDirection: ltr
... fit: loose
====================================================================================================
======== Exception caught by rendering library =====================================================
The following assertion was thrown during paint():
RenderBox was not laid out: _RenderColoredBox#f7d07 relayoutBoundary=up11
'package:flutter/src/rendering/box.dart':
Failed assertion: line 1927 pos 12: 'hasSize'
Either the assertion indicates an error in the framework itself, or we should provide substantially more information in this error message to help you determine and fix the underlying cause.
In either case, please report this assertion by filing a bug on GitHub:
https://github.com/flutter/flutter/issues/new?template=2_bug.md
The relevant error-causing widget was:
Container Container:file:///Users/pratikbaid/Desktop/Work/FlutterDev/tg_final/lib/view/screens/tab_screen/tabs/collection_screen/collection_overview_screen.dart:311:27
When the exception was thrown, this was the stack:
#2 RenderBox.size (package:flutter/src/rendering/box.dart:1927:12)
#3 _RenderColoredBox.paint (package:flutter/src/widgets/basic.dart:7526:9)
#4 RenderObject._paintWithContext (package:flutter/src/rendering/object.dart:2403:7)
#5 PaintingContext.paintChild (package:flutter/src/rendering/object.dart:189:13)
#6 RenderBoxContainerDefaultsMixin.defaultPaint (package:flutter/src/rendering/box.dart:2792:15)
#7 RenderFlex.paint (package:flutter/src/rendering/flex.dart:1078:7)
#8 RenderObject._paintWithContext (package:flutter/src/rendering/object.dart:2403:7)
#9 PaintingContext.paintChild (package:flutter/src/rendering/object.dart:189:13)
#10 RenderBoxContainerDefaultsMixin.defaultPaint (package:flutter/src/rendering/box.dart:2792:15)
#11 RenderFlex.paint (package:flutter/src/rendering/flex.dart:1078:7)
#12 RenderObject._paintWithContext (package:flutter/src/rendering/object.dart:2403:7)
#13 PaintingContext.paintChild (package:flutter/src/rendering/object.dart:189:13)
#14 _RenderSingleChildViewport.paint.paintContents (package:flutter/src/widgets/single_child_scroll_view.dart:542:17)
#15 _RenderSingleChildViewport.paint (package:flutter/src/widgets/single_child_scroll_view.dart:556:9)
#16 RenderObject._paintWithContext (package:flutter/src/rendering/object.dart:2403:7)
#17 PaintingContext._repaintCompositedChild (package:flutter/src/rendering/object.dart:141:11)
#18 PaintingContext.repaintCompositedChild (package:flutter/src/rendering/object.dart:100:5)
#19 PipelineOwner.flushPaint (package:flutter/src/rendering/object.dart:973:29)
#20 RendererBinding.drawFrame (package:flutter/src/rendering/binding.dart:499:19)
#21 WidgetsBinding.drawFrame (package:flutter/src/widgets/binding.dart:883:13)
#22 RendererBinding._handlePersistentFrameCallback (package:flutter/src/rendering/binding.dart:363:5)
#23 SchedulerBinding._invokeFrameCallback (package:flutter/src/scheduler/binding.dart:1145:15)
#24 SchedulerBinding.handleDrawFrame (package:flutter/src/scheduler/binding.dart:1082:9)
#25 SchedulerBinding._handleDrawFrame (package:flutter/src/scheduler/binding.dart:996:5)
#29 _invoke (dart:ui/hooks.dart:150:10)
#30 PlatformDispatcher._drawFrame (dart:ui/platform_dispatcher.dart:270:5)
#31 _drawFrame (dart:ui/hooks.dart:114:31)
(elided 5 frames from class _AssertionError and dart:async)
The following RenderObject was being processed when the exception was fired: _RenderColoredBox#f7d07 relayoutBoundary=up11
... parentData: offset=Offset(0.0, 0.0); flex=null; fit=null (can use size)
... constraints: BoxConstraints(0.0<=w<=428.0, 0.0<=h<=Infinity)
... size: MISSING
... behavior: opaque
RenderObject: _RenderColoredBox#f7d07 relayoutBoundary=up11
parentData: offset=Offset(0.0, 0.0); flex=null; fit=null (can use size)
constraints: BoxConstraints(0.0<=w<=428.0, 0.0<=h<=Infinity)
size: MISSING
behavior: opaque
... child: RenderPadding#8cc4a relayoutBoundary=up12 NEEDS-PAINT
... parentData: <none> (can use size)
... constraints: BoxConstraints(0.0<=w<=428.0, 0.0<=h<=Infinity)
... size: MISSING
... padding: EdgeInsets(0.0, 0.0, 0.0, 15.0)
... textDirection: ltr
... child: RenderFlex#7a140 relayoutBoundary=up13 NEEDS-PAINT
... parentData: offset=Offset(0.0, 0.0) (can use size)
... constraints: BoxConstraints(0.0<=w<=428.0, 0.0<=h<=Infinity)
... size: MISSING
... direction: horizontal
... mainAxisAlignment: center
... mainAxisSize: max
... crossAxisAlignment: center
... textDirection: ltr
... verticalDirection: down
... child 1: RenderStack#fc142 relayoutBoundary=up14 NEEDS-PAINT
... parentData: offset=Offset(0.0, 0.0); flex=null; fit=null (can use size)
... constraints: BoxConstraints(unconstrained)
... size: MISSING
... alignment: AlignmentDirectional.topStart
... textDirection: ltr
... fit: loose
====================================================================================================```
from flutter_circular_chart.
I don't think is related to the project. Did you try to set the explicitly the size https://stackoverflow.com/questions/64947936/flutter-errorfailed-assertion-line-1785-pos-12-hassize
from flutter_circular_chart.
Set the mainAxisSize to minimum.
from flutter_circular_chart.
Related Issues (20)
- Add Option to round path edges HOT 4
- Does not work with Flutter 0.6.0 HOT 2
- Dart Version 2.1 is not compatible with Circular_Chart HOT 2
- Add label for each entry on the pie chart
- Issue when in a listview HOT 2
- Improve README
- Cannot customize radial chart stroke width HOT 2
- Add Gradient support in Circle
- Update for Funnel Chart
- Make it possible to center label inside the Chart when using multiline label HOT 3
- Is this project dead? HOT 2
- Add option for rounded segments in a radial chart
- Need Null Safety Version HOT 2
- Does it support left and right sliding
- Add an assertion for data length in pie charts
- RadialChartExample data should use different rankKeys
- Add a label in the hole of a radial chart HOT 4
- How to create GlobalKey? HOT 3
- Remove `flutter:` section from pubspec.yaml HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from flutter_circular_chart.