hnvn / flutter_shimmer

A package provides an easy way to add shimmer effect in Flutter project
BSD 3-Clause "New" or "Revised" License
1.77k stars 200 forks source link

Issue with Shimmer #16

Open ashishpatel1992 opened 4 years ago

ashishpatel1992 commented 4 years ago

Shimmer doesnt work for me Always throw the following error

DS-PAINT
...  needs compositing
...  parentData: <none> (can use size)
...  constraints: BoxConstraints(w=470.2, 0.0<=h<=Infinity)
...  size: MISSING
...  usefulness ratio: no metrics collected yet (never painted)
RenderObject: RenderRepaintBoundary#1f7bc relayoutBoundary=up4 NEEDS-LAYOUT NEEDS-PAINT
  needs compositing
  parentData: <none> (can use size)
  constraints: BoxConstraints(w=470.2, 0.0<=h<=Infinity)
  size: MISSING
  usefulness ratio: no metrics collected yet (never painted)
...  child: RenderFlex#75941 relayoutBoundary=up5 NEEDS-PAINT
...    needs compositing
...    parentData: <none> (can use size)
...    constraints: BoxConstraints(w=470.2, 0.0<=h<=Infinity)
...    size: MISSING
...    direction: vertical
...    mainAxisAlignment: start
...    mainAxisSize: max
...    crossAxisAlignment: start
...    textDirection: ltr
...    verticalDirection: down
...    child 1: RenderDecoratedBox#2896f relayoutBoundary=up6 NEEDS-PAINT
...      parentData: offset=Offset(0.0, 0.0); flex=null; fit=null (can use size)
...      constraints: BoxConstraints(0.0<=w<=470.2, 0.0<=h<=Infinity)
...      size: Size(470.2, 202.7)
...      decoration: BoxDecoration
...        color: Color(0xff000000)
...      configuration: ImageConfiguration(bundle: PlatformAssetBundle#13cf0(), devicePixelRatio: 3.1, locale: en_US, textDirection: TextDirection.ltr, platform: android)
...      child: RenderFlex#a0c71 relayoutBoundary=up7 NEEDS-PAINT
...        parentData: <none> (can use size)
...        constraints: BoxConstraints(0.0<=w<=470.2, 0.0<=h<=Infinity)
...        size: Size(470.2, 202.7)
...        direction: vertical
...        mainAxisAlignment: start
...        mainAxisSize: max
...        crossAxisAlignment: center
...        verticalDirection: down
...        child 1: RenderSemanticsGestureHandler#2dfaa relayoutBoundary=up8 NEEDS-PAINT
...          parentData: offset=Offset(0.0, 0.0); flex=null; fit=null (can use size)
...          constraints: BoxConstraints(0.0<=w<=470.2, 0.0<=h<=Infinity)
...          size: Size(470.2, 101.3)
...          gestures: tap
...        child 2: RenderSemanticsGestureHandler#111f0 relayoutBoundary=up8 NEEDS-PAINT
...          parentData: offset=Offset(0.0, 101.3); flex=null; fit=null (can use size)
...          constraints: BoxConstraints(0.0<=w<=470.2, 0.0<=h<=Infinity)
...          size: Size(470.2, 101.3)
...          gestures: <none>
...    child 2: RenderStack#51189 relayoutBoundary=up6 NEEDS-PAINT
...      parentData: offset=Offset(0.0, 0.0); flex=null; fit=null (can use size)
...      constraints: BoxConstraints(0.0<=w<=470.2, 0.0<=h<=Infinity)
...      size: Size(470.2, 100.0)
...      alignment: AlignmentDirectional.center
...      textDirection: ltr
...      fit: loose
...      overflow: clip
...      child 1: RenderConstrainedBox#5f226 relayoutBoundary=up7 NEEDS-PAINT
...        parentData: not positioned; offset=Offset(0.0, 0.0) (can use size)
...        constraints: BoxConstraints(0.0<=w<=470.2, 0.0<=h<=Infinity)
...        size: Size(470.2, 100.0)
...        additionalConstraints: BoxConstraints(0.0<=w<=Infinity, h=100.0)
...        child: RenderDecoratedBox#fa226 relayoutBoundary=up8 NEEDS-PAINT
...          parentData: <none> (can use size)
...          constraints: BoxConstraints(0.0<=w<=470.2, h=100.0)
...          size: Size(470.2, 100.0)
...          decoration: BoxDecoration
...            image: DecorationImage(AssetImage(bundle: null, name: "images/radio_bg.jpg"), BoxFit.fill, center)
...          configuration: ImageConfiguration(bundle: PlatformAssetBundle#13cf0(), devicePixelRatio: 3.1, locale: en_US, textDirection: TextDirection.ltr, platform: android)
...    child 3: RenderDecoratedBox#46909 relayoutBoundary=up6 NEEDS-PAINT
...      needs compositing
...      parentData: offset=Offset(0.0, 0.0); flex=null; fit=null (can use size)
...      constraints: BoxConstraints(0.0<=w<=470.2, 0.0<=h<=Infinity)
...      size: MISSING
...      decoration: BoxDecoration
...        color: Color(0xff3c434d)
...      configuration: ImageConfiguration(bundle: PlatformAssetBundle#13cf0(), devicePixelRatio: 3.1, locale: en_US, textDirection: TextDirection.ltr, platform: android)
...      child: RenderPadding#82dc2 relayoutBoundary=up7 NEEDS-PAINT
...        needs compositing
...        parentData: <none> (can use size)
...        constraints: BoxConstraints(0.0<=w<=470.2, 0.0<=h<=Infinity)
...        size: MISSING
...        padding: EdgeInsets(10.0, 10.0, 1.0, 10.0)
...        textDirection: ltr
...        child: RenderFlex#46901 relayoutBoundary=up8 NEEDS-PAINT
...          needs compositing
...          parentData: offset=Offset(10.0, 10.0) (can use size)
...          constraints: BoxConstraints(0.0<=w<=459.2, 0.0<=h<=Infinity)
...          size: MISSING
...          direction: vertical
...          mainAxisAlignment: start
...          mainAxisSize: max
...          crossAxisAlignment: center
...          verticalDirection: down
════════════════════════════════════════════════════════════════════════════════════════════════════

════════ Exception Caught By rendering library ═════════════════════════════════════════════════════
The following assertion was thrown during performLayout():
RenderBox was not laid out: RenderRepaintBoundary#1f7bc relayoutBoundary=up4 NEEDS-PAINT
'package:flutter/src/rendering/box.dart':
Failed assertion: line 1683 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=BUG.md

When the exception was thrown, this was the stack: 
#2      RenderBox.size (package:flutter/src/rendering/box.dart:1683:12)
#3      _RenderProxyBox&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:106:20)
#4      RenderObject.layout (package:flutter/src/rendering/object.dart:1619:7)
#5      RenderSliverList.performLayout (package:flutter/src/rendering/sliver_list.dart:165:27)
#6      RenderObject.layout (package:flutter/src/rendering/object.dart:1619:7)
...
The following RenderObject was being processed when the exception was fired: RenderIndexedSemantics#b483a relayoutBoundary=up3 NEEDS-LAYOUT NEEDS-PAINT
...  needs compositing
...  parentData: index=0; layoutOffset=0.0 (can use size)
...  constraints: BoxConstraints(w=470.2, 0.0<=h<=Infinity)
...  semantic boundary
...  size: MISSING
...  index: 0
RenderObject: RenderIndexedSemantics#b483a relayoutBoundary=up3 NEEDS-LAYOUT NEEDS-PAINT
  needs compositing
  parentData: index=0; layoutOffset=0.0 (can use size)
  constraints: BoxConstraints(w=470.2, 0.0<=h<=Infinity)
  semantic boundary
  size: MISSING
  index: 0
...  child: RenderRepaintBoundary#1f7bc relayoutBoundary=up4 NEEDS-PAINT
...    needs compositing
...    parentData: <none> (can use size)
...    constraints: BoxConstraints(w=470.2, 0.0<=h<=Infinity)
...    size: MISSING
...    usefulness ratio: no metrics collected yet (never painted)
...    child: RenderFlex#75941 relayoutBoundary=up5 NEEDS-PAINT
...      needs compositing
...      parentData: <none> (can use size)
...      constraints: BoxConstraints(w=470.2, 0.0<=h<=Infinity)
...      size: MISSING
...      direction: vertical
...      mainAxisAlignment: start
...      mainAxisSize: max
...      crossAxisAlignment: start
...      textDirection: ltr
...      verticalDirection: down
...      child 1: RenderDecoratedBox#2896f relayoutBoundary=up6 NEEDS-PAINT
...        parentData: offset=Offset(0.0, 0.0); flex=null; fit=null (can use size)
...        constraints: BoxConstraints(0.0<=w<=470.2, 0.0<=h<=Infinity)
...        size: Size(470.2, 202.7)
...        decoration: BoxDecoration
...          color: Color(0xff000000)
...        configuration: ImageConfiguration(bundle: PlatformAssetBundle#13cf0(), devicePixelRatio: 3.1, locale: en_US, textDirection: TextDirection.ltr, platform: android)
...        child: RenderFlex#a0c71 relayoutBoundary=up7 NEEDS-PAINT
...          parentData: <none> (can use size)
...          constraints: BoxConstraints(0.0<=w<=470.2, 0.0<=h<=Infinity)
...          size: Size(470.2, 202.7)
...          direction: vertical
...          mainAxisAlignment: start
...          mainAxisSize: max
...          crossAxisAlignment: center
...          verticalDirection: down
...      child 2: RenderStack#51189 relayoutBoundary=up6 NEEDS-PAINT
...        parentData: offset=Offset(0.0, 0.0); flex=null; fit=null (can use size)
...        constraints: BoxConstraints(0.0<=w<=470.2, 0.0<=h<=Infinity)
...        size: Size(470.2, 100.0)
...        alignment: AlignmentDirectional.center
...        textDirection: ltr
...        fit: loose
...        overflow: clip
...        child 1: RenderConstrainedBox#5f226 relayoutBoundary=up7 NEEDS-PAINT
...          parentData: not positioned; offset=Offset(0.0, 0.0) (can use size)
...          constraints: BoxConstraints(0.0<=w<=470.2, 0.0<=h<=Infinity)
...          size: Size(470.2, 100.0)
...          additionalConstraints: BoxConstraints(0.0<=w<=Infinity, h=100.0)
...      child 3: RenderDecoratedBox#46909 relayoutBoundary=up6 NEEDS-PAINT
...        needs compositing
...        parentData: offset=Offset(0.0, 0.0); flex=null; fit=null (can use size)
...        constraints: BoxConstraints(0.0<=w<=470.2, 0.0<=h<=Infinity)
...        size: MISSING
...        decoration: BoxDecoration
...          color: Color(0xff3c434d)
...        configuration: ImageConfiguration(bundle: PlatformAssetBundle#13cf0(), devicePixelRatio: 3.1, locale: en_US, textDirection: TextDirection.ltr, platform: android)
...        child: RenderPadding#82dc2 relayoutBoundary=up7 NEEDS-PAINT
...          needs compositing
...          parentData: <none> (can use size)
...          constraints: BoxConstraints(0.0<=w<=470.2, 0.0<=h<=Infinity)
...          size: MISSING
...          padding: EdgeInsets(10.0, 10.0, 1.0, 10.0)
...          textDirection: ltr
════════════════════════════════════════════════════════════════════════════════════════════════════
hnvn commented 4 years ago

Please try it on the new v1.1.0, let me know if the issue still occurs