I'm new to Flutter (liking it a lot so far).
I have a ScrollableList as a child of a Row and this specific combination seems to cause Flutter to run into some sizing issue. The exact error is below. I should mention that if I swap out the Row with a Column or the ScrollableList with a Text object or something else, it doesn't throw the same error. Sample code to replicate this issue is attached. I can't find any examples where ScrollableList or Row were given width somehow or that a BoxConstraint is necessarily required. It's likely I'm missing something simple, but I'm stuck :)
--
You received this message because you are subscribed to the Google Groups "Flutter Dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to flutter-dev...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Thanks so much, Adam. I wasn't expecting an answer over the weekend :) And, using Flexible worked for me since I'm trying to create a widget that has 3 scrollable lists side by side (with only one item visible) to represent a timer with Hours, Mins and Secs.
I did look at the layout page, but I couldn't figure out from it that using Flexible would somehow constraint the children of Row. I knew I needed some way of sizing the scrollable list's width, but I didn't want to specify a hard value and wanted it to fill up the rest of the screen's width instead. It wasn't intuitive to me that a Flexible would actually put a constraint, but the way you described it makes sense.From the layout page:
"In unbounded constraints, they try to fit their children in that direction. In this case, you cannot set flex on the children to anything other than 0 (the default). In the widget library, this means that you cannot use Flexible when the flex box is inside another flex box or inside a scrollable. If you do, you’ll get an exception message pointing you at this document."
Doesn't this mean that I shouldn't be able to use Flexible inside Row since it is a Flex box inside another flex box and the Row itself didn't have a constraint?
If I'm not the only one who's run into this issue, perhaps some examples in the layout page showing how to put size constraints in similar situations may be helpful.
I did manage to see the link, but I had to use "flutter run" and look at it in the console because Atom's console logging is tiny on my screen.
BTW, I just noticed that the ScrollableList's page says:"A scrollable list of children that have equal size."which seems to be different from what you had mentioned about how ScrollableList can't visit all it's children and that they can have different sizes. Does the doc need to be updated?