mirror of
https://github.com/flutter/flutter.git
synced 2026-02-20 02:29:02 +08:00
commit
3de7121b8e
@ -11,12 +11,6 @@ class MultiChildLayoutParentData extends ContainerBoxParentDataMixin<RenderBox>
|
||||
/// An object representing the identity of this child.
|
||||
Object id;
|
||||
|
||||
void merge(MultiChildLayoutParentData other) {
|
||||
if (other.id != null)
|
||||
id = other.id;
|
||||
super.merge(other);
|
||||
}
|
||||
|
||||
String toString() => '${super.toString()}; id=$id';
|
||||
}
|
||||
|
||||
|
||||
@ -17,12 +17,6 @@ class FlexParentData extends ContainerBoxParentDataMixin<RenderBox> {
|
||||
/// according to the flex factors of the flexible children.
|
||||
int flex;
|
||||
|
||||
void merge(FlexParentData other) {
|
||||
if (other.flex != null)
|
||||
flex = other.flex;
|
||||
super.merge(other);
|
||||
}
|
||||
|
||||
String toString() => '${super.toString()}; flex=$flex';
|
||||
}
|
||||
|
||||
|
||||
@ -291,12 +291,6 @@ class GridParentData extends ContainerBoxParentDataMixin<RenderBox> {
|
||||
/// Opaque data passed to the getChildPlacement method of the grid's [GridDelegate].
|
||||
Object placementData;
|
||||
|
||||
void merge(GridParentData other) {
|
||||
if (other.placementData != null)
|
||||
placementData = other.placementData;
|
||||
super.merge(other);
|
||||
}
|
||||
|
||||
String toString() => '${super.toString()}; placementData=$placementData';
|
||||
}
|
||||
|
||||
|
||||
@ -30,12 +30,6 @@ class ParentData {
|
||||
/// Called when the RenderObject is removed from the tree.
|
||||
void detach() { }
|
||||
|
||||
/// Override this function in subclasses to merge in data from other instance
|
||||
/// into this instance.
|
||||
void merge(ParentData other) {
|
||||
assert(other.runtimeType == this.runtimeType);
|
||||
}
|
||||
|
||||
String toString() => '<none>';
|
||||
}
|
||||
|
||||
|
||||
@ -164,22 +164,6 @@ class StackParentData extends ContainerBoxParentDataMixin<RenderBox> {
|
||||
left = value.left;
|
||||
}
|
||||
|
||||
void merge(StackParentData other) {
|
||||
if (other.top != null)
|
||||
top = other.top;
|
||||
if (other.right != null)
|
||||
right = other.right;
|
||||
if (other.bottom != null)
|
||||
bottom = other.bottom;
|
||||
if (other.left != null)
|
||||
left = other.left;
|
||||
if (other.width != null)
|
||||
width = other.width;
|
||||
if (other.height != null)
|
||||
height = other.height;
|
||||
super.merge(other);
|
||||
}
|
||||
|
||||
/// Whether this child is considered positioned
|
||||
///
|
||||
/// A child is positioned if any of the top, right, bottom, or left offsets
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user