{"action":"created","issue":{"url":"https://api.github.com/repos/flutter/flutter/issues/26044","repository_url":"https://api.github.com/repos/flutter/flutter","labels_url":"https://api.github.com/repos/flutter/flutter/issues/26044/labels{/name}","comments_url":"https://api.github.com/repos/flutter/flutter/issues/26044/comments","events_url":"https://api.github.com/repos/flutter/flutter/issues/26044/events","html_url":"https://github.com/flutter/flutter/issues/26044","id":395762259,"node_id":"MDU6SXNzdWUzOTU3NjIyNTk=","number":26044,"title":"Checkbox on false to null displays a check and not a line in tristate","user":{"login":"martinory","id":20730450,"node_id":"MDQ6VXNlcjIwNzMwNDUw","avatar_url":"https://avatars3.githubusercontent.com/u/20730450?v=4","gravatar_id":"","url":"https://api.github.com/users/martinory","html_url":"https://github.com/martinory","followers_url":"https://api.github.com/users/martinory/followers","following_url":"https://api.github.com/users/martinory/following{/other_user}","gists_url":"https://api.github.com/users/martinory/gists{/gist_id}","starred_url":"https://api.github.com/users/martinory/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/martinory/subscriptions","organizations_url":"https://api.github.com/users/martinory/orgs","repos_url":"https://api.github.com/users/martinory/repos","events_url":"https://api.github.com/users/martinory/events{/privacy}","received_events_url":"https://api.github.com/users/martinory/received_events","type":"User","site_admin":false},"labels":[{"id":404497317,"node_id":"MDU6TGFiZWw0MDQ0OTczMTc=","url":"https://api.github.com/repos/flutter/flutter/labels/a:%20fidelity","name":"a: fidelity","color":"38d8c8","default":false},{"id":288585660,"node_id":"MDU6TGFiZWwyODg1ODU2NjA=","url":"https://api.github.com/repos/flutter/flutter/labels/f:%20material%20design","name":"f: material design","color":"207de5","default":false},{"id":284437560,"node_id":"MDU6TGFiZWwyODQ0Mzc1NjA=","url":"https://api.github.com/repos/flutter/flutter/labels/framework","name":"framework","color":"207de5","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/flutter/flutter/milestones/22","html_url":"https://github.com/flutter/flutter/milestone/22","labels_url":"https://api.github.com/repos/flutter/flutter/milestones/22/labels","id":2270094,"node_id":"MDk6TWlsZXN0b25lMjI3MDA5NA==","number":22,"title":"Goals","description":"P2: These are tasks we think are worth fixing in the coming years. It includes issues we've identified that might block fully shipping broad consumer-facing apps, correctness issues, and bugs relating to polish and quality.\r\n\r\nThe date on this milestone is utterly arbitrary and just intended to sort the milestone appropriately.","creator":{"login":"Hixie","id":551196,"node_id":"MDQ6VXNlcjU1MTE5Ng==","avatar_url":"https://avatars2.githubusercontent.com/u/551196?v=4","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},"open_issues":2062,"closed_issues":1053,"state":"open","created_at":"2017-01-23T00:27:59Z","updated_at":"2019-01-04T10:31:03Z","due_on":"2031-01-01T08:00:00Z","closed_at":null},"comments":1,"created_at":"2019-01-03T23:33:42Z","updated_at":"2019-01-04T10:32:22Z","closed_at":null,"author_association":"NONE","body":"Hi!\r\n\r\n`Checkbox` on `false` to `null` displays a check and not a line in tristate.\r\n\r\nAt checkbox.dart at line 333.\r\n\r\n```dart\r\n    // Four cases: false to null, false to true, null to false, true to false\r\n    if (_oldValue == false || value == false) {\r\n      final double t = value == false ? 1.0 - tNormalized : tNormalized;\r\n      final RRect outer = _outerRectAt(origin, t);\r\n      final Paint paint = Paint()..color = _colorAt(t);\r\n\r\n      if (t <= 0.5) {\r\n        _drawBorder(canvas, outer, t, paint);\r\n      } else {\r\n        canvas.drawRRect(outer, paint);\r\n\r\n        _initStrokePaint(paint);\r\n        final double tShrink = (t - 0.5) * 2.0;\r\n        if (_oldValue == null)  // <------------------- this line\r\n          _drawDash(canvas, origin, tShrink, paint);\r\n        else\r\n          _drawCheck(canvas, origin, tShrink, paint);\r\n      }\r\n    }\r\n```\r\n\r\nBut when changing `if (_oldValue == null)` to `if (_oldValue == false || value == false)` it works.\r\n\r\n```dart\r\n    // Four cases: false to null, false to true, null to false, true to false\r\n    if (_oldValue == false || value == false) {\r\n      final double t = value == false ? 1.0 - tNormalized : tNormalized;\r\n      final RRect outer = _outerRectAt(origin, t);\r\n      final Paint paint = Paint()..color = _colorAt(t);\r\n\r\n      if (t <= 0.5) {\r\n        _drawBorder(canvas, outer, t, paint);\r\n      } else {\r\n        canvas.drawRRect(outer, paint);\r\n\r\n        _initStrokePaint(paint);\r\n        final double tShrink = (t - 0.5) * 2.0;\r\n        if (_oldValue == null || value == null)  // <------------------- this line\r\n          _drawDash(canvas, origin, tShrink, paint);\r\n        else\r\n          _drawCheck(canvas, origin, tShrink, paint);\r\n      }\r\n    }\r\n```"},"comment":{"url":"https://api.github.com/repos/flutter/flutter/issues/comments/451408473","html_url":"https://github.com/flutter/flutter/issues/26044#issuecomment-451408473","issue_url":"https://api.github.com/repos/flutter/flutter/issues/26044","id":451408473,"node_id":"MDEyOklzc3VlQ29tbWVudDQ1MTQwODQ3Mw==","user":{"login":"martinory","id":20730450,"node_id":"MDQ6VXNlcjIwNzMwNDUw","avatar_url":"https://avatars3.githubusercontent.com/u/20730450?v=4","gravatar_id":"","url":"https://api.github.com/users/martinory","html_url":"https://github.com/martinory","followers_url":"https://api.github.com/users/martinory/followers","following_url":"https://api.github.com/users/martinory/following{/other_user}","gists_url":"https://api.github.com/users/martinory/gists{/gist_id}","starred_url":"https://api.github.com/users/martinory/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/martinory/subscriptions","organizations_url":"https://api.github.com/users/martinory/orgs","repos_url":"https://api.github.com/users/martinory/repos","events_url":"https://api.github.com/users/martinory/events{/privacy}","received_events_url":"https://api.github.com/users/martinory/received_events","type":"User","site_admin":false},"created_at":"2019-01-04T10:32:22Z","updated_at":"2019-01-04T10:32:22Z","author_association":"NONE","body":"`flutter doctor -v`\r\n\r\n```\r\n[√] Flutter (Channel beta, v1.0.0, on Microsoft Windows [Version 10.0.17134.472], locale sv-SE)\r\n    • Flutter version 1.0.0 at C:\\Users\\User\\flutter\r\n    • Framework revision 5391447fae (5 weeks ago), 2018-11-29 19:41:26 -0800\r\n    • Engine revision 7375a0f414\r\n    • Dart version 2.1.0 (build 2.1.0-dev.9.4 f9ebf21297)\r\n\r\n[√] Android toolchain - develop for Android devices (Android SDK 28.0.3)\r\n    • Android SDK at C:\\Users\\User\\AppData\\Local\\Android\\sdk\r\n    • Android NDK location not configured (optional; useful for native profiling support)\r\n    • Platform android-28, build-tools 28.0.3\r\n    • Java binary at: C:\\Program Files\\Android\\Android Studio\\jre\\bin\\java\r\n    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1024-b02)\r\n    • All Android licenses accepted.\r\n\r\n[√] Android Studio (version 3.1)\r\n    • Android Studio at C:\\Program Files\\Android\\Android Studio\r\n    • Flutter plugin version 26.0.1\r\n    • Dart plugin version 173.4700\r\n    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1024-b02)\r\n\r\n[√] VS Code (version 1.30.1)\r\n    • VS Code at C:\\Users\\User\\AppData\\Local\\Programs\\Microsoft VS Code\r\n    • Flutter extension version 2.21.1\r\n\r\n[!] Connected device\r\n    ! No devices available\r\n\r\n! Doctor found issues in 1 category.\r\n```"}}
{"actor":{"display_login":"martinory"}}