From 73a1a74ba13b602e6c1bdecf19818a7bcd46ca56 Mon Sep 17 00:00:00 2001 From: Chris Bracken Date: Thu, 1 Mar 2018 18:34:15 -0800 Subject: [PATCH] Eliminate RenderView orientation, timeForRotation (#15044) Orientation, and by extension time for rotation between orientations, was aspirational and never used. While this is technically a breaking change, this code never actually did anything. If you were setting either orientation or timeForRotation, simply delete those parameters and the code will continue to behave identically to how it had been. --- packages/flutter/lib/src/rendering/view.dart | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/packages/flutter/lib/src/rendering/view.dart b/packages/flutter/lib/src/rendering/view.dart index 97e42946d3..b2b363a91b 100644 --- a/packages/flutter/lib/src/rendering/view.dart +++ b/packages/flutter/lib/src/rendering/view.dart @@ -24,7 +24,6 @@ class ViewConfiguration { const ViewConfiguration({ this.size: Size.zero, this.devicePixelRatio: 1.0, - this.orientation }); /// The size of the output surface. @@ -33,9 +32,6 @@ class ViewConfiguration { /// The pixel density of the output surface. final double devicePixelRatio; - /// The orientation of the output surface (aspirational). - final int orientation; - /// Creates a transformation matrix that applies the [devicePixelRatio]. Matrix4 toMatrix() { return new Matrix4.diagonal3Values(devicePixelRatio, devicePixelRatio, 1.0); @@ -58,24 +54,16 @@ class RenderView extends RenderObject with RenderObjectWithChildMixin /// The [configuration] must not be null. RenderView({ RenderBox child, - this.timeForRotation: const Duration(microseconds: 83333), @required ViewConfiguration configuration, }) : assert(configuration != null), _configuration = configuration { this.child = child; } - /// The amount of time the screen rotation animation should last (aspirational). - Duration timeForRotation; - /// The current layout size of the view. Size get size => _size; Size _size = Size.zero; - /// The current orientation of the view (aspirational). - int get orientation => _orientation; - int _orientation; // 0..3 - /// The constraints used for the root layout. ViewConfiguration get configuration => _configuration; ViewConfiguration _configuration; @@ -130,11 +118,6 @@ class RenderView extends RenderObject with RenderObjectWithChildMixin @override void performLayout() { assert(_rootTransform != null); - if (configuration.orientation != _orientation) { - if (_orientation != null && child != null) - child.rotate(oldAngle: _orientation, newAngle: configuration.orientation, time: timeForRotation); - _orientation = configuration.orientation; - } _size = configuration.size; assert(_size.isFinite);