Reenable the gallery smoke test (#4303)
...and fix some grid and table intrinsic issues it uncovered.
This commit is contained in:
@@ -109,6 +109,5 @@ void main() {
|
||||
await tester.tap(find.text('Light'));
|
||||
await tester.pump();
|
||||
await tester.pump(const Duration(seconds: 1)); // Wait until it's changed.
|
||||
},
|
||||
skip: true);
|
||||
});
|
||||
}
|
||||
|
||||
@@ -292,6 +292,10 @@ abstract class GridDelegateWithInOrderChildPlacement extends GridDelegate {
|
||||
|
||||
|
||||
/// A [GridDelegate] that divides the grid's width evenly for a fixed number of columns.
|
||||
///
|
||||
/// Grids using this delegate cannot validly be placed inside an unconstrained
|
||||
/// horizontal space, since they attempt to divide the incoming horizontal
|
||||
/// maximum width constraint.
|
||||
class FixedColumnCountGridDelegate extends GridDelegateWithInOrderChildPlacement {
|
||||
/// Creates a grid delegate that uses a fixed column count.
|
||||
///
|
||||
@@ -349,7 +353,17 @@ class FixedColumnCountGridDelegate extends GridDelegateWithInOrderChildPlacement
|
||||
return 0.0;
|
||||
}
|
||||
|
||||
// TODO(ianh): Provide efficient intrinsic height functions.
|
||||
@override
|
||||
double getMinIntrinsicHeight(double width, int childCount) {
|
||||
// TODO(ianh): Strictly, this should examine the children.
|
||||
return 0.0;
|
||||
}
|
||||
|
||||
@override
|
||||
double getMaxIntrinsicHeight(double width, int childCount) {
|
||||
// TODO(ianh): Strictly, this should examine the children.
|
||||
return 0.0;
|
||||
}
|
||||
}
|
||||
|
||||
/// A [GridDelegate] that fills the width with a variable number of tiles.
|
||||
|
||||
@@ -892,7 +892,6 @@ class RenderTable extends RenderBox {
|
||||
if (flexes[x] != null) {
|
||||
final double newWidth = widths[x] - deficit * flexes[x] / totalFlex;
|
||||
assert(newWidth.isFinite);
|
||||
assert(newWidth >= 0.0);
|
||||
if (newWidth <= minWidths[x]) {
|
||||
// shrank to minimum
|
||||
deficit -= widths[x] - minWidths[x];
|
||||
@@ -904,6 +903,7 @@ class RenderTable extends RenderBox {
|
||||
widths[x] = newWidth;
|
||||
newTotalFlex += flexes[x];
|
||||
}
|
||||
assert(widths[x] >= 0.0);
|
||||
}
|
||||
}
|
||||
totalFlex = newTotalFlex;
|
||||
|
||||
Reference in New Issue
Block a user