Exception while using inside a ListView
Closed this issue · 1 comments
MartinJLee commented
════════ Exception caught by rendering library ═════════════════════════════════
The following assertion was thrown during performLayout():
BoxConstraints forces an infinite height.
These invalid constraints were provided to RenderDecoratedBox's layout() function by the following function, which probably computed the invalid constraints in question:
RenderConstrainedBox.performLayout (package:flutter/src/rendering/proxy_box.dart:270:13)
The offending constraints were: BoxConstraints(w=320.0, h=Infinity)
The relevant error-causing widget was
ModalProgressHUD
lib/…/welcome/user_profile_update_form.dart:58
When the exception was thrown, this was the stack
#0 BoxConstraints.debugAssertIsValid.<anonymous closure>.throwError
package:flutter/…/rendering/box.dart:519
#1 BoxConstraints.debugAssertIsValid.<anonymous closure>
package:flutter/…/rendering/box.dart:563
#2 BoxConstraints.debugAssertIsValid
package:flutter/…/rendering/box.dart:567
#3 RenderObject.layout
package:flutter/…/rendering/object.dart:1672
#4 RenderConstrainedBox.performLayout
package:flutter/…/rendering/proxy_box.dart:270
...
MartinJLee commented
This seems to relate to ModalBarrier
class, I have to wrap ModalProgressHUD
with a Container with a specific height.
https://stackoverflow.com/questions/60058946/flutter-object-was-given-an-infinite-size-during-layout