From b823bc3446982eee1dfc8877a7022962531aede6 Mon Sep 17 00:00:00 2001 From: samuelematias Date: Wed, 2 Dec 2020 18:23:07 -0300 Subject: [PATCH] feat(test): Collecting code coverage from your tests --- README.md | 2 + coverage/amber.png | Bin 0 -> 141 bytes coverage/emerald.png | Bin 0 -> 141 bytes coverage/gcov.css | 519 ++++++++++++++++++ coverage/glass.png | Bin 0 -> 167 bytes coverage/index-sort-f.html | 103 ++++ coverage/index-sort-l.html | 103 ++++ coverage/index.html | 103 ++++ coverage/lcov.info | 152 +++++ coverage/lib/index-sort-f.html | 123 +++++ coverage/lib/index-sort-l.html | 123 +++++ coverage/lib/index.html | 123 +++++ coverage/lib/main.dart.func-sort-c.html | 72 +++ coverage/lib/main.dart.func.html | 72 +++ coverage/lib/main.dart.gcov.html | 132 +++++ coverage/lib/models/index-sort-f.html | 93 ++++ coverage/lib/models/index-sort-l.html | 93 ++++ coverage/lib/models/index.html | 93 ++++ .../models/operations.dart.func-sort-c.html | 72 +++ coverage/lib/models/operations.dart.func.html | 72 +++ coverage/lib/models/operations.dart.gcov.html | 98 ++++ coverage/lib/pi.dart.func-sort-c.html | 72 +++ coverage/lib/pi.dart.func.html | 72 +++ coverage/lib/pi.dart.gcov.html | 113 ++++ .../lib/power_of_two.dart.func-sort-c.html | 72 +++ coverage/lib/power_of_two.dart.func.html | 72 +++ coverage/lib/power_of_two.dart.gcov.html | 146 +++++ .../two_digit_operation.dart.func-sort-c.html | 72 +++ .../lib/two_digit_operation.dart.func.html | 72 +++ .../lib/two_digit_operation.dart.gcov.html | 199 +++++++ coverage/ruby.png | Bin 0 -> 141 bytes coverage/snow.png | Bin 0 -> 141 bytes coverage/updown.png | Bin 0 -> 117 bytes 33 files changed, 3038 insertions(+) create mode 100644 coverage/amber.png create mode 100644 coverage/emerald.png create mode 100644 coverage/gcov.css create mode 100644 coverage/glass.png create mode 100644 coverage/index-sort-f.html create mode 100644 coverage/index-sort-l.html create mode 100644 coverage/index.html create mode 100644 coverage/lcov.info create mode 100644 coverage/lib/index-sort-f.html create mode 100644 coverage/lib/index-sort-l.html create mode 100644 coverage/lib/index.html create mode 100644 coverage/lib/main.dart.func-sort-c.html create mode 100644 coverage/lib/main.dart.func.html create mode 100644 coverage/lib/main.dart.gcov.html create mode 100644 coverage/lib/models/index-sort-f.html create mode 100644 coverage/lib/models/index-sort-l.html create mode 100644 coverage/lib/models/index.html create mode 100644 coverage/lib/models/operations.dart.func-sort-c.html create mode 100644 coverage/lib/models/operations.dart.func.html create mode 100644 coverage/lib/models/operations.dart.gcov.html create mode 100644 coverage/lib/pi.dart.func-sort-c.html create mode 100644 coverage/lib/pi.dart.func.html create mode 100644 coverage/lib/pi.dart.gcov.html create mode 100644 coverage/lib/power_of_two.dart.func-sort-c.html create mode 100644 coverage/lib/power_of_two.dart.func.html create mode 100644 coverage/lib/power_of_two.dart.gcov.html create mode 100644 coverage/lib/two_digit_operation.dart.func-sort-c.html create mode 100644 coverage/lib/two_digit_operation.dart.func.html create mode 100644 coverage/lib/two_digit_operation.dart.gcov.html create mode 100644 coverage/ruby.png create mode 100644 coverage/snow.png create mode 100644 coverage/updown.png diff --git a/README.md b/README.md index 2af618f..3572d6c 100644 --- a/README.md +++ b/README.md @@ -49,6 +49,8 @@ Calculator - [Caster.IO](https://caster.io) project to showcase testing techniqu [Lesson 22: Using golden files to verify pixel-perfect widgets](https://caster.io/lessons/lesson-22-using-golden-files-to-verify-pixel-perfect-widgets) 👉🏾 [Branch](https://github.com/samuelematias/calculator_app/tree/lesson22) +[Lesson 23: Collecting code coverage from your tests](https://caster.io/lessons/lesson-23-collecting-code-coverage-from-your-tests) 👉🏾 [Branch](https://github.com/samuelematias/calculator_app/tree/lesson23) + ## License ``` diff --git a/coverage/amber.png b/coverage/amber.png new file mode 100644 index 0000000000000000000000000000000000000000..2cab170d8359081983a4e343848dfe06bc490f12 GIT binary patch literal 141 zcmeAS@N?(olHy`uVBq!ia0vp^j3CU&3?x-=hn)ga>?NMQuI!iC1^G2tW}LqE04T&+ z;1OBOz`!j8!i<;h*8KqrvZOouIx;Y9?C1WI$O`1M1^9%x{(levWG?NMQuI!iC1^Jb!lvI6;R0X`wF(yt=9xVZRt1vCRixIA4P dLn>}1Cji+@42)0J?}79&c)I$ztaD0e0sy@GAL0N2 literal 0 HcmV?d00001 diff --git a/coverage/gcov.css b/coverage/gcov.css new file mode 100644 index 0000000..bfd0a83 --- /dev/null +++ b/coverage/gcov.css @@ -0,0 +1,519 @@ +/* All views: initial background and text color */ +body +{ + color: #000000; + background-color: #FFFFFF; +} + +/* All views: standard link format*/ +a:link +{ + color: #284FA8; + text-decoration: underline; +} + +/* All views: standard link - visited format */ +a:visited +{ + color: #00CB40; + text-decoration: underline; +} + +/* All views: standard link - activated format */ +a:active +{ + color: #FF0040; + text-decoration: underline; +} + +/* All views: main title format */ +td.title +{ + text-align: center; + padding-bottom: 10px; + font-family: sans-serif; + font-size: 20pt; + font-style: italic; + font-weight: bold; +} + +/* All views: header item format */ +td.headerItem +{ + text-align: right; + padding-right: 6px; + font-family: sans-serif; + font-weight: bold; + vertical-align: top; + white-space: nowrap; +} + +/* All views: header item value format */ +td.headerValue +{ + text-align: left; + color: #284FA8; + font-family: sans-serif; + font-weight: bold; + white-space: nowrap; +} + +/* All views: header item coverage table heading */ +td.headerCovTableHead +{ + text-align: center; + padding-right: 6px; + padding-left: 6px; + padding-bottom: 0px; + font-family: sans-serif; + font-size: 80%; + white-space: nowrap; +} + +/* All views: header item coverage table entry */ +td.headerCovTableEntry +{ + text-align: right; + color: #284FA8; + font-family: sans-serif; + font-weight: bold; + white-space: nowrap; + padding-left: 12px; + padding-right: 4px; + background-color: #DAE7FE; +} + +/* All views: header item coverage table entry for high coverage rate */ +td.headerCovTableEntryHi +{ + text-align: right; + color: #000000; + font-family: sans-serif; + font-weight: bold; + white-space: nowrap; + padding-left: 12px; + padding-right: 4px; + background-color: #A7FC9D; +} + +/* All views: header item coverage table entry for medium coverage rate */ +td.headerCovTableEntryMed +{ + text-align: right; + color: #000000; + font-family: sans-serif; + font-weight: bold; + white-space: nowrap; + padding-left: 12px; + padding-right: 4px; + background-color: #FFEA20; +} + +/* All views: header item coverage table entry for ow coverage rate */ +td.headerCovTableEntryLo +{ + text-align: right; + color: #000000; + font-family: sans-serif; + font-weight: bold; + white-space: nowrap; + padding-left: 12px; + padding-right: 4px; + background-color: #FF0000; +} + +/* All views: header legend value for legend entry */ +td.headerValueLeg +{ + text-align: left; + color: #000000; + font-family: sans-serif; + font-size: 80%; + white-space: nowrap; + padding-top: 4px; +} + +/* All views: color of horizontal ruler */ +td.ruler +{ + background-color: #6688D4; +} + +/* All views: version string format */ +td.versionInfo +{ + text-align: center; + padding-top: 2px; + font-family: sans-serif; + font-style: italic; +} + +/* Directory view/File view (all)/Test case descriptions: + table headline format */ +td.tableHead +{ + text-align: center; + color: #FFFFFF; + background-color: #6688D4; + font-family: sans-serif; + font-size: 120%; + font-weight: bold; + white-space: nowrap; + padding-left: 4px; + padding-right: 4px; +} + +span.tableHeadSort +{ + padding-right: 4px; +} + +/* Directory view/File view (all): filename entry format */ +td.coverFile +{ + text-align: left; + padding-left: 10px; + padding-right: 20px; + color: #284FA8; + background-color: #DAE7FE; + font-family: monospace; +} + +/* Directory view/File view (all): bar-graph entry format*/ +td.coverBar +{ + padding-left: 10px; + padding-right: 10px; + background-color: #DAE7FE; +} + +/* Directory view/File view (all): bar-graph outline color */ +td.coverBarOutline +{ + background-color: #000000; +} + +/* Directory view/File view (all): percentage entry for files with + high coverage rate */ +td.coverPerHi +{ + text-align: right; + padding-left: 10px; + padding-right: 10px; + background-color: #A7FC9D; + font-weight: bold; + font-family: sans-serif; +} + +/* Directory view/File view (all): line count entry for files with + high coverage rate */ +td.coverNumHi +{ + text-align: right; + padding-left: 10px; + padding-right: 10px; + background-color: #A7FC9D; + white-space: nowrap; + font-family: sans-serif; +} + +/* Directory view/File view (all): percentage entry for files with + medium coverage rate */ +td.coverPerMed +{ + text-align: right; + padding-left: 10px; + padding-right: 10px; + background-color: #FFEA20; + font-weight: bold; + font-family: sans-serif; +} + +/* Directory view/File view (all): line count entry for files with + medium coverage rate */ +td.coverNumMed +{ + text-align: right; + padding-left: 10px; + padding-right: 10px; + background-color: #FFEA20; + white-space: nowrap; + font-family: sans-serif; +} + +/* Directory view/File view (all): percentage entry for files with + low coverage rate */ +td.coverPerLo +{ + text-align: right; + padding-left: 10px; + padding-right: 10px; + background-color: #FF0000; + font-weight: bold; + font-family: sans-serif; +} + +/* Directory view/File view (all): line count entry for files with + low coverage rate */ +td.coverNumLo +{ + text-align: right; + padding-left: 10px; + padding-right: 10px; + background-color: #FF0000; + white-space: nowrap; + font-family: sans-serif; +} + +/* File view (all): "show/hide details" link format */ +a.detail:link +{ + color: #B8D0FF; + font-size:80%; +} + +/* File view (all): "show/hide details" link - visited format */ +a.detail:visited +{ + color: #B8D0FF; + font-size:80%; +} + +/* File view (all): "show/hide details" link - activated format */ +a.detail:active +{ + color: #FFFFFF; + font-size:80%; +} + +/* File view (detail): test name entry */ +td.testName +{ + text-align: right; + padding-right: 10px; + background-color: #DAE7FE; + font-family: sans-serif; +} + +/* File view (detail): test percentage entry */ +td.testPer +{ + text-align: right; + padding-left: 10px; + padding-right: 10px; + background-color: #DAE7FE; + font-family: sans-serif; +} + +/* File view (detail): test lines count entry */ +td.testNum +{ + text-align: right; + padding-left: 10px; + padding-right: 10px; + background-color: #DAE7FE; + font-family: sans-serif; +} + +/* Test case descriptions: test name format*/ +dt +{ + font-family: sans-serif; + font-weight: bold; +} + +/* Test case descriptions: description table body */ +td.testDescription +{ + padding-top: 10px; + padding-left: 30px; + padding-bottom: 10px; + padding-right: 30px; + background-color: #DAE7FE; +} + +/* Source code view: function entry */ +td.coverFn +{ + text-align: left; + padding-left: 10px; + padding-right: 20px; + color: #284FA8; + background-color: #DAE7FE; + font-family: monospace; +} + +/* Source code view: function entry zero count*/ +td.coverFnLo +{ + text-align: right; + padding-left: 10px; + padding-right: 10px; + background-color: #FF0000; + font-weight: bold; + font-family: sans-serif; +} + +/* Source code view: function entry nonzero count*/ +td.coverFnHi +{ + text-align: right; + padding-left: 10px; + padding-right: 10px; + background-color: #DAE7FE; + font-weight: bold; + font-family: sans-serif; +} + +/* Source code view: source code format */ +pre.source +{ + font-family: monospace; + white-space: pre; + margin-top: 2px; +} + +/* Source code view: line number format */ +span.lineNum +{ + background-color: #EFE383; +} + +/* Source code view: format for lines which were executed */ +td.lineCov, +span.lineCov +{ + background-color: #CAD7FE; +} + +/* Source code view: format for Cov legend */ +span.coverLegendCov +{ + padding-left: 10px; + padding-right: 10px; + padding-bottom: 2px; + background-color: #CAD7FE; +} + +/* Source code view: format for lines which were not executed */ +td.lineNoCov, +span.lineNoCov +{ + background-color: #FF6230; +} + +/* Source code view: format for NoCov legend */ +span.coverLegendNoCov +{ + padding-left: 10px; + padding-right: 10px; + padding-bottom: 2px; + background-color: #FF6230; +} + +/* Source code view (function table): standard link - visited format */ +td.lineNoCov > a:visited, +td.lineCov > a:visited +{ + color: black; + text-decoration: underline; +} + +/* Source code view: format for lines which were executed only in a + previous version */ +span.lineDiffCov +{ + background-color: #B5F7AF; +} + +/* Source code view: format for branches which were executed + * and taken */ +span.branchCov +{ + background-color: #CAD7FE; +} + +/* Source code view: format for branches which were executed + * but not taken */ +span.branchNoCov +{ + background-color: #FF6230; +} + +/* Source code view: format for branches which were not executed */ +span.branchNoExec +{ + background-color: #FF6230; +} + +/* Source code view: format for the source code heading line */ +pre.sourceHeading +{ + white-space: pre; + font-family: monospace; + font-weight: bold; + margin: 0px; +} + +/* All views: header legend value for low rate */ +td.headerValueLegL +{ + font-family: sans-serif; + text-align: center; + white-space: nowrap; + padding-left: 4px; + padding-right: 2px; + background-color: #FF0000; + font-size: 80%; +} + +/* All views: header legend value for med rate */ +td.headerValueLegM +{ + font-family: sans-serif; + text-align: center; + white-space: nowrap; + padding-left: 2px; + padding-right: 2px; + background-color: #FFEA20; + font-size: 80%; +} + +/* All views: header legend value for hi rate */ +td.headerValueLegH +{ + font-family: sans-serif; + text-align: center; + white-space: nowrap; + padding-left: 2px; + padding-right: 4px; + background-color: #A7FC9D; + font-size: 80%; +} + +/* All views except source code view: legend format for low coverage */ +span.coverLegendCovLo +{ + padding-left: 10px; + padding-right: 10px; + padding-top: 2px; + background-color: #FF0000; +} + +/* All views except source code view: legend format for med coverage */ +span.coverLegendCovMed +{ + padding-left: 10px; + padding-right: 10px; + padding-top: 2px; + background-color: #FFEA20; +} + +/* All views except source code view: legend format for hi coverage */ +span.coverLegendCovHi +{ + padding-left: 10px; + padding-right: 10px; + padding-top: 2px; + background-color: #A7FC9D; +} diff --git a/coverage/glass.png b/coverage/glass.png new file mode 100644 index 0000000000000000000000000000000000000000..e1abc00680a3093c49fdb775ae6bdb6764c95af2 GIT binary patch literal 167 zcmeAS@N?(olHy`uVBq!ia0vp^j3CU&3?x-=hn)gaEa{HEjtmSN`?>!lvI6;R0X`wF z|Ns97GD8ntt^-nxB|(0{3=Yq3q=7g|-tI089jvk*Kn`btM`SSr1Gf+eGhVt|_XjA* zUgGKN%6^Gmn4d%Ph(nkFP>9RZ#WAE}PI3Z}&BVayv3^M*kj3EX>gTe~DWM4f=_Dpv literal 0 HcmV?d00001 diff --git a/coverage/index-sort-f.html b/coverage/index-sort-f.html new file mode 100644 index 0000000..e250d5a --- /dev/null +++ b/coverage/index-sort-f.html @@ -0,0 +1,103 @@ + + + + + + + LCOV - lcov.info + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top levelHitTotalCoverage
Test:lcov.infoLines:12513294.7 %
Date:2020-12-02 18:20:19Functions:00-
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Directory Sort by nameLine Coverage Sort by line coverageFunctions Sort by function coverage
lib/models +
100.0%
+
100.0 %9 / 9-0 / 0
lib +
94.3%94.3%
+
94.3 %116 / 123-0 / 0
+
+
+ + + + +
Generated by: LCOV version 1.15
+
+ + + diff --git a/coverage/index-sort-l.html b/coverage/index-sort-l.html new file mode 100644 index 0000000..f2f2aba --- /dev/null +++ b/coverage/index-sort-l.html @@ -0,0 +1,103 @@ + + + + + + + LCOV - lcov.info + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top levelHitTotalCoverage
Test:lcov.infoLines:12513294.7 %
Date:2020-12-02 18:20:19Functions:00-
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Directory Sort by nameLine Coverage Sort by line coverageFunctions Sort by function coverage
lib +
94.3%94.3%
+
94.3 %116 / 123-0 / 0
lib/models +
100.0%
+
100.0 %9 / 9-0 / 0
+
+
+ + + + +
Generated by: LCOV version 1.15
+
+ + + diff --git a/coverage/index.html b/coverage/index.html new file mode 100644 index 0000000..e0a6d5e --- /dev/null +++ b/coverage/index.html @@ -0,0 +1,103 @@ + + + + + + + LCOV - lcov.info + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top levelHitTotalCoverage
Test:lcov.infoLines:12513294.7 %
Date:2020-12-02 18:20:19Functions:00-
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Directory Sort by nameLine Coverage Sort by line coverageFunctions Sort by function coverage
lib +
94.3%94.3%
+
94.3 %116 / 123-0 / 0
lib/models +
100.0%
+
100.0 %9 / 9-0 / 0
+
+
+ + + + +
Generated by: LCOV version 1.15
+
+ + + diff --git a/coverage/lcov.info b/coverage/lcov.info new file mode 100644 index 0000000..301d627 --- /dev/null +++ b/coverage/lcov.info @@ -0,0 +1,152 @@ +SF:lib/pi.dart +DA:5,2 +DA:6,0 +DA:8,2 +DA:12,2 +DA:16,2 +DA:17,4 +DA:19,2 +DA:20,2 +DA:21,4 +DA:23,2 +DA:25,2 +DA:26,2 +DA:29,2 +DA:30,6 +LF:14 +LH:13 +end_of_record +SF:lib/power_of_two.dart +DA:5,2 +DA:8,0 +DA:10,2 +DA:14,2 +DA:15,2 +DA:23,2 +DA:25,2 +DA:26,6 +DA:29,2 +DA:31,4 +DA:32,2 +DA:35,2 +DA:37,2 +DA:39,2 +DA:40,2 +DA:42,2 +DA:45,2 +DA:47,6 +DA:49,2 +DA:50,4 +DA:51,6 +DA:57,1 +DA:59,3 +DA:60,4 +DA:61,2 +DA:62,2 +DA:65,0 +DA:66,0 +LF:28 +LH:25 +end_of_record +SF:lib/models/operations.dart +DA:1,3 +DA:2,3 +DA:3,3 +DA:4,3 +DA:5,3 +DA:9,2 +DA:11,2 +DA:13,2 +DA:15,2 +LF:9 +LH:9 +end_of_record +SF:lib/two_digit_operation.dart +DA:6,2 +DA:14,2 +DA:15,2 +DA:25,2 +DA:27,6 +DA:28,6 +DA:29,2 +DA:32,2 +DA:34,4 +DA:35,4 +DA:36,2 +DA:39,2 +DA:41,2 +DA:43,2 +DA:44,2 +DA:45,10 +DA:46,2 +DA:49,2 +DA:50,2 +DA:51,2 +DA:52,2 +DA:53,2 +DA:54,6 +DA:55,6 +DA:58,2 +DA:59,2 +DA:60,10 +DA:61,2 +DA:67,2 +DA:68,2 +DA:71,2 +DA:72,2 +DA:73,4 +DA:74,4 +DA:77,2 +DA:78,4 +DA:79,6 +DA:86,2 +DA:87,6 +DA:88,6 +DA:90,2 +DA:91,6 +DA:92,6 +DA:94,4 +DA:95,4 +DA:98,2 +DA:99,1 +DA:105,2 +DA:107,4 +DA:108,2 +DA:109,6 +DA:111,1 +DA:112,0 +DA:114,1 +DA:115,0 +DA:117,1 +DA:118,3 +LF:57 +LH:55 +end_of_record +SF:lib/main.dart +DA:8,0 +DA:11,1 +DA:13,1 +DA:14,1 +DA:15,1 +DA:16,1 +DA:17,1 +DA:19,1 +DA:20,1 +DA:21,1 +DA:22,1 +DA:23,1 +DA:24,1 +DA:25,1 +DA:26,1 +DA:27,1 +DA:28,1 +DA:29,1 +DA:33,1 +DA:34,1 +DA:38,1 +DA:39,1 +DA:43,1 +DA:44,1 +LF:24 +LH:23 +end_of_record diff --git a/coverage/lib/index-sort-f.html b/coverage/lib/index-sort-f.html new file mode 100644 index 0000000..394195a --- /dev/null +++ b/coverage/lib/index-sort-f.html @@ -0,0 +1,123 @@ + + + + + + + LCOV - lcov.info - lib + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - libHitTotalCoverage
Test:lcov.infoLines:11612394.3 %
Date:2020-12-02 18:20:19Functions:00-
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Filename Sort by nameLine Coverage Sort by line coverageFunctions Sort by function coverage
main.dart +
95.8%95.8%
+
95.8 %23 / 24-0 / 0
power_of_two.dart +
89.3%89.3%
+
89.3 %25 / 28-0 / 0
two_digit_operation.dart +
96.5%96.5%
+
96.5 %55 / 57-0 / 0
pi.dart +
92.9%92.9%
+
92.9 %13 / 14-0 / 0
+
+
+ + + + +
Generated by: LCOV version 1.15
+
+ + + diff --git a/coverage/lib/index-sort-l.html b/coverage/lib/index-sort-l.html new file mode 100644 index 0000000..aaceb4c --- /dev/null +++ b/coverage/lib/index-sort-l.html @@ -0,0 +1,123 @@ + + + + + + + LCOV - lcov.info - lib + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - libHitTotalCoverage
Test:lcov.infoLines:11612394.3 %
Date:2020-12-02 18:20:19Functions:00-
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Filename Sort by nameLine Coverage Sort by line coverageFunctions Sort by function coverage
power_of_two.dart +
89.3%89.3%
+
89.3 %25 / 28-0 / 0
pi.dart +
92.9%92.9%
+
92.9 %13 / 14-0 / 0
main.dart +
95.8%95.8%
+
95.8 %23 / 24-0 / 0
two_digit_operation.dart +
96.5%96.5%
+
96.5 %55 / 57-0 / 0
+
+
+ + + + +
Generated by: LCOV version 1.15
+
+ + + diff --git a/coverage/lib/index.html b/coverage/lib/index.html new file mode 100644 index 0000000..57ecf3e --- /dev/null +++ b/coverage/lib/index.html @@ -0,0 +1,123 @@ + + + + + + + LCOV - lcov.info - lib + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - libHitTotalCoverage
Test:lcov.infoLines:11612394.3 %
Date:2020-12-02 18:20:19Functions:00-
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Filename Sort by nameLine Coverage Sort by line coverageFunctions Sort by function coverage
main.dart +
95.8%95.8%
+
95.8 %23 / 24-0 / 0
pi.dart +
92.9%92.9%
+
92.9 %13 / 14-0 / 0
power_of_two.dart +
89.3%89.3%
+
89.3 %25 / 28-0 / 0
two_digit_operation.dart +
96.5%96.5%
+
96.5 %55 / 57-0 / 0
+
+
+ + + + +
Generated by: LCOV version 1.15
+
+ + + diff --git a/coverage/lib/main.dart.func-sort-c.html b/coverage/lib/main.dart.func-sort-c.html new file mode 100644 index 0000000..100c7f3 --- /dev/null +++ b/coverage/lib/main.dart.func-sort-c.html @@ -0,0 +1,72 @@ + + + + + + + LCOV - lcov.info - lib/main.dart - functions + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - lib - main.dart (source / functions)HitTotalCoverage
Test:lcov.infoLines:232495.8 %
Date:2020-12-02 18:20:19Functions:00-
+
+ +
+ + + + + + +

Function Name Sort by function nameHit count Sort by hit count
+
+
+ + + +
Generated by: LCOV version 1.15
+
+ + + diff --git a/coverage/lib/main.dart.func.html b/coverage/lib/main.dart.func.html new file mode 100644 index 0000000..9ce9340 --- /dev/null +++ b/coverage/lib/main.dart.func.html @@ -0,0 +1,72 @@ + + + + + + + LCOV - lcov.info - lib/main.dart - functions + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - lib - main.dart (source / functions)HitTotalCoverage
Test:lcov.infoLines:232495.8 %
Date:2020-12-02 18:20:19Functions:00-
+
+ +
+ + + + + + +

Function Name Sort by function nameHit count Sort by hit count
+
+
+ + + +
Generated by: LCOV version 1.15
+
+ + + diff --git a/coverage/lib/main.dart.gcov.html b/coverage/lib/main.dart.gcov.html new file mode 100644 index 0000000..700ee07 --- /dev/null +++ b/coverage/lib/main.dart.gcov.html @@ -0,0 +1,132 @@ + + + + + + + LCOV - lcov.info - lib/main.dart + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - lib - main.dart (source / functions)HitTotalCoverage
Test:lcov.infoLines:232495.8 %
Date:2020-12-02 18:20:19Functions:00-
+
+ + + + + + + + +

+
          Line data    Source code
+
+       1             : import 'package:calculator_app/models/models.dart';
+       2             : import 'package:calculator_app/pi.dart';
+       3             : import 'package:calculator_app/power_of_two.dart';
+       4             : import 'package:calculator_app/two_digit_operation.dart';
+       5             : import 'package:flutter/material.dart';
+       6             : import 'package:calculator/calculator.dart';
+       7             : 
+       8           0 : void main() => runApp(CalculatorApp());
+       9             : 
+      10             : class CalculatorApp extends StatelessWidget {
+      11           1 :   @override
+      12             :   Widget build(BuildContext context) {
+      13           1 :     final calculator = Calculator();
+      14           1 :     return MaterialApp(
+      15           1 :       home: Scaffold(
+      16           1 :         appBar: AppBar(
+      17           1 :           title: Text('Calculator'),
+      18             :         ),
+      19           1 :         body: SingleChildScrollView(
+      20           1 :           child: Padding(
+      21           1 :             padding: EdgeInsets.all(12),
+      22           1 :             child: SafeArea(
+      23           1 :               child: Column(
+      24           1 :                 children: [
+      25           1 :                   PowerOfTwo(calculator: calculator),
+      26           1 :                   Divider(),
+      27           1 :                   Pi(calculator: calculator),
+      28           1 :                   Divider(),
+      29           1 :                   TwoDigitOperation(
+      30             :                     calculator: calculator,
+      31             :                     operation: Operations.add,
+      32             :                   ),
+      33           1 :                   Divider(),
+      34           1 :                   TwoDigitOperation(
+      35             :                     calculator: calculator,
+      36             :                     operation: Operations.substract,
+      37             :                   ),
+      38           1 :                   Divider(),
+      39           1 :                   TwoDigitOperation(
+      40             :                     calculator: calculator,
+      41             :                     operation: Operations.multiply,
+      42             :                   ),
+      43           1 :                   Divider(),
+      44           1 :                   TwoDigitOperation(
+      45             :                     calculator: calculator,
+      46             :                     operation: Operations.divide,
+      47             :                   ),
+      48             :                 ],
+      49             :               ),
+      50             :             ),
+      51             :           ),
+      52             :         ),
+      53             :       ),
+      54             :     );
+      55             :   }
+      56             : }
+
+
+
+ + + + +
Generated by: LCOV version 1.15
+
+ + + diff --git a/coverage/lib/models/index-sort-f.html b/coverage/lib/models/index-sort-f.html new file mode 100644 index 0000000..33cb5af --- /dev/null +++ b/coverage/lib/models/index-sort-f.html @@ -0,0 +1,93 @@ + + + + + + + LCOV - lcov.info - lib/models + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - lib/modelsHitTotalCoverage
Test:lcov.infoLines:99100.0 %
Date:2020-12-02 18:20:19Functions:00-
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + +

Filename Sort by nameLine Coverage Sort by line coverageFunctions Sort by function coverage
operations.dart +
100.0%
+
100.0 %9 / 9-0 / 0
+
+
+ + + + +
Generated by: LCOV version 1.15
+
+ + + diff --git a/coverage/lib/models/index-sort-l.html b/coverage/lib/models/index-sort-l.html new file mode 100644 index 0000000..b0d867d --- /dev/null +++ b/coverage/lib/models/index-sort-l.html @@ -0,0 +1,93 @@ + + + + + + + LCOV - lcov.info - lib/models + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - lib/modelsHitTotalCoverage
Test:lcov.infoLines:99100.0 %
Date:2020-12-02 18:20:19Functions:00-
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + +

Filename Sort by nameLine Coverage Sort by line coverageFunctions Sort by function coverage
operations.dart +
100.0%
+
100.0 %9 / 9-0 / 0
+
+
+ + + + +
Generated by: LCOV version 1.15
+
+ + + diff --git a/coverage/lib/models/index.html b/coverage/lib/models/index.html new file mode 100644 index 0000000..d0308e8 --- /dev/null +++ b/coverage/lib/models/index.html @@ -0,0 +1,93 @@ + + + + + + + LCOV - lcov.info - lib/models + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - lib/modelsHitTotalCoverage
Test:lcov.infoLines:99100.0 %
Date:2020-12-02 18:20:19Functions:00-
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + +

Filename Sort by nameLine Coverage Sort by line coverageFunctions Sort by function coverage
operations.dart +
100.0%
+
100.0 %9 / 9-0 / 0
+
+
+ + + + +
Generated by: LCOV version 1.15
+
+ + + diff --git a/coverage/lib/models/operations.dart.func-sort-c.html b/coverage/lib/models/operations.dart.func-sort-c.html new file mode 100644 index 0000000..53f76aa --- /dev/null +++ b/coverage/lib/models/operations.dart.func-sort-c.html @@ -0,0 +1,72 @@ + + + + + + + LCOV - lcov.info - lib/models/operations.dart - functions + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - lib/models - operations.dart (source / functions)HitTotalCoverage
Test:lcov.infoLines:99100.0 %
Date:2020-12-02 18:20:19Functions:00-
+
+ +
+ + + + + + +

Function Name Sort by function nameHit count Sort by hit count
+
+
+ + + +
Generated by: LCOV version 1.15
+
+ + + diff --git a/coverage/lib/models/operations.dart.func.html b/coverage/lib/models/operations.dart.func.html new file mode 100644 index 0000000..22250e0 --- /dev/null +++ b/coverage/lib/models/operations.dart.func.html @@ -0,0 +1,72 @@ + + + + + + + LCOV - lcov.info - lib/models/operations.dart - functions + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - lib/models - operations.dart (source / functions)HitTotalCoverage
Test:lcov.infoLines:99100.0 %
Date:2020-12-02 18:20:19Functions:00-
+
+ +
+ + + + + + +

Function Name Sort by function nameHit count Sort by hit count
+
+
+ + + +
Generated by: LCOV version 1.15
+
+ + + diff --git a/coverage/lib/models/operations.dart.gcov.html b/coverage/lib/models/operations.dart.gcov.html new file mode 100644 index 0000000..fcd5437 --- /dev/null +++ b/coverage/lib/models/operations.dart.gcov.html @@ -0,0 +1,98 @@ + + + + + + + LCOV - lcov.info - lib/models/operations.dart + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - lib/models - operations.dart (source / functions)HitTotalCoverage
Test:lcov.infoLines:99100.0 %
Date:2020-12-02 18:20:19Functions:00-
+
+ + + + + + + + +

+
          Line data    Source code
+
+       1           3 : enum Operations {
+       2           3 :   add,
+       3           3 :   substract,
+       4           3 :   multiply,
+       5           3 :   divide,
+       6             : }
+       7             : 
+       8             : extension OperationX on Operations {
+       9           2 :   String get description {
+      10             :     switch (this) {
+      11           2 :       case Operations.add:
+      12             :         return 'plus';
+      13           2 :       case Operations.substract:
+      14             :         return 'minus';
+      15           2 :       case Operations.multiply:
+      16             :         return 'multiplied by';
+      17             :       case Operations.divide:
+      18             :       default:
+      19             :         return 'divided by';
+      20             :     }
+      21             :   }
+      22             : }
+
+
+
+ + + + +
Generated by: LCOV version 1.15
+
+ + + diff --git a/coverage/lib/pi.dart.func-sort-c.html b/coverage/lib/pi.dart.func-sort-c.html new file mode 100644 index 0000000..c54353c --- /dev/null +++ b/coverage/lib/pi.dart.func-sort-c.html @@ -0,0 +1,72 @@ + + + + + + + LCOV - lcov.info - lib/pi.dart - functions + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - lib - pi.dart (source / functions)HitTotalCoverage
Test:lcov.infoLines:131492.9 %
Date:2020-12-02 18:20:19Functions:00-
+
+ +
+ + + + + + +

Function Name Sort by function nameHit count Sort by hit count
+
+
+ + + +
Generated by: LCOV version 1.15
+
+ + + diff --git a/coverage/lib/pi.dart.func.html b/coverage/lib/pi.dart.func.html new file mode 100644 index 0000000..cf8ba89 --- /dev/null +++ b/coverage/lib/pi.dart.func.html @@ -0,0 +1,72 @@ + + + + + + + LCOV - lcov.info - lib/pi.dart - functions + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - lib - pi.dart (source / functions)HitTotalCoverage
Test:lcov.infoLines:131492.9 %
Date:2020-12-02 18:20:19Functions:00-
+
+ +
+ + + + + + +

Function Name Sort by function nameHit count Sort by hit count
+
+
+ + + +
Generated by: LCOV version 1.15
+
+ + + diff --git a/coverage/lib/pi.dart.gcov.html b/coverage/lib/pi.dart.gcov.html new file mode 100644 index 0000000..14b4037 --- /dev/null +++ b/coverage/lib/pi.dart.gcov.html @@ -0,0 +1,113 @@ + + + + + + + LCOV - lcov.info - lib/pi.dart + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - lib - pi.dart (source / functions)HitTotalCoverage
Test:lcov.infoLines:131492.9 %
Date:2020-12-02 18:20:19Functions:00-
+
+ + + + + + + + +

+
          Line data    Source code
+
+       1             : import 'package:calculator/calculator.dart';
+       2             : import 'package:flutter/material.dart';
+       3             : 
+       4             : class Pi extends StatelessWidget {
+       5           2 :   Pi({Key key, @required Calculator calculator})
+       6           0 :       : assert(calculator != null),
+       7             :         _calculator = calculator,
+       8           2 :         super(key: key);
+       9             : 
+      10             :   final Calculator _calculator;
+      11             : 
+      12           2 :   @override
+      13             :   Widget build(BuildContext context) {
+      14             :     String _result;
+      15             : 
+      16           2 :     return StreamBuilder<double>(
+      17           4 :       stream: _calculator.pi(),
+      18             :       initialData: null,
+      19           2 :       builder: (context, snapshot) {
+      20           2 :         if (snapshot.data != null) {
+      21           4 :           _result = snapshot.data.toString();
+      22             :         }
+      23           2 :         return Column(
+      24             :           crossAxisAlignment: CrossAxisAlignment.start,
+      25           2 :           children: [
+      26           2 :             Text(
+      27             :               _result != null
+      28             :                   ? 'The latest known value of pi is $_result'
+      29           2 :                   : 'Calculating pi...',
+      30           6 :               style: Theme.of(context).textTheme.headline5,
+      31             :             ),
+      32             :           ],
+      33             :         );
+      34             :       },
+      35             :     );
+      36             :   }
+      37             : }
+
+
+
+ + + + +
Generated by: LCOV version 1.15
+
+ + + diff --git a/coverage/lib/power_of_two.dart.func-sort-c.html b/coverage/lib/power_of_two.dart.func-sort-c.html new file mode 100644 index 0000000..977897b --- /dev/null +++ b/coverage/lib/power_of_two.dart.func-sort-c.html @@ -0,0 +1,72 @@ + + + + + + + LCOV - lcov.info - lib/power_of_two.dart - functions + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - lib - power_of_two.dart (source / functions)HitTotalCoverage
Test:lcov.infoLines:252889.3 %
Date:2020-12-02 18:20:19Functions:00-
+
+ +
+ + + + + + +

Function Name Sort by function nameHit count Sort by hit count
+
+
+ + + +
Generated by: LCOV version 1.15
+
+ + + diff --git a/coverage/lib/power_of_two.dart.func.html b/coverage/lib/power_of_two.dart.func.html new file mode 100644 index 0000000..bc10861 --- /dev/null +++ b/coverage/lib/power_of_two.dart.func.html @@ -0,0 +1,72 @@ + + + + + + + LCOV - lcov.info - lib/power_of_two.dart - functions + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - lib - power_of_two.dart (source / functions)HitTotalCoverage
Test:lcov.infoLines:252889.3 %
Date:2020-12-02 18:20:19Functions:00-
+
+ +
+ + + + + + +

Function Name Sort by function nameHit count Sort by hit count
+
+
+ + + +
Generated by: LCOV version 1.15
+
+ + + diff --git a/coverage/lib/power_of_two.dart.gcov.html b/coverage/lib/power_of_two.dart.gcov.html new file mode 100644 index 0000000..87d1085 --- /dev/null +++ b/coverage/lib/power_of_two.dart.gcov.html @@ -0,0 +1,146 @@ + + + + + + + LCOV - lcov.info - lib/power_of_two.dart + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - lib - power_of_two.dart (source / functions)HitTotalCoverage
Test:lcov.infoLines:252889.3 %
Date:2020-12-02 18:20:19Functions:00-
+
+ + + + + + + + +

+
          Line data    Source code
+
+       1             : import 'package:calculator/calculator.dart';
+       2             : import 'package:flutter/material.dart';
+       3             : 
+       4             : class PowerOfTwo extends StatefulWidget {
+       5           2 :   const PowerOfTwo({
+       6             :     Key key,
+       7             :     @required Calculator calculator,
+       8           0 :   })  : assert(calculator != null),
+       9             :         _calculator = calculator,
+      10           2 :         super(key: key);
+      11             : 
+      12             :   final Calculator _calculator;
+      13             : 
+      14           2 :   @override
+      15           2 :   State<StatefulWidget> createState() => _PowerOfTwoState();
+      16             : }
+      17             : 
+      18             : class _PowerOfTwoState extends State<PowerOfTwo> {
+      19             :   final _controller = TextEditingController();
+      20             : 
+      21             :   String _result;
+      22             : 
+      23           2 :   @override
+      24             :   void initState() {
+      25           2 :     super.initState();
+      26           6 :     _controller.addListener(_getResult);
+      27             :   }
+      28             : 
+      29           2 :   @override
+      30             :   void dispose() {
+      31           4 :     _controller.dispose();
+      32           2 :     super.dispose();
+      33             :   }
+      34             : 
+      35           2 :   @override
+      36             :   Widget build(BuildContext context) {
+      37           2 :     return Column(
+      38             :       crossAxisAlignment: CrossAxisAlignment.start,
+      39           2 :       children: [
+      40           2 :         TextFormField(
+      41             :           key: const Key('textField_powerOfTwo'),
+      42           2 :           controller: _controller,
+      43             :           keyboardType: TextInputType.number,
+      44             :         ),
+      45           2 :         Text(
+      46             :           'to the power of two',
+      47           6 :           style: Theme.of(context).textTheme.headline5,
+      48             :         ),
+      49           2 :         Text(
+      50           4 :           'is ${_result ?? '???'}',
+      51           6 :           style: Theme.of(context).textTheme.headline5,
+      52             :         ),
+      53             :       ],
+      54             :     );
+      55             :   }
+      56             : 
+      57           1 :   void _getResult() async {
+      58             :     try {
+      59           3 :       final input = double.tryParse(_controller.text);
+      60           4 :       final powerOfTwoResult = await widget._calculator.powerOfTwo(input);
+      61           2 :       setState(() {
+      62           2 :         _result = powerOfTwoResult.toString();
+      63             :       });
+      64             :     } catch (_) {
+      65           0 :       setState(() {
+      66           0 :         _result = null;
+      67             :       });
+      68             :     }
+      69             :   }
+      70             : }
+
+
+
+ + + + +
Generated by: LCOV version 1.15
+
+ + + diff --git a/coverage/lib/two_digit_operation.dart.func-sort-c.html b/coverage/lib/two_digit_operation.dart.func-sort-c.html new file mode 100644 index 0000000..5b12db9 --- /dev/null +++ b/coverage/lib/two_digit_operation.dart.func-sort-c.html @@ -0,0 +1,72 @@ + + + + + + + LCOV - lcov.info - lib/two_digit_operation.dart - functions + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - lib - two_digit_operation.dart (source / functions)HitTotalCoverage
Test:lcov.infoLines:555796.5 %
Date:2020-12-02 18:20:19Functions:00-
+
+ +
+ + + + + + +

Function Name Sort by function nameHit count Sort by hit count
+
+
+ + + +
Generated by: LCOV version 1.15
+
+ + + diff --git a/coverage/lib/two_digit_operation.dart.func.html b/coverage/lib/two_digit_operation.dart.func.html new file mode 100644 index 0000000..1a067aa --- /dev/null +++ b/coverage/lib/two_digit_operation.dart.func.html @@ -0,0 +1,72 @@ + + + + + + + LCOV - lcov.info - lib/two_digit_operation.dart - functions + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - lib - two_digit_operation.dart (source / functions)HitTotalCoverage
Test:lcov.infoLines:555796.5 %
Date:2020-12-02 18:20:19Functions:00-
+
+ +
+ + + + + + +

Function Name Sort by function nameHit count Sort by hit count
+
+
+ + + +
Generated by: LCOV version 1.15
+
+ + + diff --git a/coverage/lib/two_digit_operation.dart.gcov.html b/coverage/lib/two_digit_operation.dart.gcov.html new file mode 100644 index 0000000..1471d63 --- /dev/null +++ b/coverage/lib/two_digit_operation.dart.gcov.html @@ -0,0 +1,199 @@ + + + + + + + LCOV - lcov.info - lib/two_digit_operation.dart + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - lib - two_digit_operation.dart (source / functions)HitTotalCoverage
Test:lcov.infoLines:555796.5 %
Date:2020-12-02 18:20:19Functions:00-
+
+ + + + + + + + +

+
          Line data    Source code
+
+       1             : import 'package:calculator/calculator.dart';
+       2             : import 'package:calculator_app/models/models.dart';
+       3             : import 'package:flutter/material.dart';
+       4             : 
+       5             : class TwoDigitOperation extends StatefulWidget {
+       6           2 :   const TwoDigitOperation({
+       7             :     @required this.operation,
+       8             :     @required this.calculator,
+       9             :   });
+      10             : 
+      11             :   final Operations operation;
+      12             :   final Calculator calculator;
+      13             : 
+      14           2 :   @override
+      15           2 :   _TwoDigitOperationState createState() => _TwoDigitOperationState();
+      16             : }
+      17             : 
+      18             : class _TwoDigitOperationState extends State<TwoDigitOperation> {
+      19             :   final _topTextController = TextEditingController();
+      20             :   final _bottomTextController = TextEditingController();
+      21             : 
+      22             :   String _operationResult;
+      23             :   String _resultAfterAnimation;
+      24             : 
+      25           2 :   @override
+      26             :   void initState() {
+      27           6 :     _topTextController.addListener(_getResult);
+      28           6 :     _bottomTextController.addListener(_getResult);
+      29           2 :     super.initState();
+      30             :   }
+      31             : 
+      32           2 :   @override
+      33             :   void dispose() {
+      34           4 :     _topTextController?.dispose();
+      35           4 :     _bottomTextController.dispose();
+      36           2 :     super.dispose();
+      37             :   }
+      38             : 
+      39           2 :   @override
+      40             :   Widget build(BuildContext context) {
+      41           2 :     return Column(
+      42             :       crossAxisAlignment: CrossAxisAlignment.start,
+      43           2 :       children: [
+      44           2 :         TextFormField(
+      45          10 :           key: Key('textField_top_${widget.operation.description}'),
+      46           2 :           controller: _topTextController,
+      47             :           keyboardType: TextInputType.number,
+      48             :         ),
+      49           2 :         Row(
+      50           2 :           children: [
+      51           2 :             Padding(
+      52           2 :               padding: EdgeInsets.only(right: 8.0),
+      53           2 :               child: Text(
+      54           6 :                 widget.operation.description,
+      55           6 :                 style: Theme.of(context).textTheme.headline5,
+      56             :               ),
+      57             :             ),
+      58           2 :             Expanded(
+      59           2 :               child: TextFormField(
+      60          10 :                 key: Key('textField_bottom_${widget.operation.description}'),
+      61           2 :                 controller: _bottomTextController,
+      62             :                 keyboardType: TextInputType.number,
+      63             :               ),
+      64             :             ),
+      65             :           ],
+      66             :         ),
+      67           2 :         AnimatedContainer(
+      68           2 :           duration: Duration(seconds: 1),
+      69             :           curve: Curves.linear,
+      70             :           color:
+      71           2 :               _operationResult == null ? Colors.transparent : Colors.lightGreen,
+      72           2 :           onEnd: () {
+      73           4 :             setState(() {
+      74           4 :               _resultAfterAnimation = _operationResult;
+      75             :             });
+      76             :           },
+      77           2 :           child: Text(
+      78           4 :             'is ${_resultAfterAnimation ?? '???'}',
+      79           6 :             style: Theme.of(context).textTheme.headline5,
+      80             :           ),
+      81             :         ),
+      82             :       ],
+      83             :     );
+      84             :   }
+      85             : 
+      86           2 :   void _getResult() {
+      87           6 :     if (_topTextController.text.isNotEmpty &&
+      88           6 :         _bottomTextController.text.isNotEmpty) {
+      89             :       try {
+      90           2 :         final result = _calculate(
+      91           6 :           double.tryParse(_topTextController.text),
+      92           6 :           double.tryParse(_bottomTextController.text),
+      93             :         );
+      94           4 :         setState(() {
+      95           4 :           _operationResult = result.toString();
+      96             :         });
+      97             :       } catch (_) {
+      98           2 :         setState(() {
+      99           1 :           _operationResult = null;
+     100             :         });
+     101             :       }
+     102             :     }
+     103             :   }
+     104             : 
+     105           2 :   double _calculate(double top, double bottom) {
+     106             :     double result;
+     107           4 :     switch (widget.operation) {
+     108           2 :       case Operations.add:
+     109           6 :         result = widget.calculator.add(top, bottom);
+     110             :         break;
+     111           1 :       case Operations.substract:
+     112           0 :         result = widget.calculator.substract(top, bottom);
+     113             :         break;
+     114           1 :       case Operations.multiply:
+     115           0 :         result = widget.calculator.multiply(top, bottom);
+     116             :         break;
+     117           1 :       case Operations.divide:
+     118           3 :         result = widget.calculator.divide(top, bottom);
+     119             :         break;
+     120             :     }
+     121             :     return result;
+     122             :   }
+     123             : }
+
+
+
+ + + + +
Generated by: LCOV version 1.15
+
+ + + diff --git a/coverage/ruby.png b/coverage/ruby.png new file mode 100644 index 0000000000000000000000000000000000000000..991b6d4ec9e78be165e3ef757eed1aada287364d GIT binary patch literal 141 zcmeAS@N?(olHy`uVBq!ia0vp^j3CU&3?x-=hn)ga>?NMQuI!iC1^FceV#7`HfI^%F z9+AZi4BSE>%y{W;-5;PJOS+@4BLl<6e(pbstUx|nfKQ0)e^Y%R^MdiLxj>4`)5S5Q b;#P73kj=!v_*DHKNFRfztDnm{r-UW|iOwIS literal 0 HcmV?d00001 diff --git a/coverage/snow.png b/coverage/snow.png new file mode 100644 index 0000000000000000000000000000000000000000..2cdae107fceec6e7f02ac7acb4a34a82a540caa5 GIT binary patch literal 141 zcmeAS@N?(olHy`uVBq!ia0vp^j3CU&3?x-=hn)ga>?NMQuI!iC1^MM!lvI6;R0X`wF|Ns97GD8ntt^-nBo-U3d c6}OTTfNUlP#;5A{K>8RwUHx3vIVCg!071?oo&W#< literal 0 HcmV?d00001 diff --git a/coverage/updown.png b/coverage/updown.png new file mode 100644 index 0000000000000000000000000000000000000000..aa56a238b3e6c435265250f9266cd1b8caba0f20 GIT binary patch literal 117 zcmeAS@N?(olHy`uVBq!ia0vp^AT}Qd8;}%R+`Ae`*?77*hG?8mPH5^{)z4*}Q$iB}huR`+ literal 0 HcmV?d00001