{"action":"created","comment":{"url":"https://api.github.com/repos/flutter/flutter/pulls/comments/77924284","id":77924284,"diff_hunk":"@@ -0,0 +1,577 @@\n+// Copyright 2016 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/widgets.dart';\n+import 'package:meta/meta.dart';\n+\n+import 'button.dart';\n+import 'colors.dart';\n+import 'debug.dart';\n+import 'flat_button.dart';\n+import 'ink_well.dart';\n+import 'material.dart';\n+import 'theme.dart';\n+\n+/// The state of a step which is used to control the style of the circle and\n+/// text.\n+///\n+/// /// See also:\n+///\n+///  * [Step]\n+enum StepState {\n+  /// A step that is disabled and does to react to taps.\n+  disabled,\n+  /// A step that is currently inactive, e.g. one that the user did not yet see.\n+  inactive,\n+  /// A step that is currently active, e.g. one that the user has seen and\n+  /// edited.\n+  active,\n+  /// A step that is currently having an error. e.g. the use has submitted wrong\n+  /// input.\n+  error\n+}\n+\n+const TextStyle _kStepStyle = const TextStyle(\n+  fontSize: 12.0,\n+  color: Colors.white\n+);\n+const TextStyle _kActiveTitleStyle = const TextStyle(\n+  fontSize: 14.0,\n+  fontWeight: FontWeight.w500,\n+  color: Colors.black87\n+);\n+const TextStyle _kActiveSubtitleStyle = const TextStyle(\n+  fontSize: 12.0,\n+  color: Colors.black54\n+);\n+const TextStyle _kDisabledTitleStyle = const TextStyle(\n+  fontSize: 14.0,\n+  fontWeight: FontWeight.w500,\n+  color: Colors.black38\n+);\n+const TextStyle _kDisabledSubtitleStyle = const TextStyle(\n+  fontSize: 12.0,\n+  color: Colors.black38\n+);\n+final TextStyle _kErrorTitleStyle = new TextStyle(\n+  fontSize: 14.0,\n+  fontWeight: FontWeight.w500,\n+  color: Colors.red[500]\n+);\n+final TextStyle _kErrorSubtitleStyle = new TextStyle(\n+  fontSize: 12.0,\n+  color: Colors.red[500]\n+);\n+\n+/// A Material step used in [Stepper]. The step can have a title and subtitle,\n+/// an icon within its circle, some content and a state that governs its stying.\n+///\n+/// See also:\n+///\n+///  * [Stepper]\n+///  * <https://material.google.com/components/steppers.html>\n+class Step {\n+  /// Creates a step.\n+  ///\n+  /// Arguments [title], [content], and [state] cannot be null.\n+  Step({\n+    @required this.title,\n+    this.subtitle,\n+    @required this.content,\n+    this.circleChild,\n+    this.state: StepState.inactive\n+  }) {\n+    assert(this.title != null);\n+    assert(this.content != null);\n+    assert(this.state != null);\n+  }\n+\n+  /// The title of the step. It changes color based on the state.\n+  final String title;\n+\n+  /// The subtitle of the step. It changes color based on the state.\n+  ///\n+  /// If null, the subtitle is not shown.\n+  final String subtitle;\n+\n+  /// The content of the step that appears below the title and subtitle.\n+  ///\n+  /// Underneath the content, every step as a 'continue' and 'cancel' button.\n+  final Widget content;\n+\n+  /// The centered child of the step's colored circle.\n+  ///\n+  /// If null, the circle will be populated with the step's index within the\n+  /// stepper.\n+  final Widget circleChild;\n+\n+  /// The state of the step which determines the styling of its componenents\n+  /// and whether steps are interactive.\n+  final StepState state;\n+}\n+\n+/// A Material stepper widget that keeps track of its current step and offers\n+/// customizability and interactivity.\n+///\n+/// See also:\n+///\n+///  * [Step]\n+///  * <https://material.google.com/components/steppers.html>\n+class Stepper extends StatefulWidget {\n+  /// Creates a stepper.\n+  ///\n+  /// Arguments [steps], [axis], and [currentStep] cannot be null.\n+  Stepper({\n+    Key key,\n+    this.steps,\n+    this.axis: Axis.vertical,\n+    this.currentStep: 0,\n+    this.onStepTapped,\n+    this.onStepContinue,\n+    this.onStepCancel\n+  }) : super(key: key) {\n+    assert(this.steps != null);\n+    assert(this.axis != null);\n+    assert(this.currentStep != null);\n+  }\n+\n+  /// The steps of the stepper whose titles, subtitles, icons always get shown.\n+  final List<Step> steps;\n+\n+  /// The axis on which the steps are layed out. In the case of\n+  /// [Axis.horizontal], the content of the current step is displayed\n+  /// underneath as opposed to the [Axis.vertical] case where it is displayed\n+  /// in-between the steps.\n+  final Axis axis;\n+\n+  /// The current step whose content is displayed.\n+  final int currentStep;\n+\n+  /// The callback triggered when a step is tapped, with its index passed as\n+  /// an argument.\n+  final ValueChanged<int> onStepTapped;\n+\n+  /// The callback triggered when the 'continue' button is tapped.\n+  ///\n+  /// The index of the current step is not passed since the user is expected to\n+  /// keep track of it in a parent state.\n+  ///\n+  /// If null, the buton will be disabled.\n+  final VoidCallback onStepContinue;\n+\n+  /// The callback triggered when the 'cancel' button is tapped.\n+  ///\n+  /// The index of the current step is not passed since the user is expected to\n+  /// keep track of it in a parent state.\n+  ///\n+  /// If null, the buton will be disabled.\n+  final VoidCallback onStepCancel;\n+\n+  @override\n+  _StepperState createState() => new _StepperState();\n+}\n+\n+class _StepperState extends State<Stepper> {\n+  List<GlobalKey> _keys;\n+\n+  @override\n+  void initState() {\n+    super.initState();\n+    _keys = new List<GlobalKey>.generate(\n+      config.steps.length,\n+      (int i) => new GlobalKey()\n+    );\n+  }\n+\n+  @override\n+  void didUpdateConfig(Stepper oldConfig) {\n+    super.didUpdateConfig(oldConfig);\n+    if (config.steps.length != oldConfig.steps.length)\n+      _keys = new List<GlobalKey>.generate(","path":"packages/flutter/lib/src/material/stepper.dart","position":191,"original_position":191,"commit_id":"2a0360ec8a3013a841a77209ee72abe6b5276c64","original_commit_id":"2a0360ec8a3013a841a77209ee72abe6b5276c64","user":{"login":"Hixie","id":551196,"avatar_url":"https://avatars.githubusercontent.com/u/551196?v=3","gravatar_id":"","url":"https://api.github.com/users/Hixie","html_url":"https://github.com/Hixie","followers_url":"https://api.github.com/users/Hixie/followers","following_url":"https://api.github.com/users/Hixie/following{/other_user}","gists_url":"https://api.github.com/users/Hixie/gists{/gist_id}","starred_url":"https://api.github.com/users/Hixie/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Hixie/subscriptions","organizations_url":"https://api.github.com/users/Hixie/orgs","repos_url":"https://api.github.com/users/Hixie/repos","events_url":"https://api.github.com/users/Hixie/events{/privacy}","received_events_url":"https://api.github.com/users/Hixie/received_events","type":"User","site_admin":false},"body":"this means that if you add a step, the old states of every step (including the current one) will be blown away.","created_at":"2016-09-07T23:37:45Z","updated_at":"2016-09-07T23:37:45Z","html_url":"https://github.com/flutter/flutter/pull/5765#discussion_r77924284","pull_request_url":"https://api.github.com/repos/flutter/flutter/pulls/5765","_links":{"self":{"href":"https://api.github.com/repos/flutter/flutter/pulls/comments/77924284"},"html":{"href":"https://github.com/flutter/flutter/pull/5765#discussion_r77924284"},"pull_request":{"href":"https://api.github.com/repos/flutter/flutter/pulls/5765"}}},"pull_request":{"url":"https://api.github.com/repos/flutter/flutter/pulls/5765","id":84388501,"html_url":"https://github.com/flutter/flutter/pull/5765","diff_url":"https://github.com/flutter/flutter/pull/5765.diff","patch_url":"https://github.com/flutter/flutter/pull/5765.patch","issue_url":"https://api.github.com/repos/flutter/flutter/issues/5765","number":5765,"state":"open","locked":false,"title":"Added Material steppers.","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 gives fine control over the use of steppers.\r\nAt any single moment, one step is shown with it own controls and\r\ncontent.","created_at":"2016-09-07T22:59:51Z","updated_at":"2016-09-07T23:37:45Z","closed_at":null,"merged_at":null,"merge_commit_sha":"274a04525602a176d8715f02a43d0efb14b66b24","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/flutter/flutter/pulls/5765/commits","review_comments_url":"https://api.github.com/repos/flutter/flutter/pulls/5765/comments","review_comment_url":"https://api.github.com/repos/flutter/flutter/pulls/comments{/number}","comments_url":"https://api.github.com/repos/flutter/flutter/issues/5765/comments","statuses_url":"https://api.github.com/repos/flutter/flutter/statuses/2a0360ec8a3013a841a77209ee72abe6b5276c64","head":{"label":"dragostis:stepper","ref":"stepper","sha":"2a0360ec8a3013a841a77209ee72abe6b5276c64","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-09-07T22:59:36Z","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":21310,"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":"1f15e06e45e820a5bc36cff1870e70e542f06f2c","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-09-07T19:37:34Z","pushed_at":"2016-09-07T23:24:13Z","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":115897,"stargazers_count":3232,"watchers_count":3232,"language":"Dart","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":353,"mirror_url":null,"open_issues_count":1360,"forks":353,"open_issues":1360,"watchers":3232,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/flutter/flutter/pulls/5765"},"html":{"href":"https://github.com/flutter/flutter/pull/5765"},"issue":{"href":"https://api.github.com/repos/flutter/flutter/issues/5765"},"comments":{"href":"https://api.github.com/repos/flutter/flutter/issues/5765/comments"},"review_comments":{"href":"https://api.github.com/repos/flutter/flutter/pulls/5765/comments"},"review_comment":{"href":"https://api.github.com/repos/flutter/flutter/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/flutter/flutter/pulls/5765/commits"},"statuses":{"href":"https://api.github.com/repos/flutter/flutter/statuses/2a0360ec8a3013a841a77209ee72abe6b5276c64"}}}}
{"actor":{"display_login":"Hixie"}}