@@ -190,28 +190,8 @@ extension List {
190
190
case . fillParent:
191
191
if let max = constraint. width. constrainedValue {
192
192
return max
193
- } else if case . caffeinated = layoutMode {
194
- return . infinity
195
193
} else {
196
- fatalError (
197
- """
198
- `List` is being used with the `.fillParent` measurement option, which takes \
199
- up the full width it is afforded by its parent element. However, \
200
- the parent element provided the `List` an unconstrained width, which is meaningless.
201
-
202
- How do you fix this?
203
- --------------------
204
- 1) This usually means that your `List` itself has been \
205
- placed in a `ScrollView` or other element which intentionally provides an \
206
- unconstrained measurement to its content. If your `List` is in a `ScrollView`, \
207
- remove the outer scroll view – `List` manages its own scrolling. Two `ScrollViews` \
208
- that are nested within each other is generally meaningless unless they scroll \
209
- in different directions (eg, horizontal vs vertical).
210
-
211
- 2) If your `List` is not in a `ScrollView`, ensure that the element
212
- measuring it is providing a constrained `SizeConstraint`.
213
- """
214
- )
194
+ return . infinity
215
195
}
216
196
case . natural:
217
197
return size. naturalWidth ?? size. contentSize. width
@@ -223,31 +203,11 @@ extension List {
223
203
case . fillParent:
224
204
if let max = constraint. height. constrainedValue {
225
205
return max
226
- } else if case . caffeinated = layoutMode {
227
- return . infinity
228
206
} else {
229
- fatalError (
230
- """
231
- `List` is being used with the `.fillParent` measurement option, which takes \
232
- up the full height it is afforded by its parent element. However, \
233
- the parent element provided the `List` an unconstrained height, which is meaningless.
234
-
235
- How do you fix this?
236
- --------------------
237
- 1) This usually means that your `List` itself has been \
238
- placed in a `ScrollView` or other element which intentionally provides an \
239
- unconstrained measurement to its content. If your `List` is in a `ScrollView`, \
240
- remove the outer scroll view – `List` manages its own scrolling. Two `ScrollViews` \
241
- that are nested within each other is generally meaningless unless they scroll \
242
- in different directions (eg, horizontal vs vertical).
243
-
244
- 2) If your `List` is not in a `ScrollView`, ensure that the element
245
- measuring it is providing a constrained `SizeConstraint`.
246
- """
247
- )
207
+ return . infinity
248
208
}
249
209
case . natural:
250
- if case . caffeinated = layoutMode , let maxHeight = constraint. height. constrainedValue {
210
+ if let maxHeight = constraint. height. constrainedValue {
251
211
return min ( size. contentSize. height, maxHeight)
252
212
}
253
213
return size. contentSize. height
0 commit comments