{"action":"created","comment":{"url":"https://api.github.com/repos/flutter/flutter/pulls/comments/73759782","id":73759782,"diff_hunk":"@@ -0,0 +1,100 @@\n+// Copyright 2015 The Chromium Authors. All rights reserved.\n+// Use of this source code is governed by a BSD-style license that can be\n+// found in the LICENSE file.\n+\n+import 'package:flutter/animation.dart';\n+\n+import 'box.dart';\n+import 'object.dart';\n+import 'shifted_box.dart';\n+\n+/// A render object that can render child size change animations.\n+class RenderAnimatedSize extends RenderAligningShiftedBox {\n+  /// Creates a render animated size.\n+  RenderAnimatedSize({\n+    Duration duration,\n+    Curve curve,\n+    RenderBox child\n+  }) : super(child: child, alignment: FractionalOffset.center) {\n+    _controller = new AnimationController(\n+      duration: duration\n+    );\n+    _animation = new CurvedAnimation(\n+      parent: _controller,\n+      curve: curve\n+    );\n+  }\n+\n+  AnimationController _controller;\n+  CurvedAnimation _animation;\n+  Size _oldSize;\n+  Size _newSize;\n+\n+  /// The duration of the animation.\n+  Duration get duration => _controller.duration;\n+  set duration(Duration value) {\n+    assert(value != null);\n+    if (value == _controller.duration)\n+      return;\n+    _controller.duration = value;\n+  }\n+\n+  /// The curve of the animation.\n+  Curve get curve => _animation.curve;\n+  set curve(Curve value) {\n+    assert(value != null);\n+    if (value == _animation.curve)\n+      return;\n+    _animation.curve = value;\n+  }\n+\n+  @override\n+  void detach() {\n+    _controller?.stop();\n+    super.detach();\n+  }\n+\n+  void _trigger() {\n+    _controller\n+      ..removeListener(markNeedsLayout)\n+      ..value = 0.0\n+      ..forward()\n+      ..addListener(markNeedsLayout);\n+  }\n+\n+  Size _getSize() {\n+    return Size.lerp(_oldSize, _newSize, _animation.value);\n+  }\n+\n+  @override\n+  void performLayout() {\n+    if (child != null) {\n+      child.layout(constraints, parentUsesSize: true);\n+\n+      if (_newSize == null) {\n+        _oldSize = _newSize = constraints.constrain(child.size);\n+      } else {\n+        final Size childSize = constraints.constrain(child.size);\n+\n+        if (_newSize != childSize) {\n+          _oldSize = _newSize;\n+          _newSize = childSize;\n+          _trigger();\n+        }\n+      }\n+\n+      size = _getSize();\n+      alignChild();\n+    } else {\n+      size = _oldSize = _newSize = constraints.constrain(Size.zero);\n+    }\n+  }\n+\n+  @override\n+  void paint(PaintingContext context, Offset offset) {\n+    if (child != null) {\n+      final Rect rect = new Rect.fromLTWH(0.0, 0.0, size.width, size.height);\n+      context.pushClipRect(needsCompositing, offset, rect, super.paint);","path":"packages/flutter/lib/src/rendering/animated_size.dart","position":97,"original_position":97,"commit_id":"f4c2689fb58c307219e7bec4110d589721f853a6","original_commit_id":"f4c2689fb58c307219e7bec4110d589721f853a6","user":{"login":"abarth","id":112007,"avatar_url":"https://avatars.githubusercontent.com/u/112007?v=3","gravatar_id":"","url":"https://api.github.com/users/abarth","html_url":"https://github.com/abarth","followers_url":"https://api.github.com/users/abarth/followers","following_url":"https://api.github.com/users/abarth/following{/other_user}","gists_url":"https://api.github.com/users/abarth/gists{/gist_id}","starred_url":"https://api.github.com/users/abarth/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/abarth/subscriptions","organizations_url":"https://api.github.com/users/abarth/orgs","repos_url":"https://api.github.com/users/abarth/repos","events_url":"https://api.github.com/users/abarth/events{/privacy}","received_events_url":"https://api.github.com/users/abarth/received_events","type":"User","site_admin":false},"body":"You should only push a clip rect if the child actually visually overflows.  You should compute whether there is visual overflow in the `performLayout` function.  (Search in the rendering directory for \"visualoverflow\")","created_at":"2016-08-05T21:09:04Z","updated_at":"2016-08-05T21:09:04Z","html_url":"https://github.com/flutter/flutter/pull/5260#discussion_r73759782","pull_request_url":"https://api.github.com/repos/flutter/flutter/pulls/5260","_links":{"self":{"href":"https://api.github.com/repos/flutter/flutter/pulls/comments/73759782"},"html":{"href":"https://github.com/flutter/flutter/pull/5260#discussion_r73759782"},"pull_request":{"href":"https://api.github.com/repos/flutter/flutter/pulls/5260"}}},"pull_request":{"url":"https://api.github.com/repos/flutter/flutter/pulls/5260","id":80301431,"html_url":"https://github.com/flutter/flutter/pull/5260","diff_url":"https://github.com/flutter/flutter/pull/5260.diff","patch_url":"https://github.com/flutter/flutter/pull/5260.patch","issue_url":"https://api.github.com/repos/flutter/flutter/issues/5260","number":5260,"state":"open","locked":false,"title":"Added AnimatedSize.","user":{"login":"dragostis","id":4136413,"avatar_url":"https://avatars.githubusercontent.com/u/4136413?v=3","gravatar_id":"","url":"https://api.github.com/users/dragostis","html_url":"https://github.com/dragostis","followers_url":"https://api.github.com/users/dragostis/followers","following_url":"https://api.github.com/users/dragostis/following{/other_user}","gists_url":"https://api.github.com/users/dragostis/gists{/gist_id}","starred_url":"https://api.github.com/users/dragostis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dragostis/subscriptions","organizations_url":"https://api.github.com/users/dragostis/orgs","repos_url":"https://api.github.com/users/dragostis/repos","events_url":"https://api.github.com/users/dragostis/events{/privacy}","received_events_url":"https://api.github.com/users/dragostis/received_events","type":"User","site_admin":false},"body":"Added a widget that implicitly animates the size of it child.","created_at":"2016-08-05T20:20:40Z","updated_at":"2016-08-05T21:09:04Z","closed_at":null,"merged_at":null,"merge_commit_sha":"3d89ec5e516095add165fb8800644568166ee73a","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/flutter/flutter/pulls/5260/commits","review_comments_url":"https://api.github.com/repos/flutter/flutter/pulls/5260/comments","review_comment_url":"https://api.github.com/repos/flutter/flutter/pulls/comments{/number}","comments_url":"https://api.github.com/repos/flutter/flutter/issues/5260/comments","statuses_url":"https://api.github.com/repos/flutter/flutter/statuses/f4c2689fb58c307219e7bec4110d589721f853a6","head":{"label":"dragostis:animated-size","ref":"animated-size","sha":"f4c2689fb58c307219e7bec4110d589721f853a6","user":{"login":"dragostis","id":4136413,"avatar_url":"https://avatars.githubusercontent.com/u/4136413?v=3","gravatar_id":"","url":"https://api.github.com/users/dragostis","html_url":"https://github.com/dragostis","followers_url":"https://api.github.com/users/dragostis/followers","following_url":"https://api.github.com/users/dragostis/following{/other_user}","gists_url":"https://api.github.com/users/dragostis/gists{/gist_id}","starred_url":"https://api.github.com/users/dragostis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dragostis/subscriptions","organizations_url":"https://api.github.com/users/dragostis/orgs","repos_url":"https://api.github.com/users/dragostis/repos","events_url":"https://api.github.com/users/dragostis/events{/privacy}","received_events_url":"https://api.github.com/users/dragostis/received_events","type":"User","site_admin":false},"repo":{"id":64961784,"name":"flutter","full_name":"dragostis/flutter","owner":{"login":"dragostis","id":4136413,"avatar_url":"https://avatars.githubusercontent.com/u/4136413?v=3","gravatar_id":"","url":"https://api.github.com/users/dragostis","html_url":"https://github.com/dragostis","followers_url":"https://api.github.com/users/dragostis/followers","following_url":"https://api.github.com/users/dragostis/following{/other_user}","gists_url":"https://api.github.com/users/dragostis/gists{/gist_id}","starred_url":"https://api.github.com/users/dragostis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dragostis/subscriptions","organizations_url":"https://api.github.com/users/dragostis/orgs","repos_url":"https://api.github.com/users/dragostis/repos","events_url":"https://api.github.com/users/dragostis/events{/privacy}","received_events_url":"https://api.github.com/users/dragostis/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/dragostis/flutter","description":"Framework for building high-performance, high-fidelity iOS and Android apps.","fork":true,"url":"https://api.github.com/repos/dragostis/flutter","forks_url":"https://api.github.com/repos/dragostis/flutter/forks","keys_url":"https://api.github.com/repos/dragostis/flutter/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dragostis/flutter/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dragostis/flutter/teams","hooks_url":"https://api.github.com/repos/dragostis/flutter/hooks","issue_events_url":"https://api.github.com/repos/dragostis/flutter/issues/events{/number}","events_url":"https://api.github.com/repos/dragostis/flutter/events","assignees_url":"https://api.github.com/repos/dragostis/flutter/assignees{/user}","branches_url":"https://api.github.com/repos/dragostis/flutter/branches{/branch}","tags_url":"https://api.github.com/repos/dragostis/flutter/tags","blobs_url":"https://api.github.com/repos/dragostis/flutter/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dragostis/flutter/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dragostis/flutter/git/refs{/sha}","trees_url":"https://api.github.com/repos/dragostis/flutter/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dragostis/flutter/statuses/{sha}","languages_url":"https://api.github.com/repos/dragostis/flutter/languages","stargazers_url":"https://api.github.com/repos/dragostis/flutter/stargazers","contributors_url":"https://api.github.com/repos/dragostis/flutter/contributors","subscribers_url":"https://api.github.com/repos/dragostis/flutter/subscribers","subscription_url":"https://api.github.com/repos/dragostis/flutter/subscription","commits_url":"https://api.github.com/repos/dragostis/flutter/commits{/sha}","git_commits_url":"https://api.github.com/repos/dragostis/flutter/git/commits{/sha}","comments_url":"https://api.github.com/repos/dragostis/flutter/comments{/number}","issue_comment_url":"https://api.github.com/repos/dragostis/flutter/issues/comments{/number}","contents_url":"https://api.github.com/repos/dragostis/flutter/contents/{+path}","compare_url":"https://api.github.com/repos/dragostis/flutter/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dragostis/flutter/merges","archive_url":"https://api.github.com/repos/dragostis/flutter/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dragostis/flutter/downloads","issues_url":"https://api.github.com/repos/dragostis/flutter/issues{/number}","pulls_url":"https://api.github.com/repos/dragostis/flutter/pulls{/number}","milestones_url":"https://api.github.com/repos/dragostis/flutter/milestones{/number}","notifications_url":"https://api.github.com/repos/dragostis/flutter/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dragostis/flutter/labels{/name}","releases_url":"https://api.github.com/repos/dragostis/flutter/releases{/id}","deployments_url":"https://api.github.com/repos/dragostis/flutter/deployments","created_at":"2016-08-04T19:32:39Z","updated_at":"2016-08-04T19:32:41Z","pushed_at":"2016-08-05T20:23:13Z","git_url":"git://github.com/dragostis/flutter.git","ssh_url":"git@github.com:dragostis/flutter.git","clone_url":"https://github.com/dragostis/flutter.git","svn_url":"https://github.com/dragostis/flutter","homepage":"https://flutter.io","size":20419,"stargazers_count":0,"watchers_count":0,"language":"Dart","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"flutter:master","ref":"master","sha":"435ad476d8ea624da3c9d9fafad85b3e1b687310","user":{"login":"flutter","id":14101776,"avatar_url":"https://avatars.githubusercontent.com/u/14101776?v=3","gravatar_id":"","url":"https://api.github.com/users/flutter","html_url":"https://github.com/flutter","followers_url":"https://api.github.com/users/flutter/followers","following_url":"https://api.github.com/users/flutter/following{/other_user}","gists_url":"https://api.github.com/users/flutter/gists{/gist_id}","starred_url":"https://api.github.com/users/flutter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/flutter/subscriptions","organizations_url":"https://api.github.com/users/flutter/orgs","repos_url":"https://api.github.com/users/flutter/repos","events_url":"https://api.github.com/users/flutter/events{/privacy}","received_events_url":"https://api.github.com/users/flutter/received_events","type":"Organization","site_admin":false},"repo":{"id":31792824,"name":"flutter","full_name":"flutter/flutter","owner":{"login":"flutter","id":14101776,"avatar_url":"https://avatars.githubusercontent.com/u/14101776?v=3","gravatar_id":"","url":"https://api.github.com/users/flutter","html_url":"https://github.com/flutter","followers_url":"https://api.github.com/users/flutter/followers","following_url":"https://api.github.com/users/flutter/following{/other_user}","gists_url":"https://api.github.com/users/flutter/gists{/gist_id}","starred_url":"https://api.github.com/users/flutter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/flutter/subscriptions","organizations_url":"https://api.github.com/users/flutter/orgs","repos_url":"https://api.github.com/users/flutter/repos","events_url":"https://api.github.com/users/flutter/events{/privacy}","received_events_url":"https://api.github.com/users/flutter/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/flutter/flutter","description":"Framework for building high-performance, high-fidelity iOS and Android apps.","fork":false,"url":"https://api.github.com/repos/flutter/flutter","forks_url":"https://api.github.com/repos/flutter/flutter/forks","keys_url":"https://api.github.com/repos/flutter/flutter/keys{/key_id}","collaborators_url":"https://api.github.com/repos/flutter/flutter/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/flutter/flutter/teams","hooks_url":"https://api.github.com/repos/flutter/flutter/hooks","issue_events_url":"https://api.github.com/repos/flutter/flutter/issues/events{/number}","events_url":"https://api.github.com/repos/flutter/flutter/events","assignees_url":"https://api.github.com/repos/flutter/flutter/assignees{/user}","branches_url":"https://api.github.com/repos/flutter/flutter/branches{/branch}","tags_url":"https://api.github.com/repos/flutter/flutter/tags","blobs_url":"https://api.github.com/repos/flutter/flutter/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/flutter/flutter/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/flutter/flutter/git/refs{/sha}","trees_url":"https://api.github.com/repos/flutter/flutter/git/trees{/sha}","statuses_url":"https://api.github.com/repos/flutter/flutter/statuses/{sha}","languages_url":"https://api.github.com/repos/flutter/flutter/languages","stargazers_url":"https://api.github.com/repos/flutter/flutter/stargazers","contributors_url":"https://api.github.com/repos/flutter/flutter/contributors","subscribers_url":"https://api.github.com/repos/flutter/flutter/subscribers","subscription_url":"https://api.github.com/repos/flutter/flutter/subscription","commits_url":"https://api.github.com/repos/flutter/flutter/commits{/sha}","git_commits_url":"https://api.github.com/repos/flutter/flutter/git/commits{/sha}","comments_url":"https://api.github.com/repos/flutter/flutter/comments{/number}","issue_comment_url":"https://api.github.com/repos/flutter/flutter/issues/comments{/number}","contents_url":"https://api.github.com/repos/flutter/flutter/contents/{+path}","compare_url":"https://api.github.com/repos/flutter/flutter/compare/{base}...{head}","merges_url":"https://api.github.com/repos/flutter/flutter/merges","archive_url":"https://api.github.com/repos/flutter/flutter/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/flutter/flutter/downloads","issues_url":"https://api.github.com/repos/flutter/flutter/issues{/number}","pulls_url":"https://api.github.com/repos/flutter/flutter/pulls{/number}","milestones_url":"https://api.github.com/repos/flutter/flutter/milestones{/number}","notifications_url":"https://api.github.com/repos/flutter/flutter/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/flutter/flutter/labels{/name}","releases_url":"https://api.github.com/repos/flutter/flutter/releases{/id}","deployments_url":"https://api.github.com/repos/flutter/flutter/deployments","created_at":"2015-03-06T22:54:58Z","updated_at":"2016-08-05T20:46:53Z","pushed_at":"2016-08-05T20:42:56Z","git_url":"git://github.com/flutter/flutter.git","ssh_url":"git@github.com:flutter/flutter.git","clone_url":"https://github.com/flutter/flutter.git","svn_url":"https://github.com/flutter/flutter","homepage":"https://flutter.io","size":114895,"stargazers_count":2978,"watchers_count":2978,"language":"Dart","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":313,"mirror_url":null,"open_issues_count":1220,"forks":313,"open_issues":1220,"watchers":2978,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/flutter/flutter/pulls/5260"},"html":{"href":"https://github.com/flutter/flutter/pull/5260"},"issue":{"href":"https://api.github.com/repos/flutter/flutter/issues/5260"},"comments":{"href":"https://api.github.com/repos/flutter/flutter/issues/5260/comments"},"review_comments":{"href":"https://api.github.com/repos/flutter/flutter/pulls/5260/comments"},"review_comment":{"href":"https://api.github.com/repos/flutter/flutter/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/flutter/flutter/pulls/5260/commits"},"statuses":{"href":"https://api.github.com/repos/flutter/flutter/statuses/f4c2689fb58c307219e7bec4110d589721f853a6"}}}}
{"actor":{"display_login":"abarth"}}