{"action":"reopened","issue":{"url":"https://api.github.com/repos/pauldemarco/flutter_blue/issues/92","repository_url":"https://api.github.com/repos/pauldemarco/flutter_blue","labels_url":"https://api.github.com/repos/pauldemarco/flutter_blue/issues/92/labels{/name}","comments_url":"https://api.github.com/repos/pauldemarco/flutter_blue/issues/92/comments","events_url":"https://api.github.com/repos/pauldemarco/flutter_blue/issues/92/events","html_url":"https://github.com/pauldemarco/flutter_blue/issues/92","id":346713955,"node_id":"MDU6SXNzdWUzNDY3MTM5NTU=","number":92,"title":"Override equals for ScanResult","user":{"login":"pauldemarco","id":16725750,"node_id":"MDQ6VXNlcjE2NzI1NzUw","avatar_url":"https://avatars2.githubusercontent.com/u/16725750?v=4","gravatar_id":"","url":"https://api.github.com/users/pauldemarco","html_url":"https://github.com/pauldemarco","followers_url":"https://api.github.com/users/pauldemarco/followers","following_url":"https://api.github.com/users/pauldemarco/following{/other_user}","gists_url":"https://api.github.com/users/pauldemarco/gists{/gist_id}","starred_url":"https://api.github.com/users/pauldemarco/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pauldemarco/subscriptions","organizations_url":"https://api.github.com/users/pauldemarco/orgs","repos_url":"https://api.github.com/users/pauldemarco/repos","events_url":"https://api.github.com/users/pauldemarco/events{/privacy}","received_events_url":"https://api.github.com/users/pauldemarco/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-08-01T18:22:56Z","updated_at":"2018-08-01T18:27:08Z","closed_at":null,"author_association":"OWNER","body":"Often times the developer must do this to avoid duplicates in the scan results list:\r\n```dart\r\n_flutterBlue.scan().listen((result) {\r\n      if (!results.any((r) => r.device.id == result.device.id)) {\r\n        results.add(result);\r\n      }\r\n    });\r\n```\r\n\r\nConsider overriding ScanResult's `equals` method so that it can be simplified to:\r\n```dart\r\n_flutterBlue.scan(timeout: Duration(seconds: 5)).listen((result) {\r\n      if (!results.contains(result)) {\r\n        results.add(result);\r\n      }\r\n    });\r\n```"}}
{"actor":{"display_login":"pauldemarco"}}