{"action":"created","comment":{"url":"https://api.github.com/repos/flutter/flutter/pulls/comments/187206201","pull_request_review_id":118939798,"id":187206201,"diff_hunk":"@@ -103,6 +103,39 @@ class TextTheme extends Diagnosticable {\n   /// Consider using [Typography.black] or [Typography.white], which implement\n   /// the typography styles in the material design specification, as a starting\n   /// point.\n+  ///\n+  /// ## Sample code\n+  ///\n+  /// ```dart\n+  /// /// A Widget that sets the ambient theme's title text color for its\n+  /// /// descendants, while leaving other ambient theme attributes alone.\n+  /// class TitleColorThemeCopy extends StatelessWidget {\n+  ///   TitleColorThemeCopy({Key key, this.child, this.titleColor}) : super(key: key);\n+  /// \n+  ///   final Color titleColor;\n+  ///   final Widget child;\n+  /// \n+  ///   @override\n+  ///   Widget build(BuildContext context) {\n+  ///     ThemeData theme = Theme.of(context);\n+  ///     theme = theme.copyWith(\n+  ///       textTheme: theme.textTheme.copyWith(\n+  ///         title: theme.textTheme.title.copyWith(\n+  ///           color: titleColor,\n+  ///         ),\n+  ///       ),\n+  ///     );\n+  ///     return new Theme(data: theme, child: child);\n+  ///   }\n+  /// }\n+  /// ```\n+  ///\n+  /// Using [merge] instead can make more sense in some situations.","path":"packages/flutter/lib/src/material/typography.dart","position":31,"original_position":31,"commit_id":"51c644f72fdf4fd90b8e32d5723e74d87ddfa43c","original_commit_id":"51c644f72fdf4fd90b8e32d5723e74d87ddfa43c","user":{"login":"HansMuller","id":1377460,"avatar_url":"https://avatars2.githubusercontent.com/u/1377460?v=4","gravatar_id":"","url":"https://api.github.com/users/HansMuller","html_url":"https://github.com/HansMuller","followers_url":"https://api.github.com/users/HansMuller/followers","following_url":"https://api.github.com/users/HansMuller/following{/other_user}","gists_url":"https://api.github.com/users/HansMuller/gists{/gist_id}","starred_url":"https://api.github.com/users/HansMuller/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/HansMuller/subscriptions","organizations_url":"https://api.github.com/users/HansMuller/orgs","repos_url":"https://api.github.com/users/HansMuller/repos","events_url":"https://api.github.com/users/HansMuller/events{/privacy}","received_events_url":"https://api.github.com/users/HansMuller/received_events","type":"User","site_admin":false},"body":"This statement isn't as helpful as it should be.  Since we have both copyWith and merge, we should provide some rule of thumb here.  The see also comment appears to be headed in the right direction...","created_at":"2018-05-09T23:42:26Z","updated_at":"2018-05-09T23:45:11Z","html_url":"https://github.com/flutter/flutter/pull/17311#discussion_r187206201","pull_request_url":"https://api.github.com/repos/flutter/flutter/pulls/17311","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/flutter/flutter/pulls/comments/187206201"},"html":{"href":"https://github.com/flutter/flutter/pull/17311#discussion_r187206201"},"pull_request":{"href":"https://api.github.com/repos/flutter/flutter/pulls/17311"}}},"pull_request":{"url":"https://api.github.com/repos/flutter/flutter/pulls/17311","id":186108933,"html_url":"https://github.com/flutter/flutter/pull/17311","diff_url":"https://github.com/flutter/flutter/pull/17311.diff","patch_url":"https://github.com/flutter/flutter/pull/17311.patch","issue_url":"https://api.github.com/repos/flutter/flutter/issues/17311","number":17311,"state":"open","locked":false,"title":"Fix handling of null body2 text style for chip and slider","user":{"login":"gspencergoog","id":8867023,"avatar_url":"https://avatars2.githubusercontent.com/u/8867023?v=4","gravatar_id":"","url":"https://api.github.com/users/gspencergoog","html_url":"https://github.com/gspencergoog","followers_url":"https://api.github.com/users/gspencergoog/followers","following_url":"https://api.github.com/users/gspencergoog/following{/other_user}","gists_url":"https://api.github.com/users/gspencergoog/gists{/gist_id}","starred_url":"https://api.github.com/users/gspencergoog/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gspencergoog/subscriptions","organizations_url":"https://api.github.com/users/gspencergoog/orgs","repos_url":"https://api.github.com/users/gspencergoog/repos","events_url":"https://api.github.com/users/gspencergoog/events{/privacy}","received_events_url":"https://api.github.com/users/gspencergoog/received_events","type":"User","site_admin":false},"body":"Before this change, if you specified a non-null `textTheme`, but the theme you specified doesn't have a `body2` defined, then creating a `ChipTheme` will assert (which means creating a `ThemeData` will fail).\r\n\r\nThis adds handling for this corner case to default to reasonable values in that case. The slider had the same problem, but for `accentTextTheme`, so I fixed that too.\r\n\r\nWhile I had the patient open, Hans and I noticed that TextTheme.merge wasn't doing the right thing in the case where some members were null either, so I fixed that, and added some examples, since merge/copyWith are common operations that are not always well understood.\r\n\r\nFixes https://github.com/flutter/flutter/issues/17251","created_at":"2018-05-04T21:31:40Z","updated_at":"2018-05-09T23:45:11Z","closed_at":null,"merged_at":null,"merge_commit_sha":"64b2b292e1ecdafe2cfa378fc3e3bdaa2444283f","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[{"id":487496476,"url":"https://api.github.com/repos/flutter/flutter/labels/cla:%20yes","name":"cla: yes","color":"ffffff","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/flutter/flutter/pulls/17311/commits","review_comments_url":"https://api.github.com/repos/flutter/flutter/pulls/17311/comments","review_comment_url":"https://api.github.com/repos/flutter/flutter/pulls/comments{/number}","comments_url":"https://api.github.com/repos/flutter/flutter/issues/17311/comments","statuses_url":"https://api.github.com/repos/flutter/flutter/statuses/51c644f72fdf4fd90b8e32d5723e74d87ddfa43c","head":{"label":"gspencergoog:chip_body2","ref":"chip_body2","sha":"51c644f72fdf4fd90b8e32d5723e74d87ddfa43c","user":{"login":"gspencergoog","id":8867023,"avatar_url":"https://avatars2.githubusercontent.com/u/8867023?v=4","gravatar_id":"","url":"https://api.github.com/users/gspencergoog","html_url":"https://github.com/gspencergoog","followers_url":"https://api.github.com/users/gspencergoog/followers","following_url":"https://api.github.com/users/gspencergoog/following{/other_user}","gists_url":"https://api.github.com/users/gspencergoog/gists{/gist_id}","starred_url":"https://api.github.com/users/gspencergoog/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gspencergoog/subscriptions","organizations_url":"https://api.github.com/users/gspencergoog/orgs","repos_url":"https://api.github.com/users/gspencergoog/repos","events_url":"https://api.github.com/users/gspencergoog/events{/privacy}","received_events_url":"https://api.github.com/users/gspencergoog/received_events","type":"User","site_admin":false},"repo":{"id":92983227,"name":"flutter","full_name":"gspencergoog/flutter","owner":{"login":"gspencergoog","id":8867023,"avatar_url":"https://avatars2.githubusercontent.com/u/8867023?v=4","gravatar_id":"","url":"https://api.github.com/users/gspencergoog","html_url":"https://github.com/gspencergoog","followers_url":"https://api.github.com/users/gspencergoog/followers","following_url":"https://api.github.com/users/gspencergoog/following{/other_user}","gists_url":"https://api.github.com/users/gspencergoog/gists{/gist_id}","starred_url":"https://api.github.com/users/gspencergoog/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gspencergoog/subscriptions","organizations_url":"https://api.github.com/users/gspencergoog/orgs","repos_url":"https://api.github.com/users/gspencergoog/repos","events_url":"https://api.github.com/users/gspencergoog/events{/privacy}","received_events_url":"https://api.github.com/users/gspencergoog/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/gspencergoog/flutter","description":"Flutter makes it easy and fast to build beautiful mobile apps.","fork":true,"url":"https://api.github.com/repos/gspencergoog/flutter","forks_url":"https://api.github.com/repos/gspencergoog/flutter/forks","keys_url":"https://api.github.com/repos/gspencergoog/flutter/keys{/key_id}","collaborators_url":"https://api.github.com/repos/gspencergoog/flutter/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/gspencergoog/flutter/teams","hooks_url":"https://api.github.com/repos/gspencergoog/flutter/hooks","issue_events_url":"https://api.github.com/repos/gspencergoog/flutter/issues/events{/number}","events_url":"https://api.github.com/repos/gspencergoog/flutter/events","assignees_url":"https://api.github.com/repos/gspencergoog/flutter/assignees{/user}","branches_url":"https://api.github.com/repos/gspencergoog/flutter/branches{/branch}","tags_url":"https://api.github.com/repos/gspencergoog/flutter/tags","blobs_url":"https://api.github.com/repos/gspencergoog/flutter/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/gspencergoog/flutter/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/gspencergoog/flutter/git/refs{/sha}","trees_url":"https://api.github.com/repos/gspencergoog/flutter/git/trees{/sha}","statuses_url":"https://api.github.com/repos/gspencergoog/flutter/statuses/{sha}","languages_url":"https://api.github.com/repos/gspencergoog/flutter/languages","stargazers_url":"https://api.github.com/repos/gspencergoog/flutter/stargazers","contributors_url":"https://api.github.com/repos/gspencergoog/flutter/contributors","subscribers_url":"https://api.github.com/repos/gspencergoog/flutter/subscribers","subscription_url":"https://api.github.com/repos/gspencergoog/flutter/subscription","commits_url":"https://api.github.com/repos/gspencergoog/flutter/commits{/sha}","git_commits_url":"https://api.github.com/repos/gspencergoog/flutter/git/commits{/sha}","comments_url":"https://api.github.com/repos/gspencergoog/flutter/comments{/number}","issue_comment_url":"https://api.github.com/repos/gspencergoog/flutter/issues/comments{/number}","contents_url":"https://api.github.com/repos/gspencergoog/flutter/contents/{+path}","compare_url":"https://api.github.com/repos/gspencergoog/flutter/compare/{base}...{head}","merges_url":"https://api.github.com/repos/gspencergoog/flutter/merges","archive_url":"https://api.github.com/repos/gspencergoog/flutter/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/gspencergoog/flutter/downloads","issues_url":"https://api.github.com/repos/gspencergoog/flutter/issues{/number}","pulls_url":"https://api.github.com/repos/gspencergoog/flutter/pulls{/number}","milestones_url":"https://api.github.com/repos/gspencergoog/flutter/milestones{/number}","notifications_url":"https://api.github.com/repos/gspencergoog/flutter/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/gspencergoog/flutter/labels{/name}","releases_url":"https://api.github.com/repos/gspencergoog/flutter/releases{/id}","deployments_url":"https://api.github.com/repos/gspencergoog/flutter/deployments","created_at":"2017-05-31T19:52:38Z","updated_at":"2018-05-09T17:40:36Z","pushed_at":"2018-05-09T17:40:33Z","git_url":"git://github.com/gspencergoog/flutter.git","ssh_url":"git@github.com:gspencergoog/flutter.git","clone_url":"https://github.com/gspencergoog/flutter.git","svn_url":"https://github.com/gspencergoog/flutter","homepage":"https://flutter.io","size":38528,"stargazers_count":0,"watchers_count":0,"language":"Dart","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"other","name":"Other","spdx_id":null,"url":null},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"flutter:master","ref":"master","sha":"c8da37656a8d058087535aae368a453767197c6c","user":{"login":"flutter","id":14101776,"avatar_url":"https://avatars3.githubusercontent.com/u/14101776?v=4","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://avatars3.githubusercontent.com/u/14101776?v=4","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":"Flutter makes it easy and fast to build beautiful mobile 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":"2018-05-09T23:05:57Z","pushed_at":"2018-05-09T23:20:42Z","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":38481,"stargazers_count":23250,"watchers_count":23250,"language":"Dart","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2039,"mirror_url":null,"archived":false,"open_issues_count":3183,"license":{"key":"other","name":"Other","spdx_id":null,"url":null},"forks":2039,"open_issues":3183,"watchers":23250,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/flutter/flutter/pulls/17311"},"html":{"href":"https://github.com/flutter/flutter/pull/17311"},"issue":{"href":"https://api.github.com/repos/flutter/flutter/issues/17311"},"comments":{"href":"https://api.github.com/repos/flutter/flutter/issues/17311/comments"},"review_comments":{"href":"https://api.github.com/repos/flutter/flutter/pulls/17311/comments"},"review_comment":{"href":"https://api.github.com/repos/flutter/flutter/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/flutter/flutter/pulls/17311/commits"},"statuses":{"href":"https://api.github.com/repos/flutter/flutter/statuses/51c644f72fdf4fd90b8e32d5723e74d87ddfa43c"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"HansMuller"}}