{"action":"created","comment":{"url":"https://api.github.com/repos/Workiva/w_module/pulls/comments/94041079","pull_request_review_id":14571388,"id":94041079,"diff_hunk":"@@ -130,12 +156,28 @@ abstract class LifecycleModule extends Object with Disposable {\n       _didUnloadChildModuleSubscriptions = {};\n \n   /// Whether the module is currently loaded.\n-  bool get isLoaded => _isLoaded;\n+  bool get isLoaded => _state == LifecycleState.loaded;\n+\n+  /// Whether the module is currently loading.\n+  bool get isLoading => _state == LifecycleState.loading;\n+\n+  /// Whether the module is currently resuming.\n+  bool get isResuming => _state == LifecycleState.resuming;\n \n   /// Whether the module is currently suspended.\n-  ///\n-  /// This will always be false when the module is not loaded.\n-  bool get isSuspended => _isSuspended;\n+  bool get isSuspended => _state == LifecycleState.suspended;\n+\n+  /// Whether the module is currently suspending.\n+  bool get isSuspending => _state == LifecycleState.suspending;\n+\n+  /// Whether the module is currently unloaded.\n+  bool get isUnloaded => _state == LifecycleState.unloaded;\n+\n+  /// Whether the module is currently unloading.\n+  bool get isUnloading => _state == LifecycleState.unloading;\n+\n+  /// The current lifecycle state of the module.\n+  LifecycleState get state => _state;","path":"lib/src/lifecycle_module.dart","position":94,"original_position":73,"commit_id":"405d25c3d94ed1ca6b4d08eb0f91641eca525023","original_commit_id":"8dbb312541326635ee1ed7aeafbce176dadd4d7a","user":{"login":"evanweible-wf","id":1738457,"avatar_url":"https://avatars.githubusercontent.com/u/1738457?v=3","gravatar_id":"","url":"https://api.github.com/users/evanweible-wf","html_url":"https://github.com/evanweible-wf","followers_url":"https://api.github.com/users/evanweible-wf/followers","following_url":"https://api.github.com/users/evanweible-wf/following{/other_user}","gists_url":"https://api.github.com/users/evanweible-wf/gists{/gist_id}","starred_url":"https://api.github.com/users/evanweible-wf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/evanweible-wf/subscriptions","organizations_url":"https://api.github.com/users/evanweible-wf/orgs","repos_url":"https://api.github.com/users/evanweible-wf/repos","events_url":"https://api.github.com/users/evanweible-wf/events{/privacy}","received_events_url":"https://api.github.com/users/evanweible-wf/received_events","type":"User","site_admin":false},"body":"Personally I lean towards not including this `state` property because we don't have a use case for it (outside of tests) yet and it forces us to commit to `LifecycleState` as a part of the public API. If we don't do that, then we're only committing to the `bool is[State]` getters.\r\n\r\nIt's just a lean, though. If others think this adds enough value, I'm cool with it.","created_at":"2016-12-28T14:58:02Z","updated_at":"2016-12-28T14:58:02Z","html_url":"https://github.com/Workiva/w_module/pull/64#discussion_r94041079","pull_request_url":"https://api.github.com/repos/Workiva/w_module/pulls/64","_links":{"self":{"href":"https://api.github.com/repos/Workiva/w_module/pulls/comments/94041079"},"html":{"href":"https://github.com/Workiva/w_module/pull/64#discussion_r94041079"},"pull_request":{"href":"https://api.github.com/repos/Workiva/w_module/pulls/64"}}},"pull_request":{"url":"https://api.github.com/repos/Workiva/w_module/pulls/64","id":99271597,"html_url":"https://github.com/Workiva/w_module/pull/64","diff_url":"https://github.com/Workiva/w_module/pull/64.diff","patch_url":"https://github.com/Workiva/w_module/pull/64.patch","issue_url":"https://api.github.com/repos/Workiva/w_module/issues/64","number":64,"state":"open","locked":false,"title":"RAP-1484 Enforce LifecycleModule State Transitions","user":{"login":"todbachman-wf","id":8091340,"avatar_url":"https://avatars.githubusercontent.com/u/8091340?v=3","gravatar_id":"","url":"https://api.github.com/users/todbachman-wf","html_url":"https://github.com/todbachman-wf","followers_url":"https://api.github.com/users/todbachman-wf/followers","following_url":"https://api.github.com/users/todbachman-wf/following{/other_user}","gists_url":"https://api.github.com/users/todbachman-wf/gists{/gist_id}","starred_url":"https://api.github.com/users/todbachman-wf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/todbachman-wf/subscriptions","organizations_url":"https://api.github.com/users/todbachman-wf/orgs","repos_url":"https://api.github.com/users/todbachman-wf/repos","events_url":"https://api.github.com/users/todbachman-wf/events{/privacy}","received_events_url":"https://api.github.com/users/todbachman-wf/received_events","type":"User","site_admin":false},"body":"**Jira Ticket:** [RAP-1484](https://jira.atl.workiva.net/browse/RAP-1484)\r\n\r\n## Problem:\r\nWe should enforce proper transitions between `LifecycleModule` states. The arrows in the following diagram identify valid state transitions. Green arrows represent transitions that will proceed as requested. Blue arrows represent noops.\r\n\r\n![valid lifecyclemodule state transitions](https://cloud.githubusercontent.com/assets/8091340/21460370/83c85738-c904-11e6-999b-45f432816acc.png)\r\n\r\n## Solution:\r\nUpdated `LifecycleModule` to enforce the valid transitions. If a transition will be a noop, log a warning. If an invalid transition is requested a `StateError` is thrown.\r\n\r\n## +10/QA:\r\n- [ ] CI build passes","created_at":"2016-12-23T18:42:15Z","updated_at":"2016-12-28T14:58:02Z","closed_at":null,"merged_at":null,"merge_commit_sha":"a8cd6c3dfedd9a377f2690ddbac9b31ba29cee83","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/Workiva/w_module/pulls/64/commits","review_comments_url":"https://api.github.com/repos/Workiva/w_module/pulls/64/comments","review_comment_url":"https://api.github.com/repos/Workiva/w_module/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Workiva/w_module/issues/64/comments","statuses_url":"https://api.github.com/repos/Workiva/w_module/statuses/405d25c3d94ed1ca6b4d08eb0f91641eca525023","head":{"label":"Workiva:rap-1484_repeated_lifecycle_calls_are_noops","ref":"rap-1484_repeated_lifecycle_calls_are_noops","sha":"405d25c3d94ed1ca6b4d08eb0f91641eca525023","user":{"login":"Workiva","id":1087529,"avatar_url":"https://avatars.githubusercontent.com/u/1087529?v=3","gravatar_id":"","url":"https://api.github.com/users/Workiva","html_url":"https://github.com/Workiva","followers_url":"https://api.github.com/users/Workiva/followers","following_url":"https://api.github.com/users/Workiva/following{/other_user}","gists_url":"https://api.github.com/users/Workiva/gists{/gist_id}","starred_url":"https://api.github.com/users/Workiva/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Workiva/subscriptions","organizations_url":"https://api.github.com/users/Workiva/orgs","repos_url":"https://api.github.com/users/Workiva/repos","events_url":"https://api.github.com/users/Workiva/events{/privacy}","received_events_url":"https://api.github.com/users/Workiva/received_events","type":"Organization","site_admin":false},"repo":{"id":36083980,"name":"w_module","full_name":"Workiva/w_module","owner":{"login":"Workiva","id":1087529,"avatar_url":"https://avatars.githubusercontent.com/u/1087529?v=3","gravatar_id":"","url":"https://api.github.com/users/Workiva","html_url":"https://github.com/Workiva","followers_url":"https://api.github.com/users/Workiva/followers","following_url":"https://api.github.com/users/Workiva/following{/other_user}","gists_url":"https://api.github.com/users/Workiva/gists{/gist_id}","starred_url":"https://api.github.com/users/Workiva/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Workiva/subscriptions","organizations_url":"https://api.github.com/users/Workiva/orgs","repos_url":"https://api.github.com/users/Workiva/repos","events_url":"https://api.github.com/users/Workiva/events{/privacy}","received_events_url":"https://api.github.com/users/Workiva/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Workiva/w_module","description":null,"fork":false,"url":"https://api.github.com/repos/Workiva/w_module","forks_url":"https://api.github.com/repos/Workiva/w_module/forks","keys_url":"https://api.github.com/repos/Workiva/w_module/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Workiva/w_module/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Workiva/w_module/teams","hooks_url":"https://api.github.com/repos/Workiva/w_module/hooks","issue_events_url":"https://api.github.com/repos/Workiva/w_module/issues/events{/number}","events_url":"https://api.github.com/repos/Workiva/w_module/events","assignees_url":"https://api.github.com/repos/Workiva/w_module/assignees{/user}","branches_url":"https://api.github.com/repos/Workiva/w_module/branches{/branch}","tags_url":"https://api.github.com/repos/Workiva/w_module/tags","blobs_url":"https://api.github.com/repos/Workiva/w_module/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Workiva/w_module/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Workiva/w_module/git/refs{/sha}","trees_url":"https://api.github.com/repos/Workiva/w_module/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Workiva/w_module/statuses/{sha}","languages_url":"https://api.github.com/repos/Workiva/w_module/languages","stargazers_url":"https://api.github.com/repos/Workiva/w_module/stargazers","contributors_url":"https://api.github.com/repos/Workiva/w_module/contributors","subscribers_url":"https://api.github.com/repos/Workiva/w_module/subscribers","subscription_url":"https://api.github.com/repos/Workiva/w_module/subscription","commits_url":"https://api.github.com/repos/Workiva/w_module/commits{/sha}","git_commits_url":"https://api.github.com/repos/Workiva/w_module/git/commits{/sha}","comments_url":"https://api.github.com/repos/Workiva/w_module/comments{/number}","issue_comment_url":"https://api.github.com/repos/Workiva/w_module/issues/comments{/number}","contents_url":"https://api.github.com/repos/Workiva/w_module/contents/{+path}","compare_url":"https://api.github.com/repos/Workiva/w_module/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Workiva/w_module/merges","archive_url":"https://api.github.com/repos/Workiva/w_module/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Workiva/w_module/downloads","issues_url":"https://api.github.com/repos/Workiva/w_module/issues{/number}","pulls_url":"https://api.github.com/repos/Workiva/w_module/pulls{/number}","milestones_url":"https://api.github.com/repos/Workiva/w_module/milestones{/number}","notifications_url":"https://api.github.com/repos/Workiva/w_module/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Workiva/w_module/labels{/name}","releases_url":"https://api.github.com/repos/Workiva/w_module/releases{/id}","deployments_url":"https://api.github.com/repos/Workiva/w_module/deployments","created_at":"2015-05-22T16:51:11Z","updated_at":"2016-11-10T15:45:18Z","pushed_at":"2016-12-27T23:28:10Z","git_url":"git://github.com/Workiva/w_module.git","ssh_url":"git@github.com:Workiva/w_module.git","clone_url":"https://github.com/Workiva/w_module.git","svn_url":"https://github.com/Workiva/w_module","homepage":null,"size":363,"stargazers_count":9,"watchers_count":9,"language":"Dart","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":7,"mirror_url":null,"open_issues_count":5,"forks":7,"open_issues":5,"watchers":9,"default_branch":"master"}},"base":{"label":"Workiva:master","ref":"master","sha":"97fe2681e37acd873aeb1e423b19787630d390bb","user":{"login":"Workiva","id":1087529,"avatar_url":"https://avatars.githubusercontent.com/u/1087529?v=3","gravatar_id":"","url":"https://api.github.com/users/Workiva","html_url":"https://github.com/Workiva","followers_url":"https://api.github.com/users/Workiva/followers","following_url":"https://api.github.com/users/Workiva/following{/other_user}","gists_url":"https://api.github.com/users/Workiva/gists{/gist_id}","starred_url":"https://api.github.com/users/Workiva/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Workiva/subscriptions","organizations_url":"https://api.github.com/users/Workiva/orgs","repos_url":"https://api.github.com/users/Workiva/repos","events_url":"https://api.github.com/users/Workiva/events{/privacy}","received_events_url":"https://api.github.com/users/Workiva/received_events","type":"Organization","site_admin":false},"repo":{"id":36083980,"name":"w_module","full_name":"Workiva/w_module","owner":{"login":"Workiva","id":1087529,"avatar_url":"https://avatars.githubusercontent.com/u/1087529?v=3","gravatar_id":"","url":"https://api.github.com/users/Workiva","html_url":"https://github.com/Workiva","followers_url":"https://api.github.com/users/Workiva/followers","following_url":"https://api.github.com/users/Workiva/following{/other_user}","gists_url":"https://api.github.com/users/Workiva/gists{/gist_id}","starred_url":"https://api.github.com/users/Workiva/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Workiva/subscriptions","organizations_url":"https://api.github.com/users/Workiva/orgs","repos_url":"https://api.github.com/users/Workiva/repos","events_url":"https://api.github.com/users/Workiva/events{/privacy}","received_events_url":"https://api.github.com/users/Workiva/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Workiva/w_module","description":null,"fork":false,"url":"https://api.github.com/repos/Workiva/w_module","forks_url":"https://api.github.com/repos/Workiva/w_module/forks","keys_url":"https://api.github.com/repos/Workiva/w_module/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Workiva/w_module/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Workiva/w_module/teams","hooks_url":"https://api.github.com/repos/Workiva/w_module/hooks","issue_events_url":"https://api.github.com/repos/Workiva/w_module/issues/events{/number}","events_url":"https://api.github.com/repos/Workiva/w_module/events","assignees_url":"https://api.github.com/repos/Workiva/w_module/assignees{/user}","branches_url":"https://api.github.com/repos/Workiva/w_module/branches{/branch}","tags_url":"https://api.github.com/repos/Workiva/w_module/tags","blobs_url":"https://api.github.com/repos/Workiva/w_module/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Workiva/w_module/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Workiva/w_module/git/refs{/sha}","trees_url":"https://api.github.com/repos/Workiva/w_module/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Workiva/w_module/statuses/{sha}","languages_url":"https://api.github.com/repos/Workiva/w_module/languages","stargazers_url":"https://api.github.com/repos/Workiva/w_module/stargazers","contributors_url":"https://api.github.com/repos/Workiva/w_module/contributors","subscribers_url":"https://api.github.com/repos/Workiva/w_module/subscribers","subscription_url":"https://api.github.com/repos/Workiva/w_module/subscription","commits_url":"https://api.github.com/repos/Workiva/w_module/commits{/sha}","git_commits_url":"https://api.github.com/repos/Workiva/w_module/git/commits{/sha}","comments_url":"https://api.github.com/repos/Workiva/w_module/comments{/number}","issue_comment_url":"https://api.github.com/repos/Workiva/w_module/issues/comments{/number}","contents_url":"https://api.github.com/repos/Workiva/w_module/contents/{+path}","compare_url":"https://api.github.com/repos/Workiva/w_module/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Workiva/w_module/merges","archive_url":"https://api.github.com/repos/Workiva/w_module/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Workiva/w_module/downloads","issues_url":"https://api.github.com/repos/Workiva/w_module/issues{/number}","pulls_url":"https://api.github.com/repos/Workiva/w_module/pulls{/number}","milestones_url":"https://api.github.com/repos/Workiva/w_module/milestones{/number}","notifications_url":"https://api.github.com/repos/Workiva/w_module/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Workiva/w_module/labels{/name}","releases_url":"https://api.github.com/repos/Workiva/w_module/releases{/id}","deployments_url":"https://api.github.com/repos/Workiva/w_module/deployments","created_at":"2015-05-22T16:51:11Z","updated_at":"2016-11-10T15:45:18Z","pushed_at":"2016-12-27T23:28:10Z","git_url":"git://github.com/Workiva/w_module.git","ssh_url":"git@github.com:Workiva/w_module.git","clone_url":"https://github.com/Workiva/w_module.git","svn_url":"https://github.com/Workiva/w_module","homepage":null,"size":363,"stargazers_count":9,"watchers_count":9,"language":"Dart","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":7,"mirror_url":null,"open_issues_count":5,"forks":7,"open_issues":5,"watchers":9,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Workiva/w_module/pulls/64"},"html":{"href":"https://github.com/Workiva/w_module/pull/64"},"issue":{"href":"https://api.github.com/repos/Workiva/w_module/issues/64"},"comments":{"href":"https://api.github.com/repos/Workiva/w_module/issues/64/comments"},"review_comments":{"href":"https://api.github.com/repos/Workiva/w_module/pulls/64/comments"},"review_comment":{"href":"https://api.github.com/repos/Workiva/w_module/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Workiva/w_module/pulls/64/commits"},"statuses":{"href":"https://api.github.com/repos/Workiva/w_module/statuses/405d25c3d94ed1ca6b4d08eb0f91641eca525023"}}}}
{"actor":{"display_login":"evanweible-wf"}}