Commit 20402ba7 authored by Adam Barth's avatar Adam Barth Committed by GitHub

Remove MaxTileWidthGrid (#7875)

This widget has no clients. Please use GridView.extent instead.
parent c7054b30
......@@ -1790,7 +1790,6 @@ class Positioned extends ParentDataWidget<Stack> {
/// such as:
///
/// * [FixedColumnCountGrid] (which creates a grid with a fixed number of columns)
/// * [MaxTileWidthGrid] (which creates a grid whose tiles have a maximum width)
/// * [CustomGrid] (which lets you supply your own [GridDelegate])
abstract class GridRenderObjectWidget extends MultiChildRenderObjectWidget {
/// Initializes fields for subclasses.
......@@ -1891,53 +1890,6 @@ class FixedColumnCountGrid extends GridRenderObjectWidget {
}
}
/// A widget that uses a grid layout with a maximum tile width.
///
/// For details about the grid layout algorithm, see [MaxTileWidthGridDelegate].
class MaxTileWidthGrid extends GridRenderObjectWidget {
/// Creates a grid with a maximum tile width.
///
/// The [columnCount] argument must not be negative.
MaxTileWidthGrid({
Key key,
@required this.maxTileWidth,
this.columnSpacing: 0.0,
this.rowSpacing: 0.0,
this.tileAspectRatio: 1.0,
this.padding: EdgeInsets.zero,
List<Widget> children: const <Widget>[],
}) : super(key: key, children: children) {
assert(maxTileWidth != null && maxTileWidth >= 0.0);
assert(tileAspectRatio != null && tileAspectRatio > 0.0);
}
/// The maximum width of a tile in the grid.
final double maxTileWidth;
/// The ratio of the width to the height of each tile in the grid.
final double tileAspectRatio;
/// The horizontal distance between columns.
final double columnSpacing;
/// The vertical distance between rows.
final double rowSpacing;
/// The amount of padding to apply to each child.
final EdgeInsets padding;
@override
MaxTileWidthGridDelegate createDelegate() {
return new MaxTileWidthGridDelegate(
maxTileWidth: maxTileWidth,
tileAspectRatio: tileAspectRatio,
columnSpacing: columnSpacing,
rowSpacing: rowSpacing,
padding: padding
);
}
}
/// A widget that controls the placement of a child in a grid.
///
/// The [placementData] this widget associates with the child is interpreted by
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment