Document and bring sanity to BoxConstraints
Turns out many of the functions on BoxConstraints weren't used or had callers that could easily be updated to other functions. I've added dartdoc to all the public functions as well as renamed some functions that had similar names but did different things.
This commit is contained in:
@@ -452,7 +452,7 @@ class RenderBoxToRenderSectorAdapter extends RenderBox {
|
||||
Size getIntrinsicDimensions(BoxConstraints constraints) {
|
||||
assert(child is RenderSector);
|
||||
assert(child.parentData is SectorParentData);
|
||||
assert(!constraints.isInfinite);
|
||||
assert(constraints.maxWidth < double.INFINITY || constraints.maxHeight < double.INFINITY);
|
||||
double maxChildDeltaRadius = math.min(constraints.maxWidth, constraints.maxHeight) / 2.0 - innerRadius;
|
||||
SectorDimensions childDimensions = child.getIntrinsicDimensions(new SectorConstraints(maxDeltaRadius: maxChildDeltaRadius), innerRadius);
|
||||
double dimension = (innerRadius + childDimensions.deltaRadius) * 2.0;
|
||||
@@ -464,7 +464,7 @@ class RenderBoxToRenderSectorAdapter extends RenderBox {
|
||||
size = constraints.constrain(Size.zero);
|
||||
} else {
|
||||
assert(child is RenderSector);
|
||||
assert(!constraints.isInfinite);
|
||||
assert(constraints.maxWidth < double.INFINITY || constraints.maxHeight < double.INFINITY);
|
||||
double maxChildDeltaRadius = math.min(constraints.maxWidth, constraints.maxHeight) / 2.0 - innerRadius;
|
||||
assert(child.parentData is SectorParentData);
|
||||
child.parentData.radius = innerRadius;
|
||||
|
||||
@@ -53,7 +53,7 @@ HAL: This mission is too important for me to allow you to jeopardize it.''';
|
||||
|
||||
Component createSeparator() {
|
||||
return new Container(
|
||||
constraints: const BoxConstraints.expandWidth(maxHeight: 0.0),
|
||||
constraints: const BoxConstraints.expand(height: 0.0),
|
||||
margin: const EdgeDims.symmetric(vertical: 10.0, horizontal: 64.0),
|
||||
decoration: const BoxDecoration(
|
||||
border: const Border(
|
||||
|
||||
Reference in New Issue
Block a user