From d0240c4eae8643746961fb31873e682272565648 Mon Sep 17 00:00:00 2001 From: Adam Barth Date: Mon, 8 Feb 2016 15:56:59 -0800 Subject: [PATCH] Remove ParentData#merge There aren't any clients anymore. Fixes #1684 --- .../flutter/lib/src/rendering/custom_layout.dart | 6 ------ packages/flutter/lib/src/rendering/flex.dart | 6 ------ packages/flutter/lib/src/rendering/grid.dart | 6 ------ packages/flutter/lib/src/rendering/object.dart | 6 ------ packages/flutter/lib/src/rendering/stack.dart | 16 ---------------- 5 files changed, 40 deletions(-) diff --git a/packages/flutter/lib/src/rendering/custom_layout.dart b/packages/flutter/lib/src/rendering/custom_layout.dart index abcaea39f8f..6f61bddaa7f 100644 --- a/packages/flutter/lib/src/rendering/custom_layout.dart +++ b/packages/flutter/lib/src/rendering/custom_layout.dart @@ -11,12 +11,6 @@ class MultiChildLayoutParentData extends ContainerBoxParentDataMixin /// 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'; } diff --git a/packages/flutter/lib/src/rendering/flex.dart b/packages/flutter/lib/src/rendering/flex.dart index c0c79a064af..6d314432d6e 100644 --- a/packages/flutter/lib/src/rendering/flex.dart +++ b/packages/flutter/lib/src/rendering/flex.dart @@ -17,12 +17,6 @@ class FlexParentData extends ContainerBoxParentDataMixin { /// 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'; } diff --git a/packages/flutter/lib/src/rendering/grid.dart b/packages/flutter/lib/src/rendering/grid.dart index 792e416ef30..ccefe6ca5de 100644 --- a/packages/flutter/lib/src/rendering/grid.dart +++ b/packages/flutter/lib/src/rendering/grid.dart @@ -291,12 +291,6 @@ class GridParentData extends ContainerBoxParentDataMixin { /// 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'; } diff --git a/packages/flutter/lib/src/rendering/object.dart b/packages/flutter/lib/src/rendering/object.dart index aa6f1cd4001..d2d8c400019 100644 --- a/packages/flutter/lib/src/rendering/object.dart +++ b/packages/flutter/lib/src/rendering/object.dart @@ -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() => ''; } diff --git a/packages/flutter/lib/src/rendering/stack.dart b/packages/flutter/lib/src/rendering/stack.dart index 5a78db9ab20..74df261b397 100644 --- a/packages/flutter/lib/src/rendering/stack.dart +++ b/packages/flutter/lib/src/rendering/stack.dart @@ -164,22 +164,6 @@ class StackParentData extends ContainerBoxParentDataMixin { 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