Reenable the gallery smoke test (#4303)

...and fix some grid and table intrinsic issues it uncovered.
This commit is contained in:
Ian Hickson
2016-06-01 15:34:48 -07:00
parent 9e9dfc3d2d
commit bf6ae3ee76
3 changed files with 17 additions and 4 deletions

View File

@@ -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);
});
}

View File

@@ -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.

View File

@@ -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;