Parent data fixes

Add some missing functionality to ParentData subclasses.

Fixes #474
This commit is contained in:
Adam Barth
2015-12-06 21:34:41 -08:00
parent 83ba426363
commit 2f3baf14b3
2 changed files with 9 additions and 1 deletions

View File

@@ -7,6 +7,14 @@ import 'object.dart';
class MultiChildLayoutParentData extends ContainerBoxParentDataMixin<RenderBox> {
Object id;
void merge(MultiChildLayoutParentData other) {
if (other.id != null)
id = other.id;
super.merge(other);
}
String toString() => '${super.toString()}; id=$id';
}
abstract class MultiChildLayoutDelegate {

View File

@@ -192,7 +192,7 @@ class StackParentData extends ContainerBoxParentDataMixin<RenderBox> {
/// children in the stack.
bool get isPositioned => top != null || right != null || bottom != null || left != null || width != null || height != null;
String toString() => '${super.toString()}; top=$top; right=$right; bottom=$bottom, left=$left';
String toString() => '${super.toString()}; top=$top; right=$right; bottom=$bottom; left=$left; width=$width; height=$height';
}
abstract class RenderStackBase extends RenderBox