Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to write tests with flag widgets #24

Open
PMatthaei opened this issue Jun 2, 2020 · 2 comments
Open

How to write tests with flag widgets #24

PMatthaei opened this issue Jun 2, 2020 · 2 comments
Assignees
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@PMatthaei
Copy link

I am currently trying to write a test concerning a widget which includes
Flag.getFlags(...)

when running the test for the first time i receive the error copied below. When the same test runs a second time (chronologically after the first) it seems to run through. How should i write tests with flag-widgets?

══╡ EXCEPTION CAUGHT BY SVG ╞═══════════════════════════════════════════════════════════════════════
The following assertion was thrown resolving a single-frame picture stream:
Unable to load asset: packages/flag/res/flag/de.svg

When the exception was thrown, this was the stack:
#0 PlatformAssetBundle.load (package:flutter/src/services/asset_bundle.dart:221:7)

#1 AssetBundle.loadString (package:flutter/src/services/asset_bundle.dart:67:33)
#2 CachingAssetBundle.loadString. (package:flutter/src/services/asset_bundle.dart:162:56)
#3 _LinkedHashMapMixin.putIfAbsent (dart:collection-patch/compact_hash.dart:293:23)
#4 CachingAssetBundle.loadString (package:flutter/src/services/asset_bundle.dart:162:27)
#5 AssetBundlePictureProvider._loadAsync (package:flutter_svg/src/picture_provider.dart:449:42)
#6 AssetBundlePictureProvider.load (package:flutter_svg/src/picture_provider.dart:435:43)
#7 PictureProvider.resolve.. (package:flutter_svg/src/picture_provider.dart:327:17)
#8 PictureCache.putIfAbsent (package:flutter_svg/src/picture_cache.dart:67:22)
#9 PictureProvider.resolve. (package:flutter_svg/src/picture_provider.dart:325:16)
#10 SynchronousFuture.then (package:flutter/src/foundation/synchronous_future.dart:38:29)
#11 PictureProvider.resolve (package:flutter_svg/src/picture_provider.dart:322:24)
#12 _SvgPictureState._resolveImage (package:flutter_svg/svg.dart:641:10)
#13 _SvgPictureState.didChangeDependencies (package:flutter_svg/svg.dart:615:5)
#14 StatefulElement._firstBuild (package:flutter/src/widgets/framework.dart:4376:12)
#15 ComponentElement.mount (package:flutter/src/widgets/framework.dart:4201:5)
#16 Element.inflateWidget (package:flutter/src/widgets/framework.dart:3194:14)
#17 Element.updateChild (package:flutter/src/widgets/framework.dart:2988:12)
#18 SingleChildRenderObjectElement.mount (package:flutter/src/widgets/framework.dart:5445:14)
#19 Element.inflateWidget (package:flutter/src/widgets/framework.dart:3194:14)
#20 Element.updateChild (package:flutter/src/widgets/framework.dart:2988:12)
#21 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:4243:16)
#22 Element.rebuild (package:flutter/src/widgets/framework.dart:3947:5)
#23 ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:4206:5)
#24 ComponentElement.mount (package:flutter/src/widgets/framework.dart:4201:5)
#25 Element.inflateWidget (package:flutter/src/widgets/framework.dart:3194:14)
#26 Element.updateChild (package:flutter/src/widgets/framework.dart:2988:12)
#27 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:4243:16)
#28 Element.rebuild (package:flutter/src/widgets/framework.dart:3947:5)
#29 ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:4206:5)
#30 ComponentElement.mount (package:flutter/src/widgets/framework.dart:4201:5)
#31 Element.inflateWidget (package:flutter/src/widgets/framework.dart:3194:14)
#32 Element.updateChild (package:flutter/src/widgets/framework.dart:2988:12)
#33 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:4243:16)
#34 Element.rebuild (package:flutter/src/widgets/framework.dart:3947:5)
#35 ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:4206:5)
#36 StatefulElement._firstBuild (package:flutter/src/widgets/framework.dart:4381:11)
#37 ComponentElement.mount (package:flutter/src/widgets/framework.dart:4201:5)
#38 Element.inflateWidget (package:flutter/src/widgets/framework.dart:3194:14)
#39 Element.updateChild (package:flutter/src/widgets/framework.dart:2988:12)
#40 _ListTileElement._mountChild (package:flutter/src/material/list_tile.dart:999:30)
#41 _ListTileElement.mount (package:flutter/src/material/list_tile.dart:1015:5)
#42 Element.inflateWidget (package:flutter/src/widgets/framework.dart:3194:14)
#43 Element.updateChild (package:flutter/src/widgets/framework.dart:2988:12)
#44 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:4243:16)
#45 Element.rebuild (package:flutter/src/widgets/framework.dart:3947:5)
#46 ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:4206:5)
#47 ComponentElement.mount (package:flutter/src/widgets/framework.dart:4201:5)
#48 Element.inflateWidget (package:flutter/src/widgets/framework.dart:3194:14)
#49 Element.updateChild (package:flutter/src/widgets/framework.dart:2988:12)
#50 SingleChildRenderObjectElement.mount (package:flutter/src/widgets/framework.dart:5445:14)
#51 Element.inflateWidget (package:flutter/src/widgets/framework.dart:3194:14)
#52 Element.updateChild (package:flutter/src/widgets/framework.dart:2988:12)
#53 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:4243:16)
#54 Element.rebuild (package:flutter/src/widgets/framework.dart:3947:5)
#55 ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:4206:5)
#56 ComponentElement.mount (package:flutter/src/widgets/framework.dart:4201:5)
#57 Element.inflateWidget (package:flutter/src/widgets/framework.dart:3194:14)
#58 Element.updateChild (package:flutter/src/widgets/framework.dart:2988:12)
#59 SingleChildRenderObjectElement.mount (package:flutter/src/widgets/framework.dart:5445:14)
#60 Element.inflateWidget (package:flutter/src/widgets/framework.dart:3194:14)
#61 Element.updateChild (package:flutter/src/widgets/framework.dart:2988:12)
#62 SingleChildRenderObjectElement.mount (package:flutter/src/widgets/framework.dart:5445:14)
#63 Element.inflateWidget (package:flutter/src/widgets/framework.dart:3194:14)
#64 Element.updateChild (package:flutter/src/widgets/framework.dart:2988:12)
#65 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:4243:16)
#66 Element.rebuild (package:flutter/src/widgets/framework.dart:3947:5)
#67 ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:4206:5)
#68 ComponentElement.mount (package:flutter/src/widgets/framework.dart:4201:5)
#69 Element.inflateWidget (package:flutter/src/widgets/framework.dart:3194:14)
#70 Element.updateChild (package:flutter/src/widgets/framework.dart:2988:12)
#71 SingleChildRenderObjectElement.mount (package:flutter/src/widgets/framework.dart:5445:14)
#72 Element.inflateWidget (package:flutter/src/widgets/framework.dart:3194:14)
#73 Element.updateChild (package:flutter/src/widgets/framework.dart:2988:12)
#74 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:4243:16)
#75 Element.rebuild (package:flutter/src/widgets/framework.dart:3947:5)
#76 ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:4206:5)
#77 StatefulElement._firstBuild (package:flutter/src/widgets/framework.dart:4381:11)
#78 ComponentElement.mount (package:flutter/src/widgets/framework.dart:4201:5)
#79 Element.inflateWidget (package:flutter/src/widgets/framework.dart:3194:14)
#80 Element.updateChild (package:flutter/src/widgets/framework.dart:2988:12)
#81 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:4243:16)
#82 Element.rebuild (package:flutter/src/widgets/framework.dart:3947:5)
#83 ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:4206:5)
#84 ComponentElement.mount (package:flutter/src/widgets/framework.dart:4201:5)
#85 Element.inflateWidget (package:flutter/src/widgets/framework.dart:3194:14)
#86 Element.updateChild (package:flutter/src/widgets/framework.dart:2988:12)
#87 SingleChildRenderObjectElement.mount (package:flutter/src/widgets/framework.dart:5445:14)
#88 Element.inflateWidget (package:flutter/src/widgets/framework.dart:3194:14)
#89 Element.updateChild (package:flutter/src/widgets/framework.dart:2988:12)
#90 SingleChildRenderObjectElement.mount (package:flutter/src/widgets/framework.dart:5445:14)
#91 Element.inflateWidget (package:flutter/src/widgets/framework.dart:3194:14)
#92 Element.updateChild (package:flutter/src/widgets/framework.dart:2988:12)
#93 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:4243:16)
#94 Element.rebuild (package:flutter/src/widgets/framework.dart:3947:5)
#95 ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:4206:5)
#96 ComponentElement.mount (package:flutter/src/widgets/framework.dart:4201:5)
#97 Element.inflateWidget (package:flutter/src/widgets/framework.dart:3194:14)
#98 Element.updateChild (package:flutter/src/widgets/framework.dart:2988:12)
#99 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:4243:16)
#100 Element.rebuild (package:flutter/src/widgets/framework.dart:3947:5)
#101 ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:4206:5)
#102 StatefulElement._firstBuild (package:flutter/src/widgets/framework.dart:4381:11)
#103 ComponentElement.mount (package:flutter/src/widgets/framework.dart:4201:5)
#104 Element.inflateWidget (package:flutter/src/widgets/framework.dart:3194:14)
#105 Element.updateChild (package:flutter/src/widgets/framework.dart:2988:12)
#106 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:4243:16)
#107 Element.rebuild (package:flutter/src/widgets/framework.dart:3947:5)
#108 ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:4206:5)
#109 ComponentElement.mount (package:flutter/src/widgets/framework.dart:4201:5)
#110 Element.inflateWidget (package:flutter/src/widgets/framework.dart:3194:14)
#111 Element.updateChild (package:flutter/src/widgets/framework.dart:2988:12)
#112 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:4243:16)
#113 Element.rebuild (package:flutter/src/widgets/framework.dart:3947:5)
#114 ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:4206:5)
#115 StatefulElement._firstBuild (package:flutter/src/widgets/framework.dart:4381:11)
#116 ComponentElement.mount (package:flutter/src/widgets/framework.dart:4201:5)
#117 Element.inflateWidget (package:flutter/src/widgets/framework.dart:3194:14)
#118 Element.updateChild (package:flutter/src/widgets/framework.dart:2988:12)
#119 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:4243:16)
#120 Element.rebuild (package:flutter/src/widgets/framework.dart:3947:5)
#121 ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:4206:5)
#122 ComponentElement.mount (package:flutter/src/widgets/framework.dart:4201:5)
#123 Element.inflateWidget (package:flutter/src/widgets/framework.dart:3194:14)
#124 MultiChildRenderObjectElement.mount (package:flutter/src/widgets/framework.dart:5551:32)
#125 Element.inflateWidget (package:flutter/src/widgets/framework.dart:3194:14)
#126 Element.updateChild (package:flutter/src/widgets/framework.dart:2988:12)
#127 SingleChildRenderObjectElement.mount (package:flutter/src/widgets/framework.dart:5445:14)
#128 Element.inflateWidget (package:flutter/src/widgets/framework.dart:3194:14)
#129 Element.updateChild (package:flutter/src/widgets/framework.dart:2988:12)
#130 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:4243:16)
#131 Element.rebuild (package:flutter/src/widgets/framework.dart:3947:5)
#132 ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:4206:5)
#133 ComponentElement.mount (package:flutter/src/widgets/framework.dart:4201:5)
#134 Element.inflateWidget (package:flutter/src/widgets/framework.dart:3194:14)
#135 Element.updateChild (package:flutter/src/widgets/framework.dart:2988:12)
#136 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:4243:16)
#137 Element.rebuild (package:flutter/src/widgets/framework.dart:3947:5)
#138 ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:4206:5)
#139 StatefulElement._firstBuild (package:flutter/src/widgets/framework.dart:4381:11)
#140 ComponentElement.mount (package:flutter/src/widgets/framework.dart:4201:5)
#141 Element.inflateWidget (package:flutter/src/widgets/framework.dart:3194:14)
#142 Element.updateChild (package:flutter/src/widgets/framework.dart:2988:12)
#143 SingleChildRenderObjectElement.mount (package:flutter/src/widgets/framework.dart:5445:14)
#144 Element.inflateWidget (package:flutter/src/widgets/framework.dart:3194:14)
#145 Element.updateChild (package:flutter/src/widgets/framework.dart:2988:12)
#146 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:4243:16)
#147 Element.rebuild (package:flutter/src/widgets/framework.dart:3947:5)
#148 ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:4206:5)
#149 ComponentElement.mount (package:flutter/src/widgets/framework.dart:4201:5)
#150 Element.inflateWidget (package:flutter/src/widgets/framework.dart:3194:14)
#151 Element.updateChild (package:flutter/src/widgets/framework.dart:2988:12)
#152 SingleChildRenderObjectElement.mount (package:flutter/src/widgets/framework.dart:5445:14)
#153 Element.inflateWidget (package:flutter/src/widgets/framework.dart:3194:14)
#154 Element.updateChild (package:flutter/src/widgets/framework.dart:2988:12)
#155 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:4243:16)
#156 Element.rebuild (package:flutter/src/widgets/framework.dart:3947:5)
#157 ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:4206:5)
#158 ComponentElement.mount (package:flutter/src/widgets/framework.dart:4201:5)
#159 Element.inflateWidget (package:flutter/src/widgets/framework.dart:3194:14)
#160 Element.updateChild (package:flutter/src/widgets/framework.dart:2988:12)
#161 SingleChildRenderObjectElement.mount (package:flutter/src/widgets/framework.dart:5445:14)
#162 Element.inflateWidget (package:flutter/src/widgets/framework.dart:3194:14)
#163 Element.updateChild (package:flutter/src/widgets/framework.dart:2988:12)
#164 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:4243:16)
#165 Element.rebuild (package:flutter/src/widgets/framework.dart:3947:5)
#166 ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:4206:5)
#167 StatefulElement._firstBuild (package:flutter/src/widgets/framework.dart:4381:11)
#168 ComponentElement.mount (package:flutter/src/widgets/framework.dart:4201:5)
#169 Element.inflateWidget (package:flutter/src/widgets/framework.dart:3194:14)
#170 Element.updateChild (package:flutter/src/widgets/framework.dart:2988:12)
#171 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:4243:16)
#172 Element.rebuild (package:flutter/src/widgets/framework.dart:3947:5)
#173 ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:4206:5)
#174 StatefulElement._firstBuild (package:flutter/src/widgets/framework.dart:4381:11)
#175 ComponentElement.mount (package:flutter/src/widgets/framework.dart:4201:5)
#176 Element.inflateWidget (package:flutter/src/widgets/framework.dart:3194:14)
#177 Element.updateChild (package:flutter/src/widgets/framework.dart:2988:12)
#178 SingleChildRenderObjectElement.mount (package:flutter/src/widgets/framework.dart:5445:14)
#179 Element.inflateWidget (package:flutter/src/widgets/framework.dart:3194:14)
#180 Element.updateChild (package:flutter/src/widgets/framework.dart:2988:12)
#181 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:4243:16)
#182 Element.rebuild (package:flutter/src/widgets/framework.dart:3947:5)
#183 ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:4206:5)
#184 ComponentElement.mount (package:flutter/src/widgets/framework.dart:4201:5)
#185 Element.inflateWidget (package:flutter/src/widgets/framework.dart:3194:14)
#186 Element.updateChild (package:flutter/src/widgets/framework.dart:2988:12)
#187 SingleChildRenderObjectElement.mount (package:flutter/src/widgets/framework.dart:5445:14)
#188 Element.inflateWidget (package:flutter/src/widgets/framework.dart:3194:14)
#189 Element.updateChild (package:flutter/src/widgets/framework.dart:2988:12)
#190 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:4243:16)
#191 Element.rebuild (package:flutter/src/widgets/framework.dart:3947:5)
#192 ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:4206:5)
#193 ComponentElement.mount (package:flutter/src/widgets/framework.dart:4201:5)
#194 Element.inflateWidget (package:flutter/src/widgets/framework.dart:3194:14)
#195 Element.updateChild (package:flutter/src/widgets/framework.dart:2988:12)
#196 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:4243:16)
#197 Element.rebuild (package:flutter/src/widgets/framework.dart:3947:5)
#198 ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:4206:5)
#199 StatefulElement._firstBuild (package:flutter/src/widgets/framework.dart:4381:11)
#200 ComponentElement.mount (package:flutter/src/widgets/framework.dart:4201:5)
#201 Element.inflateWidget (package:flutter/src/widgets/framework.dart:3194:14)
#202 Element.updateChild (package:flutter/src/widgets/framework.dart:2988:12)
#203 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:4243:16)
#204 Element.rebuild (package:flutter/src/widgets/framework.dart:3947:5)
#205 ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:4206:5)
#206 StatefulElement._firstBuild (package:flutter/src/widgets/framework.dart:4381:11)
#207 ComponentElement.mount (package:flutter/src/widgets/framework.dart:4201:5)
#208 Element.inflateWidget (package:flutter/src/widgets/framework.dart:3194:14)
#209 Element.updateChild (package:flutter/src/widgets/framework.dart:2988:12)
#210 SingleChildRenderObjectElement.mount (package:flutter/src/widgets/framework.dart:5445:14)
#211 Element.inflateWidget (package:flutter/src/widgets/framework.dart:3194:14)
#212 Element.updateChild (package:flutter/src/widgets/framework.dart:2988:12)
#213 SingleChildRenderObjectElement.mount (package:flutter/src/widgets/framework.dart:5445:14)
#214 Element.inflateWidget (package:flutter/src/widgets/framework.dart:3194:14)
#215 Element.updateChild (package:flutter/src/widgets/framework.dart:2988:12)
#216 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:4243:16)
#217 Element.rebuild (package:flutter/src/widgets/framework.dart:3947:5)
#218 ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:4206:5)
#219 ComponentElement.mount (package:flutter/src/widgets/framework.dart:4201:5)
#220 Element.inflateWidget (package:flutter/src/widgets/framework.dart:3194:14)
#221 Element.updateChild (package:flutter/src/widgets/framework.dart:2988:12)
#222 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:4243:16)
#223 Element.rebuild (package:flutter/src/widgets/framework.dart:3947:5)
#224 ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:4206:5)
#225 ComponentElement.mount (package:flutter/src/widgets/framework.dart:4201:5)
#226 ParentDataElement.mount (package:flutter/src/widgets/framework.dart:4617:11)
#227 Element.inflateWidget (package:flutter/src/widgets/framework.dart:3194:14)
#228 Element.updateChild (package:flutter/src/widgets/framework.dart:2988:12)
#229 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:4243:16)
#230 Element.rebuild (package:flutter/src/widgets/framework.dart:3947:5)
#231 ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:4206:5)
#232 StatefulElement._firstBuild (package:flutter/src/widgets/framework.dart:4381:11)
#233 ComponentElement.mount (package:flutter/src/widgets/framework.dart:4201:5)
#234 Element.inflateWidget (package:flutter/src/widgets/framework.dart:3194:14)
#235 Element.updateChild (package:flutter/src/widgets/framework.dart:2988:12)
#236 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:4243:16)
#237 Element.rebuild (package:flutter/src/widgets/framework.dart:3947:5)
#238 ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:4206:5)
#239 ComponentElement.mount (package:flutter/src/widgets/framework.dart:4201:5)
#240 Element.inflateWidget (package:flutter/src/widgets/framework.dart:3194:14)
#241 Element.updateChild (package:flutter/src/widgets/framework.dart:2988:12)
#242 SliverMultiBoxAdaptorElement.updateChild (package:flutter/src/widgets/sliver.dart:1288:36)
#243 SliverMultiBoxAdaptorElement.createChild. (package:flutter/src/widgets/sliver.dart:1273:20)
#244 BuildOwner.buildScope (package:flutter/src/widgets/framework.dart:2412:19)
#245 SliverMultiBoxAdaptorElement.createChild (package:flutter/src/widgets/sliver.dart:1266:11)
#246 RenderSliverMultiBoxAdaptor._createOrObtainChild. (package:flutter/src/rendering/sliver_multi_box_adaptor.dart:354:23)
#247 RenderObject.invokeLayoutCallback. (package:flutter/src/rendering/object.dart:1823:58)
#248 PipelineOwner._enableMutationsToDirtySubtrees (package:flutter/src/rendering/object.dart:875:15)
#249 RenderObject.invokeLayoutCallback (package:flutter/src/rendering/object.dart:1823:13)
#250 RenderSliverMultiBoxAdaptor._createOrObtainChild (package:flutter/src/rendering/sliver_multi_box_adaptor.dart:343:5)
#251 RenderSliverMultiBoxAdaptor.addInitialChild (package:flutter/src/rendering/sliver_multi_box_adaptor.dart:427:5)
#252 RenderSliverList.performLayout (package:flutter/src/rendering/sliver_list.dart:78:12)
#253 RenderObject.layout (package:flutter/src/rendering/object.dart:1724:7)
#254 RenderSliverEdgeInsetsPadding.performLayout (package:flutter/src/rendering/sliver_padding.dart:134:11)
#255 RenderSliverPadding.performLayout (package:flutter/src/rendering/sliver_padding.dart:373:11)
#256 RenderObject.layout (package:flutter/src/rendering/object.dart:1724:7)
#257 RenderViewportBase.layoutChildSequence (package:flutter/src/rendering/viewport.dart:410:13)
#258 RenderViewport._attemptLayout (package:flutter/src/rendering/viewport.dart:1367:12)
#259 RenderViewport.performLayout (package:flutter/src/rendering/viewport.dart:1285:20)
#260 RenderObject.layout (package:flutter/src/rendering/object.dart:1724:7)
#261 RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:105:13)
#262 RenderObject.layout (package:flutter/src/rendering/object.dart:1724:7)
#263 RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:105:13)
#264 RenderObject.layout (package:flutter/src/rendering/object.dart:1724:7)
#265 RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:105:13)
#266 RenderObject.layout (package:flutter/src/rendering/object.dart:1724:7)
#267 RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:105:13)
#268 RenderObject.layout (package:flutter/src/rendering/object.dart:1724:7)
#269 RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:105:13)
#270 RenderObject.layout (package:flutter/src/rendering/object.dart:1724:7)
#271 RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:105:13)
#272 RenderObject.layout (package:flutter/src/rendering/object.dart:1724:7)
#273 RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:105:13)
#274 RenderObject.layout (package:flutter/src/rendering/object.dart:1724:7)
#275 RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:105:13)
#276 RenderObject.layout (package:flutter/src/rendering/object.dart:1724:7)
#277 RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:105:13)
#278 RenderObject.layout (package:flutter/src/rendering/object.dart:1724:7)
#279 MultiChildLayoutDelegate.layoutChild (package:flutter/src/rendering/custom_layout.dart:163:11)
#280 _ScaffoldLayout.performLayout (package:flutter/src/material/scaffold.dart:477:7)
#281 MultiChildLayoutDelegate._callPerformLayout (package:flutter/src/rendering/custom_layout.dart:232:7)
#282 RenderCustomMultiChildLayoutBox.performLayout (package:flutter/src/rendering/custom_layout.dart:391:14)
#283 RenderObject.layout (package:flutter/src/rendering/object.dart:1724:7)
#284 RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:105:13)
#285 RenderObject.layout (package:flutter/src/rendering/object.dart:1724:7)
#286 RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:105:13)
#287 _RenderCustomClip.performLayout (package:flutter/src/rendering/proxy_box.dart:1232:11)
#288 RenderObject.layout (package:flutter/src/rendering/object.dart:1724:7)
#289 RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:105:13)
#290 RenderObject.layout (package:flutter/src/rendering/object.dart:1724:7)
#291 RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:105:13)
#292 RenderObject.layout (package:flutter/src/rendering/object.dart:1724:7)
#293 RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:105:13)
#294 RenderObject.layout (package:flutter/src/rendering/object.dart:1724:7)
#295 RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:105:13)
#296 RenderObject.layout (package:flutter/src/rendering/object.dart:1724:7)
#297 RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:105:13)
#298 RenderObject.layout (package:flutter/src/rendering/object.dart:1724:7)
#299 RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:105:13)
#300 RenderObject.layout (package:flutter/src/rendering/object.dart:1724:7)
#301 RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:105:13)
#302 RenderObject.layout (package:flutter/src/rendering/object.dart:1724:7)
#303 RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:105:13)
#304 RenderOffstage.performLayout (package:flutter/src/rendering/proxy_box.dart:3168:13)
#305 RenderObject.layout (package:flutter/src/rendering/object.dart:1724:7)
#306 RenderStack.performLayout (package:flutter/src/rendering/stack.dart:505:15)
#307 RenderObject.layout (package:flutter/src/rendering/object.dart:1724:7)
#308 RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:105:13)
#309 RenderObject.layout (package:flutter/src/rendering/object.dart:1724:7)
#310 RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:105:13)
#311 RenderObject.layout (package:flutter/src/rendering/object.dart:1724:7)
#312 RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:105:13)
#313 RenderObject.layout (package:flutter/src/rendering/object.dart:1724:7)
#314 RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:105:13)
#315 RenderObject.layout (package:flutter/src/rendering/object.dart:1724:7)
#316 RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:105:13)
#317 RenderObject.layout (package:flutter/src/rendering/object.dart:1724:7)
#318 RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:105:13)
#319 RenderObject.layout (package:flutter/src/rendering/object.dart:1724:7)
#320 RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:105:13)
#321 RenderObject._layoutWithoutResize (package:flutter/src/rendering/object.dart:1584:7)
#322 PipelineOwner.flushLayout (package:flutter/src/rendering/object.dart:844:18)
#323 AutomatedTestWidgetsFlutterBinding.drawFrame (package:flutter_test/src/binding.dart:977:23)
#324 RendererBinding._handlePersistentFrameCallback (package:flutter/src/rendering/binding.dart:283:5)
#325 SchedulerBinding._invokeFrameCallback (package:flutter/src/scheduler/binding.dart:1102:15)
#326 SchedulerBinding.handleDrawFrame (package:flutter/src/scheduler/binding.dart:1041:9)
#327 AutomatedTestWidgetsFlutterBinding.pump. (package:flutter_test/src/binding.dart:872:9)
#330 TestAsyncUtils.guard (package:flutter_test/src/test_async_utils.dart:69:41)
#331 AutomatedTestWidgetsFlutterBinding.pump (package:flutter_test/src/binding.dart:859:27)
#332 WidgetTester.pump. (package:flutter_test/src/widget_tester.dart:343:53)
#335 TestAsyncUtils.guard (package:flutter_test/src/test_async_utils.dart:69:41)
#336 WidgetTester.pump (package:flutter_test/src/widget_tester.dart:343:27)
#337 main.. (file:///C:/Projekte/aphasia-flutter-app/test/widgets/word_trainer/deck_list_widget_test.dart:62:20)
#351 AutomatedTestWidgetsFlutterBinding.runTest. (package:flutter_test/src/binding.dart:1066:17)
#353 AutomatedTestWidgetsFlutterBinding.runTest. (package:flutter_test/src/binding.dart:1054:35)
(elided 33 frames from class _FakeAsync, package dart:async, package dart:async-patch, and package stack_trace)

Picture provider: ExactAssetPicture(name: "packages/flag/res/flag/de.svg", bundle: null,
colorFilter: null)
Picture key: AssetBundlePictureKey(bundle: PlatformAssetBundle#06fc8(), name:
"packages/flag/res/flag/de.svg", colorFilter: null)

@LunaGao
Copy link
Owner

LunaGao commented Jun 2, 2020

@PMatthaei Good point. I never thought about this problem.
Would you share some test code so that I can better understand how to help you solve this problem?

@LunaGao LunaGao added enhancement New feature or request good first issue Good for newcomers labels Jun 2, 2020
@PMatthaei
Copy link
Author

I guess this test should be able to run in a project which is importing this package.

import 'package:flutter_test/flutter_test.dart';

import 'package:flag/flag.dart';

void main() {
  testWidgets('flag widget test', (WidgetTester tester) async {
    await tester.pumpWidget(Flags.getFlag(country: 'AD'));
  });
}

@LunaGao LunaGao self-assigned this Aug 2, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants