{"$schema":"https://json.schemastore.org/sarif-2.1.0.json","version":"2.1.0","runs":[{"tool":{"driver":{"name":"codehealth","informationUri":"https://codehealth.canine.dev","rules":[{"id":"D1","name":"Cyclomatic Complexity","shortDescription":{"text":"Cyclomatic Complexity"},"helpUri":"https://codehealth.canine.dev/dimensions/D1"},{"id":"D2","name":"Cognitive Complexity","shortDescription":{"text":"Cognitive Complexity"},"helpUri":"https://codehealth.canine.dev/dimensions/D2"},{"id":"D3","name":"God Classes","shortDescription":{"text":"God Classes"},"helpUri":"https://codehealth.canine.dev/dimensions/D3"},{"id":"D4","name":"Code Duplication","shortDescription":{"text":"Code Duplication"},"helpUri":"https://codehealth.canine.dev/dimensions/D4"},{"id":"D5","name":"Coupling","shortDescription":{"text":"Coupling"},"helpUri":"https://codehealth.canine.dev/dimensions/D5"},{"id":"D6","name":"Cohesion (LCOM4)","shortDescription":{"text":"Cohesion (LCOM4)"},"helpUri":"https://codehealth.canine.dev/dimensions/D6"},{"id":"D13","name":"Secret Scanning","shortDescription":{"text":"Secret Scanning"},"helpUri":"https://codehealth.canine.dev/dimensions/D13","relationships":[{"target":{"id":"CWE-798","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"CWE-259","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"A07:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}},"kinds":["relevant"]}],"properties":{"cwe":["CWE-798","CWE-259"],"owasp":"A07:2025"}},{"id":"D14","name":"License Compliance","shortDescription":{"text":"License Compliance"},"helpUri":"https://codehealth.canine.dev/dimensions/D14"},{"id":"D15","name":"Churn \u00D7 Complexity Hotspots","shortDescription":{"text":"Churn \u00D7 Complexity Hotspots"},"helpUri":"https://codehealth.canine.dev/dimensions/D15"},{"id":"D16","name":"Bus Factor","shortDescription":{"text":"Bus Factor"},"helpUri":"https://codehealth.canine.dev/dimensions/D16"},{"id":"D17","name":"Explicit Debt","shortDescription":{"text":"Explicit Debt"},"helpUri":"https://codehealth.canine.dev/dimensions/D17"},{"id":"D19","name":"Documentation Quality","shortDescription":{"text":"Documentation Quality"},"helpUri":"https://codehealth.canine.dev/dimensions/D19"},{"id":"D26","name":"Project Cohesion","shortDescription":{"text":"Project Cohesion"},"helpUri":"https://codehealth.canine.dev/dimensions/D26"},{"id":"D28","name":"Secrets (history)","shortDescription":{"text":"Secrets (history)"},"helpUri":"https://codehealth.canine.dev/dimensions/D28","relationships":[{"target":{"id":"CWE-798","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"CWE-259","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"A07:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}},"kinds":["relevant"]}],"properties":{"cwe":["CWE-798","CWE-259"],"owasp":"A07:2025"}},{"id":"D29","name":"Static Analysis (SAST)","shortDescription":{"text":"Static Analysis (SAST)"},"helpUri":"https://codehealth.canine.dev/dimensions/D29","relationships":[{"target":{"id":"CWE-79","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"CWE-89","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"CWE-78","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"CWE-94","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"CWE-77","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"A05:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}},"kinds":["relevant"]}],"properties":{"cwe":["CWE-79","CWE-89","CWE-78","CWE-94","CWE-77"],"owasp":"A05:2025"}},{"id":"D34","name":"Knowledge Freshness","shortDescription":{"text":"Knowledge Freshness"},"helpUri":"https://codehealth.canine.dev/dimensions/D34"},{"id":"D35","name":"Change Coupling","shortDescription":{"text":"Change Coupling"},"helpUri":"https://codehealth.canine.dev/dimensions/D35"},{"id":"D44","name":"Platform End-of-Life","shortDescription":{"text":"Platform End-of-Life"},"helpUri":"https://codehealth.canine.dev/dimensions/D44"},{"id":"AX1","name":"Captive dependencies","shortDescription":{"text":"Captive dependencies"},"helpUri":"https://codehealth.canine.dev/dimensions/AX1"},{"id":"AX10","name":"Code composition","shortDescription":{"text":"Code composition"},"helpUri":"https://codehealth.canine.dev/dimensions/AX10"},{"id":"AX3","name":"Project dependency cycles","shortDescription":{"text":"Project dependency cycles"},"helpUri":"https://codehealth.canine.dev/dimensions/AX3"},{"id":"AX4","name":"Dependency direction","shortDescription":{"text":"Dependency direction"},"helpUri":"https://codehealth.canine.dev/dimensions/AX4"},{"id":"AX9","name":"CQS / query purity","shortDescription":{"text":"CQS / query purity"},"helpUri":"https://codehealth.canine.dev/dimensions/AX9"},{"id":"AXB1","name":"Runtime evidence locked \u2014 no reproducible boot","shortDescription":{"text":"Runtime evidence locked \u2014 no reproducible boot"},"helpUri":"https://codehealth.canine.dev/dimensions/AXB1"},{"id":"ED5","name":"Idempotency","shortDescription":{"text":"Idempotency"},"helpUri":"https://codehealth.canine.dev/dimensions/ED5"},{"id":"GD1","name":"Unfinished \u0026 placeholder code","shortDescription":{"text":"Unfinished \u0026 placeholder code"},"helpUri":"https://codehealth.canine.dev/dimensions/GD1"},{"id":"IC1","name":"Incompleteness \u0026 stubs","shortDescription":{"text":"Incompleteness \u0026 stubs"},"helpUri":"https://codehealth.canine.dev/dimensions/IC1"},{"id":"M1","name":"Documentation (README)","shortDescription":{"text":"Documentation (README)"},"helpUri":"https://codehealth.canine.dev/dimensions/M1"},{"id":"M2","name":"Architecture documentation","shortDescription":{"text":"Architecture documentation"},"helpUri":"https://codehealth.canine.dev/dimensions/M2"},{"id":"M3","name":"Folder \u0026 project structure","shortDescription":{"text":"Folder \u0026 project structure"},"helpUri":"https://codehealth.canine.dev/dimensions/M3"},{"id":"M4","name":"Documentation accuracy","shortDescription":{"text":"Documentation accuracy"},"helpUri":"https://codehealth.canine.dev/dimensions/M4"},{"id":"P1","name":"CI/CD gates","shortDescription":{"text":"CI/CD gates"},"helpUri":"https://codehealth.canine.dev/dimensions/P1"},{"id":"P10","name":"Library API \u0026 versioning","shortDescription":{"text":"Library API \u0026 versioning"},"helpUri":"https://codehealth.canine.dev/dimensions/P10"},{"id":"P3","name":"Security \u0026 performance tooling","shortDescription":{"text":"Security \u0026 performance tooling"},"helpUri":"https://codehealth.canine.dev/dimensions/P3"},{"id":"P6","name":"Release Hygiene","shortDescription":{"text":"Release Hygiene"},"helpUri":"https://codehealth.canine.dev/dimensions/P6"},{"id":"PF3","name":"Async \u0026 latency hygiene","shortDescription":{"text":"Async \u0026 latency hygiene"},"helpUri":"https://codehealth.canine.dev/dimensions/PF3"},{"id":"X1","name":"Async correctness","shortDescription":{"text":"Async correctness"},"helpUri":"https://codehealth.canine.dev/dimensions/X1"},{"id":"X10","name":"Duplicated predicate","shortDescription":{"text":"Duplicated predicate"},"helpUri":"https://codehealth.canine.dev/dimensions/X10"},{"id":"X12","name":"Unreachable branch","shortDescription":{"text":"Unreachable branch"},"helpUri":"https://codehealth.canine.dev/dimensions/X12"},{"id":"X13","name":"Undrained process stream","shortDescription":{"text":"Undrained process stream"},"helpUri":"https://codehealth.canine.dev/dimensions/X13"},{"id":"X14","name":"Bypassable address classification","shortDescription":{"text":"Bypassable address classification"},"helpUri":"https://codehealth.canine.dev/dimensions/X14"},{"id":"X15","name":"Unvalidated length from an untrusted reader","shortDescription":{"text":"Unvalidated length from an untrusted reader"},"helpUri":"https://codehealth.canine.dev/dimensions/X15"},{"id":"X16","name":"Unfloored truncation loop","shortDescription":{"text":"Unfloored truncation loop"},"helpUri":"https://codehealth.canine.dev/dimensions/X16"},{"id":"X17","name":"Uncapped recursion over a caller-supplied document","shortDescription":{"text":"Uncapped recursion over a caller-supplied document"},"helpUri":"https://codehealth.canine.dev/dimensions/X17"},{"id":"X18","name":"Disposal-pattern correctness","shortDescription":{"text":"Disposal-pattern correctness"},"helpUri":"https://codehealth.canine.dev/dimensions/X18"},{"id":"X19","name":"Unrestored process-global state","shortDescription":{"text":"Unrestored process-global state"},"helpUri":"https://codehealth.canine.dev/dimensions/X19"},{"id":"X2","name":"Cancellation propagation","shortDescription":{"text":"Cancellation propagation"},"helpUri":"https://codehealth.canine.dev/dimensions/X2"},{"id":"X20","name":"Mistyped argument guard","shortDescription":{"text":"Mistyped argument guard"},"helpUri":"https://codehealth.canine.dev/dimensions/X20"},{"id":"X21","name":"Side-effecting pattern guard","shortDescription":{"text":"Side-effecting pattern guard"},"helpUri":"https://codehealth.canine.dev/dimensions/X21"},{"id":"X22","name":"Contradicted release guard","shortDescription":{"text":"Contradicted release guard"},"helpUri":"https://codehealth.canine.dev/dimensions/X22"},{"id":"X23","name":"Unguarded diagnostic materialisation","shortDescription":{"text":"Unguarded diagnostic materialisation"},"helpUri":"https://codehealth.canine.dev/dimensions/X23"},{"id":"X25","name":"Inert configuration knob","shortDescription":{"text":"Inert configuration knob"},"helpUri":"https://codehealth.canine.dev/dimensions/X25"},{"id":"X26","name":"Unsynchronised callback handoff","shortDescription":{"text":"Unsynchronised callback handoff"},"helpUri":"https://codehealth.canine.dev/dimensions/X26"},{"id":"X27","name":"Collection changed while being enumerated","shortDescription":{"text":"Collection changed while being enumerated"},"helpUri":"https://codehealth.canine.dev/dimensions/X27"},{"id":"X28","name":"Index access outside its own emptiness guard","shortDescription":{"text":"Index access outside its own emptiness guard"},"helpUri":"https://codehealth.canine.dev/dimensions/X28"},{"id":"X29","name":"Per-element action decided by a fixed element","shortDescription":{"text":"Per-element action decided by a fixed element"},"helpUri":"https://codehealth.canine.dev/dimensions/X29"},{"id":"X3","name":"Exception handling","shortDescription":{"text":"Exception handling"},"helpUri":"https://codehealth.canine.dev/dimensions/X3"},{"id":"X30","name":"Support guard that admits what it rejects","shortDescription":{"text":"Support guard that admits what it rejects"},"helpUri":"https://codehealth.canine.dev/dimensions/X30"},{"id":"X32","name":"Type resolved by simple name across every loaded assembly","shortDescription":{"text":"Type resolved by simple name across every loaded assembly"},"helpUri":"https://codehealth.canine.dev/dimensions/X32"},{"id":"X4","name":"Structured logging","shortDescription":{"text":"Structured logging"},"helpUri":"https://codehealth.canine.dev/dimensions/X4"},{"id":"X5","name":"Nullable reference types","shortDescription":{"text":"Nullable reference types"},"helpUri":"https://codehealth.canine.dev/dimensions/X5"},{"id":"X6","name":"Hand-rolled structured-format parsing","shortDescription":{"text":"Hand-rolled structured-format parsing"},"helpUri":"https://codehealth.canine.dev/dimensions/X6"},{"id":"X7","name":"Silent fallback defaults","shortDescription":{"text":"Silent fallback defaults"},"helpUri":"https://codehealth.canine.dev/dimensions/X7"},{"id":"X9","name":"Subsumed condition operand","shortDescription":{"text":"Subsumed condition operand"},"helpUri":"https://codehealth.canine.dev/dimensions/X9"}]}},"results":[{"ruleId":"D1","level":"warning","message":{"text":"_ChatAnimatedListState._handlePagination (cyclomatic 46): _ChatAnimatedListState._handlePagination has cyclomatic complexity 46 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This file is where this pass\u0027s cyclomatic complexity CONCENTRATES: packages/flutter_chat_ui/lib/src/chat_animated_list/chat_animated_list.dart holds 3 of the 7 methods over the threshold \u2014 including the worst \u2014 and 42 of the 55 points over it (76%), 8.4\u00D7 the next-largest file (packages/flutter_link_previewer/lib/src/link_preview.dart at 5). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"packages/flutter_chat_ui/lib/src/chat_animated_list/chat_animated_list.dart"},"region":{"startLine":797}}}],"partialFingerprints":{"codehealthFindingId/v1":"b8096848a4fa2ed862e9efc4c8e17e02d6a628998f41f5c864b8344d5c045ca0"}},{"ruleId":"D1","level":"warning","message":{"text":"_ChatAnimatedListState.build (cyclomatic 24): _ChatAnimatedListState.build has cyclomatic complexity 24 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This file is where this pass\u0027s cyclomatic complexity CONCENTRATES: packages/flutter_chat_ui/lib/src/chat_animated_list/chat_animated_list.dart holds 3 of the 7 methods over the threshold \u2014 including the worst \u2014 and 42 of the 55 points over it (76%), 8.4\u00D7 the next-largest file (packages/flutter_link_previewer/lib/src/link_preview.dart at 5). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"packages/flutter_chat_ui/lib/src/chat_animated_list/chat_animated_list.dart"},"region":{"startLine":385}}}],"partialFingerprints":{"codehealthFindingId/v1":"96cd21db4b906b6a7d8865002abef79bdc24fa6e0813e2009389acd2b7f22302"}},{"ruleId":"D1","level":"warning","message":{"text":"_LinkPreviewState._buildPreviewLayout (cyclomatic 20): _LinkPreviewState._buildPreviewLayout has cyclomatic complexity 20 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"packages/flutter_link_previewer/lib/src/link_preview.dart"},"region":{"startLine":245}}}],"partialFingerprints":{"codehealthFindingId/v1":"1e648565aaebe50997e9e5ccf164f63a3abd04dd3036e1e2ac373e8ff1015cbe"}},{"ruleId":"D1","level":"warning","message":{"text":"_ComposerState.build (cyclomatic 19): _ComposerState.build has cyclomatic complexity 19 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"packages/flutter_chat_ui/lib/src/composer.dart"},"region":{"startLine":255}}}],"partialFingerprints":{"codehealthFindingId/v1":"652d8e9c5fcfcb3a54fe285ce6504a8893e14459713af2241b77b6e7d302fc29"}},{"ruleId":"D1","level":"warning","message":{"text":"_FlyerChatImageMessageState._buildStack (cyclomatic 18): _FlyerChatImageMessageState._buildStack has cyclomatic complexity 18 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"packages/flyer_chat_image_message/lib/src/flyer_chat_image_message.dart"},"region":{"startLine":247}}}],"partialFingerprints":{"codehealthFindingId/v1":"d7b37d5eeb271f80711ee76e45391acbbf6c747757095b8307fb6df8788093a8"}},{"ruleId":"D1","level":"warning","message":{"text":"_ChatAnimatedListState._subsequentScrollToEnd (cyclomatic 17): _ChatAnimatedListState._subsequentScrollToEnd has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This file is where this pass\u0027s cyclomatic complexity CONCENTRATES: packages/flutter_chat_ui/lib/src/chat_animated_list/chat_animated_list.dart holds 3 of the 7 methods over the threshold \u2014 including the worst \u2014 and 42 of the 55 points over it (76%), 8.4\u00D7 the next-largest file (packages/flutter_link_previewer/lib/src/link_preview.dart at 5). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"packages/flutter_chat_ui/lib/src/chat_animated_list/chat_animated_list.dart"},"region":{"startLine":615}}}],"partialFingerprints":{"codehealthFindingId/v1":"2156bfa8cea9e37078957d2b927b62561841d6033e546cb6ab5a5604b2cebb9c"}},{"ruleId":"D1","level":"warning","message":{"text":"_FlyerChatTextStreamMessageState._updateSegmentsFromState (cyclomatic 16): _FlyerChatTextStreamMessageState._updateSegmentsFromState has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"packages/flyer_chat_text_stream_message/lib/src/flyer_chat_text_stream_message.dart"},"region":{"startLine":170}}}],"partialFingerprints":{"codehealthFindingId/v1":"d3747308e69c75a5d284031593ed60f40a0d8292013ee339a509dd178b11d5ad"}},{"ruleId":"D2","level":"warning","message":{"text":"_ChatAnimatedListState._handlePagination (cognitive 113): _ChatAnimatedListState._handlePagination has cognitive complexity 113 (threshold 15). Drivers by points: if/else 26 (86 pts), boolean chains 14, error handling 2 (8 pts), ternaries 3 (5 pts) (nesting depth added 68). To reduce it, flatten the nesting: this score is depth rather than breadth \u2014 most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language\u0027s equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function. This file is where this pass\u0027s cognitive complexity CONCENTRATES: packages/flutter_chat_ui/lib/src/chat_animated_list/chat_animated_list.dart holds 3 of the 10 methods over the threshold \u2014 including the worst \u2014 and 137 of the 181 points over it (76%), 7.2\u00D7 the next-largest file (packages/flyer_chat_text_stream_message/lib/src/flyer_chat_text_stream_message.dart at 19). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"packages/flutter_chat_ui/lib/src/chat_animated_list/chat_animated_list.dart"},"region":{"startLine":797}}}],"partialFingerprints":{"codehealthFindingId/v1":"1a9fbe7584f215b5fc62d542a19fbb340c0e096c22e32e35e9b896c9912d0dfc"}},{"ruleId":"D2","level":"warning","message":{"text":"_ChatAnimatedListState.build (cognitive 44): _ChatAnimatedListState.build has cognitive complexity 44 (threshold 15). Drivers by points: if/else 23 (39 pts), ternaries 2 (5 pts) (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This file is where this pass\u0027s cognitive complexity CONCENTRATES: packages/flutter_chat_ui/lib/src/chat_animated_list/chat_animated_list.dart holds 3 of the 10 methods over the threshold \u2014 including the worst \u2014 and 137 of the 181 points over it (76%), 7.2\u00D7 the next-largest file (packages/flyer_chat_text_stream_message/lib/src/flyer_chat_text_stream_message.dart at 19). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"packages/flutter_chat_ui/lib/src/chat_animated_list/chat_animated_list.dart"},"region":{"startLine":385}}}],"partialFingerprints":{"codehealthFindingId/v1":"de693eed4ff876595830babf78ba80358a2c434293200ea7fef0b3596721ffc9"}},{"ruleId":"D2","level":"warning","message":{"text":"_FlyerChatTextStreamMessageState._updateSegmentsFromState (cognitive 32): _FlyerChatTextStreamMessageState._updateSegmentsFromState has cognitive complexity 32 (threshold 15). Drivers by points: if/else 15 (30 pts), boolean chains 2 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"packages/flyer_chat_text_stream_message/lib/src/flyer_chat_text_stream_message.dart"},"region":{"startLine":170}}}],"partialFingerprints":{"codehealthFindingId/v1":"efe4f2ba378c983f0849a01210894dcb4725076aa3c7a99b267539714fd2ccef"}},{"ruleId":"D2","level":"warning","message":{"text":"_ChatAnimatedListState._subsequentScrollToEnd (cognitive 25): _ChatAnimatedListState._subsequentScrollToEnd has cognitive complexity 25 (threshold 15). Drivers by points: if/else 10 (14 pts), boolean chains 8, ternaries 1 (3 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This file is where this pass\u0027s cognitive complexity CONCENTRATES: packages/flutter_chat_ui/lib/src/chat_animated_list/chat_animated_list.dart holds 3 of the 10 methods over the threshold \u2014 including the worst \u2014 and 137 of the 181 points over it (76%), 7.2\u00D7 the next-largest file (packages/flyer_chat_text_stream_message/lib/src/flyer_chat_text_stream_message.dart at 19). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"packages/flutter_chat_ui/lib/src/chat_animated_list/chat_animated_list.dart"},"region":{"startLine":615}}}],"partialFingerprints":{"codehealthFindingId/v1":"8465212e2d933bac3253192f857c85850e053d8e7c9bde43a7a392ee171f494d"}},{"ruleId":"D2","level":"warning","message":{"text":"_LinkPreviewState._buildPreviewLayout (cognitive 25): _LinkPreviewState._buildPreviewLayout has cognitive complexity 25 (threshold 15). Drivers by points: ternaries 8 (11 pts), if/else 8 (10 pts), boolean chains 4 (nesting depth added 5). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"packages/flutter_link_previewer/lib/src/link_preview.dart"},"region":{"startLine":245}}}],"partialFingerprints":{"codehealthFindingId/v1":"c0b6cf9896be188489bb3cc775dd5b45d54ff37fb1389c6c5db7754de4cd2269"}},{"ruleId":"D2","level":"warning","message":{"text":"_ComposerState.build (cognitive 22): _ComposerState.build has cognitive complexity 22 (threshold 15). Drivers by points: ternaries 7 (9 pts), boolean chains 8, if/else 4 (5 pts) (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"packages/flutter_chat_ui/lib/src/composer.dart"},"region":{"startLine":255}}}],"partialFingerprints":{"codehealthFindingId/v1":"60c0ae112fa68b0f29eaa87fbc7ae9385ed51a7fe71fd33e146ed0eb04465173"}},{"ruleId":"D2","level":"warning","message":{"text":"_FlyerChatImageMessageState._buildStack (cognitive 20): _FlyerChatImageMessageState._buildStack has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (8 pts), ternaries 5 (7 pts), boolean chains 5 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"packages/flyer_chat_image_message/lib/src/flyer_chat_image_message.dart"},"region":{"startLine":247}}}],"partialFingerprints":{"codehealthFindingId/v1":"21075949eb924ea0b1a96c2bd4f50b2afa634a9430e8eb7050dfa5a342a55d43"}},{"ruleId":"D2","level":"warning","message":{"text":"CrossCache.downloadAndSave (cognitive 17): CrossCache.downloadAndSave has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (8 pts), error handling 3 (5 pts), boolean chains 4 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"packages/cross_cache/lib/src/cross_cache.dart"},"region":{"startLine":38}}}],"partialFingerprints":{"codehealthFindingId/v1":"34d95971de741e864fe251747dd7db2dee4d6933473eaf2690e8f27ca8203f63"}},{"ruleId":"D2","level":"warning","message":{"text":"_FlyerChatTextStreamMessageState._buildTextContent (cognitive 17): _FlyerChatTextStreamMessageState._buildTextContent has cognitive complexity 17 (threshold 15). Drivers by points: if/else 10 (15 pts), ternaries 1 (2 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"packages/flyer_chat_text_stream_message/lib/src/flyer_chat_text_stream_message.dart"},"region":{"startLine":341}}}],"partialFingerprints":{"codehealthFindingId/v1":"ed7e232b0daa1213ac59ebcf9862279c8e382c2a35626c48f214fb1a803a52e7"}},{"ruleId":"D2","level":"warning","message":{"text":"ChatMessage.build (cognitive 16): ChatMessage.build has cognitive complexity 16 (threshold 15). Drivers by points: ternaries 8 (11 pts), if/else 4 (5 pts) (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"packages/flutter_chat_ui/lib/src/chat_message/chat_message.dart"},"region":{"startLine":123}}}],"partialFingerprints":{"codehealthFindingId/v1":"bf6b7dfc83ca26d16f2e178f28789ab06f3f99ea448227b914097778b60b28ac"}},{"ruleId":"D3","level":"warning","message":{"text":"ClassTooLong: _ChatAnimatedListState: ClassTooLong \u2014 661 significant lines (blank, comment-only and punctuation-only lines excluded), 31 methods. The bar is 400 significant lines; this is 261 over it, 1.65\u00D7 the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"packages/flutter_chat_ui/lib/src/chat_animated_list/chat_animated_list.dart"},"region":{"startLine":198}}}],"partialFingerprints":{"codehealthFindingId/v1":"7fee403609f107ee8f5937e6ca85a54c7a1124a9595842f6f4690c6f381af026"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: chat_animated_list/chat_animated_list.dart: FileTooLong \u2014 740 significant lines (blank, comment-only and punctuation-only lines excluded), about 89% of them inside a single declaration: _ChatAnimatedListState (199-1374). The bar is 500 significant lines; this is 240 over it, 1.48\u00D7 the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body \u2014 the parts that share the same inputs and are named together \u2014 into its own unit in a sibling file, and have the original call them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"packages/flutter_chat_ui/lib/src/chat_animated_list/chat_animated_list.dart"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"666f01eac1df663f3eafdbbdf0a903bb64facb82e007cb2e4acbba7223680fe5"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: _LinkPreviewState._buildPreviewLayout: MethodTooLong \u2014 _buildPreviewLayout runs 127 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 27 over it, 1.27\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"packages/flutter_link_previewer/lib/src/link_preview.dart"},"region":{"startLine":245}}}],"partialFingerprints":{"codehealthFindingId/v1":"2af8604163a46a277b7dcfd1b2fd52046f04239503d753743361a8b3af14ca74"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: _ComposerState.build: MethodTooLong \u2014 build runs 118 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 18 over it, 1.18\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"packages/flutter_chat_ui/lib/src/composer.dart"},"region":{"startLine":255}}}],"partialFingerprints":{"codehealthFindingId/v1":"05cd645b93624921dfb67114c0c63fade9b19668593bbdd36a963f0fd0660742"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: _ChatAnimatedListState._handlePagination: MethodTooLong \u2014 _handlePagination runs 117 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 17 over it, 1.17\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"packages/flutter_chat_ui/lib/src/chat_animated_list/chat_animated_list.dart"},"region":{"startLine":797}}}],"partialFingerprints":{"codehealthFindingId/v1":"abefffe5dfc4de8d57979ead90f2c8385cf219da2807f8a7efe36ea0cc958d36"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: _ChatAnimatedListState: TooManyMethods \u2014 31 methods. The bar is 30 methods; this is 1 over it, 1.03\u00D7 the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"packages/flutter_chat_ui/lib/src/chat_animated_list/chat_animated_list.dart"},"region":{"startLine":198}}}],"partialFingerprints":{"codehealthFindingId/v1":"994bcf61777e41697b58ca65362194a9dd755cfdaeaee1c9330c93628a32fb16"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: _ChatAnimatedListState.build: MethodTooLong \u2014 build runs 103 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 3 over it, 1.03\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"packages/flutter_chat_ui/lib/src/chat_animated_list/chat_animated_list.dart"},"region":{"startLine":385}}}],"partialFingerprints":{"codehealthFindingId/v1":"884fefa996ccb7d82a2dc277c321a1e1b30c69557930d03244692e5354278718"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (5 members, 50\u002B identical tokens): packages/flutter_chat_ui/lib/src/simple_text_message.dart:281-305 | packages/flyer_chat_file_message/lib/src/flyer_chat_file_message.dart:317-341 | packages/flyer_chat_image_message/lib/src/flyer_chat_image_message.dart:418-453 | packages/flyer_chat_text_message/lib/src/flyer_chat_text_message.dart:368-392 | packages/flyer_chat_text_stream_message/lib/src/flyer_chat_text_stream_message.dart:526-550 \u2014 These 5 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below \u2014 it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 5 times. The repair is at the members\u0027 grain \u2014 factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 5 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"packages/flutter_chat_ui/lib/src/simple_text_message.dart"},"region":{"startLine":281}}}],"partialFingerprints":{"codehealthFindingId/v1":"59cdfbf41e32f68ee8ddeabd4abc871248b7f52c0e190b39575d44a566949eba"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (4 members, 50\u002B identical tokens): packages/flutter_chat_ui/lib/src/simple_text_message.dart:95-166 | packages/flyer_chat_file_message/lib/src/flyer_chat_file_message.dart:103-191 | packages/flyer_chat_text_message/lib/src/flyer_chat_text_message.dart:154-244 | packages/flyer_chat_text_stream_message/lib/src/flyer_chat_text_stream_message.dart:294-339 \u2014 These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below \u2014 it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members\u0027 grain \u2014 factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"packages/flutter_chat_ui/lib/src/simple_text_message.dart"},"region":{"startLine":95}}}],"partialFingerprints":{"codehealthFindingId/v1":"a10eabf2125a080f2ded8148bda1a89f3f817fea1da2ec6125876664cf1e67f3"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (59 corresponding lines): packages/flutter_chat_ui/lib/src/simple_text_message.dart:168-226 | packages/flyer_chat_text_message/lib/src/flyer_chat_text_message.dart:246-304 \u2014 These two members are one piece of code written twice and then edited apart: 59 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"packages/flutter_chat_ui/lib/src/simple_text_message.dart"},"region":{"startLine":168}}}],"partialFingerprints":{"codehealthFindingId/v1":"6a05e8227004d283de221a7051d03d62db08393222ba8bcf01137d6f2374d368"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (31 corresponding lines): packages/flutter_chat_core/lib/src/chat_controller/in_memory_chat_controller.dart:51-81 | packages/flutter_chat_core/lib/src/chat_controller/in_memory_chat_controller.dart:83-118 \u2014 These two members are one piece of code written twice and then edited apart: 31 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"packages/flutter_chat_core/lib/src/chat_controller/in_memory_chat_controller.dart"},"region":{"startLine":51}}}],"partialFingerprints":{"codehealthFindingId/v1":"11de494f8869c1f68567a28d7aee1a347645b501450331fd5921f8dbc3fe81d9"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (47 corresponding lines): packages/flutter_chat_ui/lib/src/chat_animated_list/chat_animated_list.dart:1071-1117 | packages/flutter_chat_ui/lib/src/chat_animated_list/chat_animated_list.dart:1119-1182 \u2014 These two members are one piece of code written twice and then edited apart: 47 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"packages/flutter_chat_ui/lib/src/chat_animated_list/chat_animated_list.dart"},"region":{"startLine":1071}}}],"partialFingerprints":{"codehealthFindingId/v1":"1a01760954bba3b3ee260c1c18d6220dd0f913106f5d937cb363fa784950c4c5"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (22 corresponding lines): packages/flutter_chat_ui/lib/src/avatar.dart:42-63 | packages/flutter_chat_ui/lib/src/username.dart:20-41 \u2014 These two members are one piece of code written twice and then edited apart: 22 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"packages/flutter_chat_ui/lib/src/avatar.dart"},"region":{"startLine":42}}}],"partialFingerprints":{"codehealthFindingId/v1":"4b973cab58131d47af1c22e9923f4db5cd7c6027c2901f155a125eb2653d90b0"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 14\u002B corresponding lines): examples/flyer_chat/lib/hive_chat_controller.dart:31-44 | examples/flyer_chat/lib/hive_chat_controller.dart:46-64 | packages/flutter_chat_core/lib/src/chat_controller/in_memory_chat_controller.dart:136-155 \u2014 These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 14 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"examples/flyer_chat/lib/hive_chat_controller.dart"},"region":{"startLine":31}}}],"partialFingerprints":{"codehealthFindingId/v1":"8848081080d8520b75b91e9c61e3ad2bc1155f3dc046b16bcb11f6b573c1f93e"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 9\u002B corresponding lines): packages/cross_cache/lib/src/cache/io.dart:33-45 | packages/cross_cache/lib/src/cache/io.dart:47-55 | packages/cross_cache/lib/src/cache/io.dart:57-67 \u2014 These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 9 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"packages/cross_cache/lib/src/cache/io.dart"},"region":{"startLine":33}}}],"partialFingerprints":{"codehealthFindingId/v1":"e850130ab37f6932cecc7037a2182e649f89c31837cb74bf9fdb79b167ea510d"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (14 corresponding lines): packages/flutter_chat_ui/lib/src/chat_animated_list/chat_animated_list.dart:547-560 | packages/flutter_chat_ui/lib/src/chat_animated_list/chat_animated_list.dart:562-575 \u2014 These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"packages/flutter_chat_ui/lib/src/chat_animated_list/chat_animated_list.dart"},"region":{"startLine":547}}}],"partialFingerprints":{"codehealthFindingId/v1":"834a0175a674c60334e4777c718c52b5ea057070708af8fc135747e2c904624d"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (9 corresponding lines): packages/cross_cache/lib/src/cache/html.dart:61-69 | packages/cross_cache/lib/src/cache/html.dart:89-99 \u2014 These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"packages/cross_cache/lib/src/cache/html.dart"},"region":{"startLine":61}}}],"partialFingerprints":{"codehealthFindingId/v1":"f0fa50b72b3a1fb847fa6da40669637215eef836f2474f49a16c622a5e95500a"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (10 corresponding lines): examples/flyer_chat/lib/gemini.dart:471-480 | packages/flutter_chat_ui/lib/src/composer.dart:218-227 \u2014 These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"examples/flyer_chat/lib/gemini.dart"},"region":{"startLine":471}}}],"partialFingerprints":{"codehealthFindingId/v1":"50708d67e772a8c9317f792a295d813d3d243c25202a5451ed24b02324b28637"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (50 lines \u00D7 2): packages/flutter_chat_ui/lib/src/simple_text_message.dart:168-217 | packages/flyer_chat_text_message/lib/src/flyer_chat_text_message.dart:246-295 \u2014 before extracting anything, compare \u0060packages/flutter_chat_ui/lib/src/simple_text_message.dart\u0060 and \u0060packages/flyer_chat_text_message/lib/src/flyer_chat_text_message.dart\u0060 as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 206 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060packages/flutter_chat_ui/lib/src/simple_text_message.dart:168\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"packages/flutter_chat_ui/lib/src/simple_text_message.dart"},"region":{"startLine":168}}}],"partialFingerprints":{"codehealthFindingId/v1":"c07ff4549746b961f9282d9c4ed575dcb86335260fc065b9fe47c92f6a6f9c68"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (39 lines \u00D7 2): packages/flutter_chat_ui/lib/src/simple_text_message.dart:128-166 | packages/flyer_chat_text_message/lib/src/flyer_chat_text_message.dart:206-244 \u2014 before extracting anything, compare \u0060packages/flutter_chat_ui/lib/src/simple_text_message.dart\u0060 and \u0060packages/flyer_chat_text_message/lib/src/flyer_chat_text_message.dart\u0060 as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 206 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060packages/flutter_chat_ui/lib/src/simple_text_message.dart:128\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"packages/flutter_chat_ui/lib/src/simple_text_message.dart"},"region":{"startLine":128}}}],"partialFingerprints":{"codehealthFindingId/v1":"49472f4f3bbf9888666d0984bf94c4b6dd4f48677bb0b00ef9f3d707543e52f2"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (25 lines \u00D7 4): packages/flutter_chat_ui/lib/src/simple_text_message.dart:281-305 | packages/flyer_chat_file_message/lib/src/flyer_chat_file_message.dart:317-341 | packages/flyer_chat_text_message/lib/src/flyer_chat_text_message.dart:368-392 | packages/flyer_chat_text_stream_message/lib/src/flyer_chat_text_stream_message.dart:526-550 \u2014 before extracting anything, compare \u0060packages/flutter_chat_ui/lib/src/simple_text_message.dart\u0060 and \u0060packages/flyer_chat_file_message/lib/src/flyer_chat_file_message.dart\u0060 as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 95 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"packages/flutter_chat_ui/lib/src/simple_text_message.dart"},"region":{"startLine":281}}}],"partialFingerprints":{"codehealthFindingId/v1":"e3d10a983dd1bd1951de3acacf9b4f4196bc7d4d670d61920371eb0d90cd8c1a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (20 lines \u00D7 3): packages/flutter_chat_ui/lib/src/simple_text_message.dart:207-226 | packages/flyer_chat_file_message/lib/src/flyer_chat_file_message.dart:211-230 | packages/flyer_chat_text_message/lib/src/flyer_chat_text_message.dart:285-304 \u2014 before extracting anything, compare \u0060packages/flutter_chat_ui/lib/src/simple_text_message.dart\u0060 and \u0060packages/flyer_chat_file_message/lib/src/flyer_chat_file_message.dart\u0060 as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 95 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060packages/flutter_chat_ui/lib/src/simple_text_message.dart:207\u0060 it runs out through the closing brace of the declaration holding it \u2014 the window is that declaration\u0027s tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"packages/flutter_chat_ui/lib/src/simple_text_message.dart"},"region":{"startLine":207}}}],"partialFingerprints":{"codehealthFindingId/v1":"ab52e74a0a7ac11ab5f213b3c3770ecc834a3bd8391838a26349221a351762b7"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16\u201319 lines \u00D7 5): packages/flutter_chat_ui/lib/src/simple_text_message.dart:286-301 | packages/flyer_chat_file_message/lib/src/flyer_chat_file_message.dart:322-337 | packages/flyer_chat_image_message/lib/src/flyer_chat_image_message.dart:429-447 | packages/flyer_chat_text_message/lib/src/flyer_chat_text_message.dart:373-388 | packages/flyer_chat_text_stream_message/lib/src/flyer_chat_text_stream_message.dart:531-546 \u2014 before extracting anything, compare \u0060packages/flutter_chat_ui/lib/src/simple_text_message.dart\u0060 and \u0060packages/flyer_chat_file_message/lib/src/flyer_chat_file_message.dart\u0060 as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 95 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060packages/flutter_chat_ui/lib/src/simple_text_message.dart:286\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"packages/flutter_chat_ui/lib/src/simple_text_message.dart"},"region":{"startLine":286}}}],"partialFingerprints":{"codehealthFindingId/v1":"358dccae63182f595a62c55c2ad91adf1a84d87cf36d6202cd9218017406be95"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (19 lines \u00D7 2): packages/flutter_chat_ui/lib/src/chat_animated_list/chat_animated_list.dart:837-855 | packages/flutter_chat_ui/lib/src/chat_animated_list/chat_animated_list.dart:935-953 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060packages/flutter_chat_ui/lib/src/chat_animated_list/chat_animated_list.dart:837\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"packages/flutter_chat_ui/lib/src/chat_animated_list/chat_animated_list.dart"},"region":{"startLine":837}}}],"partialFingerprints":{"codehealthFindingId/v1":"3c0a1c1f7c04afae05aae645d87791f1a52b20cd4452c9aec3fb339d1c26afde"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 3): packages/flutter_chat_ui/lib/src/simple_text_message.dart:95-107 | packages/flyer_chat_text_message/lib/src/flyer_chat_text_message.dart:154-166 | packages/flyer_chat_text_stream_message/lib/src/flyer_chat_text_stream_message.dart:294-306 \u2014 before extracting anything, compare \u0060packages/flutter_chat_ui/lib/src/simple_text_message.dart\u0060 and \u0060packages/flyer_chat_text_message/lib/src/flyer_chat_text_message.dart\u0060 as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 206 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060packages/flutter_chat_ui/lib/src/simple_text_message.dart:95\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"packages/flutter_chat_ui/lib/src/simple_text_message.dart"},"region":{"startLine":95}}}],"partialFingerprints":{"codehealthFindingId/v1":"1e7e7b5de861047841250e8a28d8c86eef871e82f1449fc4fab653c690786d0a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 3): packages/flutter_chat_ui/lib/src/simple_text_message.dart:101-109 | packages/flyer_chat_file_message/lib/src/flyer_chat_file_message.dart:110-118 | packages/flyer_chat_text_message/lib/src/flyer_chat_text_message.dart:160-168 \u2014 before extracting anything, compare \u0060packages/flutter_chat_ui/lib/src/simple_text_message.dart\u0060 and \u0060packages/flyer_chat_file_message/lib/src/flyer_chat_file_message.dart\u0060 as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 95 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060packages/flutter_chat_ui/lib/src/simple_text_message.dart:101\u0060 it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows \u2014 the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members\u0027 bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run \u2014 a one-line delegation has no helper inside it to lift \u2014 so generate the run from the set it enumerates, or accept it and keep each member\u0027s own documentation with it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"packages/flutter_chat_ui/lib/src/simple_text_message.dart"},"region":{"startLine":101}}}],"partialFingerprints":{"codehealthFindingId/v1":"2babefb4d2172f52d62fc2ff7f8676a756222939eb0bed4b8d10358d69b3b594"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 4): packages/flutter_chat_ui/lib/src/simple_text_message.dart:100-107 | packages/flyer_chat_file_message/lib/src/flyer_chat_file_message.dart:109-116 | packages/flyer_chat_text_message/lib/src/flyer_chat_text_message.dart:159-166 | packages/flyer_chat_text_stream_message/lib/src/flyer_chat_text_stream_message.dart:299-306 \u2014 before extracting anything, compare \u0060packages/flutter_chat_ui/lib/src/simple_text_message.dart\u0060 and \u0060packages/flyer_chat_file_message/lib/src/flyer_chat_file_message.dart\u0060 as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 95 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060packages/flutter_chat_ui/lib/src/simple_text_message.dart:100\u0060 it runs out through the closing brace of the declaration holding it \u2014 the window is that declaration\u0027s tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"packages/flutter_chat_ui/lib/src/simple_text_message.dart"},"region":{"startLine":100}}}],"partialFingerprints":{"codehealthFindingId/v1":"fe34559bb51cd62b01d3adcae4b97408ea735d5889aec3654eb48e480cd0855d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 3): examples/flyer_chat/lib/gemini.dart:584-590 | examples/flyer_chat/lib/pagination_older.dart:198-204 | packages/flutter_chat_ui/lib/src/composer.dart:402-408 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made 3 times. Read the line range as the matched WINDOW rather than a finished unit: at \u0060examples/flyer_chat/lib/gemini.dart:584\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"examples/flyer_chat/lib/gemini.dart"},"region":{"startLine":584}}}],"partialFingerprints":{"codehealthFindingId/v1":"619800c031f3bb7b37cc2f8bfb97217e079347d817317a8741af7bc2a1aadd0e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 3): packages/cross_cache/lib/src/cache/io.dart:35-40 | packages/cross_cache/lib/src/cache/io.dart:59-64 | packages/cross_cache/lib/src/cache/io.dart:71-76 \u2014 all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060packages/cross_cache/lib/src/cache/io.dart:35\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"packages/cross_cache/lib/src/cache/io.dart"},"region":{"startLine":35}}}],"partialFingerprints":{"codehealthFindingId/v1":"e13b803604f5512884e1339ed1d612f53b313dbf0901c6713a8d098cdffb55b8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 3): packages/flutter_chat_ui/lib/src/simple_text_message.dart:228-233 | packages/flyer_chat_file_message/lib/src/flyer_chat_file_message.dart:256-261 | packages/flyer_chat_text_message/lib/src/flyer_chat_text_message.dart:306-311 \u2014 before extracting anything, compare \u0060packages/flutter_chat_ui/lib/src/simple_text_message.dart\u0060 and \u0060packages/flyer_chat_file_message/lib/src/flyer_chat_file_message.dart\u0060 as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 95 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"packages/flutter_chat_ui/lib/src/simple_text_message.dart"},"region":{"startLine":228}}}],"partialFingerprints":{"codehealthFindingId/v1":"226c6d7cabeffee9549b6d64d843bc5382183fe1f5121c3271ef0ecaf24aa686"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): packages/flutter_chat_ui/lib/src/simple_text_message.dart:243-251 | packages/flyer_chat_text_message/lib/src/flyer_chat_text_message.dart:330-338 \u2014 before extracting anything, compare \u0060packages/flutter_chat_ui/lib/src/simple_text_message.dart\u0060 and \u0060packages/flyer_chat_text_message/lib/src/flyer_chat_text_message.dart\u0060 as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 206 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"packages/flutter_chat_ui/lib/src/simple_text_message.dart"},"region":{"startLine":243}}}],"partialFingerprints":{"codehealthFindingId/v1":"6071573d47945d41b196934b7b37672821f8a54a7ffc6fa66bdd4ba0beb47539"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 3): packages/flutter_chat_ui/lib/src/simple_text_message.dart:235-241 | packages/flyer_chat_file_message/lib/src/flyer_chat_file_message.dart:263-270 | packages/flyer_chat_text_message/lib/src/flyer_chat_text_message.dart:322-328 \u2014 before extracting anything, compare \u0060packages/flutter_chat_ui/lib/src/simple_text_message.dart\u0060 and \u0060packages/flyer_chat_file_message/lib/src/flyer_chat_file_message.dart\u0060 as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 95 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"packages/flutter_chat_ui/lib/src/simple_text_message.dart"},"region":{"startLine":235}}}],"partialFingerprints":{"codehealthFindingId/v1":"276e5b4cbe850071661edffdf2a1bf1bb7a21e39aee74e9d7ffab3d058446a7e"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (21 corresponding lines): examples/flyer_chat/lib/hive_chat_controller.dart:66-88 | examples/flyer_chat/lib/hive_chat_controller.dart:90-110 \u2014 These two members are one piece of code written twice and then edited apart: 21 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"examples/flyer_chat/lib/hive_chat_controller.dart"},"region":{"startLine":66}}}],"partialFingerprints":{"codehealthFindingId/v1":"ce4915f7f5a0c5e010ee9e21b50a4e4f73b06c06385d94865215a827c8054eed"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (14 corresponding lines): examples/flyer_chat/lib/pagination_mock_database.dart:39-52 | examples/flyer_chat/lib/pagination_mock_database.dart:54-68 \u2014 These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"examples/flyer_chat/lib/pagination_mock_database.dart"},"region":{"startLine":39}}}],"partialFingerprints":{"codehealthFindingId/v1":"a91b2fb156e23b9940e95238e32cff79f448cadecda461300d6491f79141e090"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (11 corresponding lines): examples/flyer_chat/lib/gemini.dart:584-594 | examples/flyer_chat/lib/pagination_older.dart:198-208 \u2014 These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"examples/flyer_chat/lib/gemini.dart"},"region":{"startLine":584}}}],"partialFingerprints":{"codehealthFindingId/v1":"72188e44d6e8ad96bfbf920027157b4d33580ebd9dff433f5a1ed71458697331"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13\u201314 lines \u00D7 2): examples/flyer_chat/lib/main.dart:136-149 | examples/flyer_chat/lib/main.dart:161-173 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060examples/flyer_chat/lib/main.dart:136\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"examples/flyer_chat/lib/main.dart"},"region":{"startLine":136}}}],"partialFingerprints":{"codehealthFindingId/v1":"6d8ed60e8568a55a281f6077cf5d14aaa86ebb7ebf13354adf0afd554e8ab447"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): examples/flyer_chat/lib/main.dart:209-219 | examples/flyer_chat/lib/main.dart:263-273 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060examples/flyer_chat/lib/main.dart:209\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060examples/flyer_chat/lib/main.dart:262\u0060 calls \u0060SizedBox\u0060 and \u0060examples/flyer_chat/lib/main.dart:209\u0060 does not \u2014 after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"examples/flyer_chat/lib/main.dart"},"region":{"startLine":209}}}],"partialFingerprints":{"codehealthFindingId/v1":"dd25e6a629d99004227571cb8643e3492f78b48807308ab8e6872646fb06c98a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): examples/flyer_chat/lib/gemini.dart:587-594 | examples/flyer_chat/lib/pagination_older.dart:201-208 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060examples/flyer_chat/lib/gemini.dart:587\u0060 it runs out through the closing brace of the declaration holding it \u2014 the window is that declaration\u0027s tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"examples/flyer_chat/lib/gemini.dart"},"region":{"startLine":587}}}],"partialFingerprints":{"codehealthFindingId/v1":"96e83e07d0152d00d87ed3b85aeadda14bcfd0d7100c95896c3161cb6d048ccf"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): examples/flyer_chat/lib/gemini.dart:482-486 | examples/flyer_chat/lib/pagination_older.dart:168-172 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"examples/flyer_chat/lib/gemini.dart"},"region":{"startLine":482}}}],"partialFingerprints":{"codehealthFindingId/v1":"92891c034fcd5838b3401a6925c35572d0cdb0264af1d2b8c45ab2373ea8820d"}},{"ruleId":"D5","level":"warning","message":{"text":"Off the main sequence: cross_cache: cross_cache: abstractness 0.17, instability 0.00, distance 0.83 \u2014 zone of pain \u2014 concrete and depended on by 2 project(s), so it\u0027s rigid to change."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"049972950045841770b1ac866992f37738c79af76c3aa4faf1eaab89c555b838"}},{"ruleId":"D16","level":"note","message":{"text":"Off-boarding risk: anonymized user #1: If anonymized user #1 becomes unavailable, 1 significant file(s) lose their only recent owner: packages/flutter_chat_ui/lib/src/utils/typedefs.dart. Pair on, review, or document these before any departure."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"9771d6f6dae15a90ee8d015e904e7082b6119171dcb3597d4fab24fd38066f7f"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: // TODO: When provider is removed make definition same as OnMessageTapCallback \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060// REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"packages/flutter_chat_ui/lib/src/utils/typedefs.dart"},"region":{"startLine":40}}}],"partialFingerprints":{"codehealthFindingId/v1":"6f7454dcf4f839de25d98439bd31621a9a5be86717568db5b4399dd733fabbac"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned files with no living knowledge: 1 of 31 analysed file(s) have no living knowledge left \u2014 their last meaningful change has decayed away, so if one breaks, no one currently understands it (counted over production source files of roughly 2,400 bytes or more, excluding vendored, generated, example/demo and scaffolding-template trees and test files identified by path convention, largest first; 31 of the 72 production source files in this repository met that bar). None is large enough to earn a read-through of its own, so this row stands in for the per-file rows rather than raising one each \u2014 most significant first: packages/flutter_link_previewer/lib/src/utils.dart. Attach the read to the next change that touches one of them: have a second person review that change, and leave behind a short comment or test recording what the file is for, so the knowledge comes back at the cost of a change you were making anyway."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"ce861fd78f6935114d3a342cb90ad25870f984e1042954fcbbe27c0e23be3658"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"packages/flutter_link_previewer/lib/src/utils.dart"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"8d27222d7f72e174e650380f4b853439f1067a49b92efe553c26162d389ed33a"}},{"ruleId":"M2","level":"note","message":{"text":"No ADRs: No Architecture Decision Records found \u2014 no conventional ADR directory, no numbered \u0060NNNN-title\u0060 documents in any markup this check reads, and nothing ADR-shaped by content. Design rationale recorded elsewhere (a design-notes tree, a mailing list, pull-request discussion) is not visible to this check and is not re-findable per decision, so a future maintainer cannot ask why one choice was made and get an answer."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"670b3d6e36a756d63097d0dfbf90afd5fc761308800b9354894a07c3f4e4aa14"}},{"ruleId":"P1","level":"warning","message":{"text":"No CI pipeline: No CI workflow found (.github/workflows, azure-pipelines.yml, .gitlab-ci.yml, \u2026) \u2014 changes aren\u0027t gated by an automated build/test."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"44f01af96e50474fba2df84d95ddf4f7e1d34c29c307830b9efc9057daa6b670"}},{"ruleId":"P3","level":"note","message":{"text":"No SAST: No static application security testing detected. For this repository\u0027s stack, add the Dart analyzer\u0027s security lints plus \u0060semgrep --config=auto\u0060 \u2014 this repository has no CI pipeline yet, so run it locally to clear the existing findings, then make it a step of the first workflow you add so a regression fails the build. What was searched, so you can tell an absence from a miss: the 0 CI workflow file(s) in this repository, and the scanner and linter configuration checked in beside them. A scan that runs outside CI, one configured in your forge\u0027s web UI rather than in a committed file, or a tool whose name is none of those this check carries, is not seen \u2014 if that is your case the row is wrong, and saying so is more useful than adding a second scanner."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"6e54424179c892f03ef2fd003130ac4bd43f39bbf3b1ca0a0143e25acb80ec87"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060timeAndStatusPosition != TimeAndStatusPosition.inline \u0026\u0026 timeAndStatus != null\u0060 appears character-identically in 3 files \u2014 packages/flutter_chat_ui/lib/src/simple_text_message.dart, packages/flyer_chat_file_message/lib/src/flyer_chat_file_message.dart, packages/flyer_chat_text_message/lib/src/flyer_chat_text_message.dart. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"packages/flutter_chat_ui/lib/src/simple_text_message.dart"},"region":{"startLine":213}}}],"partialFingerprints":{"codehealthFindingId/v1":"23aea3c3d5661c356134522dade37de23f8da3e1fb15c7112784be47789010a6"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060widget.showTime || (isSentByMe \u0026\u0026 widget.showStatus)\u0060 appears character-identically in 2 files \u2014 packages/flyer_chat_image_message/lib/src/flyer_chat_image_message.dart, packages/flyer_chat_text_stream_message/lib/src/flyer_chat_text_stream_message.dart. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"packages/flyer_chat_image_message/lib/src/flyer_chat_image_message.dart"},"region":{"startLine":212}}}],"partialFingerprints":{"codehealthFindingId/v1":"7b4bf72c27d15346fed4bf269f43d026985cb3588d0b486c53955d9ed97f398e"}},{"ruleId":"X2","level":"note","message":{"text":"Not all functions that make a request accept a CancelToken: Only 0/1 functions that make a cancellable request (Dio, AbortableRequest) accept a CancelToken or pass one on, so a request keeps running after whatever wanted it has given up \u2014 a screen navigated away from, a disposed widget, a superseded search. Take a \u0060CancelToken? cancelToken\u0060 and hand it to the request as \u0060cancelToken:\u0060 (or hold one and cancel it in \u0060dispose\u0060); where nothing could ever cancel the call, omitting it is a deliberate choice \u2014 judge against how the function is used."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"767a6f188a93a9fdcf866e430f9755aeab7ca6acdd21a1a80f8ac4ef4cc6cf7c"}},{"ruleId":"X2","level":"warning","message":{"text":"Function without a CancelToken: downloadAndSave: \u0060downloadAndSave\u0060 calls \u0060_dio.get(\u2026)\u0060 but takes no CancelToken and hands the request none its caller can reach, so its caller cannot cancel the request once it has started. Take \u0060CancelToken? cancelToken\u0060 and pass it on as \u0060cancelToken: cancelToken\u0060 \u2014 or, in a widget\u0027s State or a notifier, hold one and cancel it in \u0060dispose\u0060."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"packages/cross_cache/lib/src/cross_cache.dart"},"region":{"startLine":50}}}],"partialFingerprints":{"codehealthFindingId/v1":"5f4dad4b85caa2231517628b23bbd0473f2374ce2702986fa8cdf8aeca5a8a14"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (empty catch): An empty catch block silently discards the error \u2014 failures vanish with no log and no rethrow. Log it, handle it, or don\u0027t catch it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"packages/flutter_link_previewer/lib/src/utils.dart"},"region":{"startLine":327}}}],"partialFingerprints":{"codehealthFindingId/v1":"27c6263cb8ad2e99515b9ee07763781fe327d1aade5de2ccdb6346386a300257"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (caught, then discarded): \u0060catch (e)\u0060 takes every exception and records none of it \u2014 the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"packages/flutter_link_previewer/lib/src/utils.dart"},"region":{"startLine":334}}}],"partialFingerprints":{"codehealthFindingId/v1":"0da923f9c1b53935d18f7602e3231a9bdb8cd03394dc36b39e89e0c899901977"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (caught, then discarded): \u0060catch (_)\u0060 takes every exception and records none of it \u2014 the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"packages/flutter_chat_ui/lib/src/is_typing.dart"},"region":{"startLine":118}}}],"partialFingerprints":{"codehealthFindingId/v1":"3d672aebf461049500ac896611f0b9f6130d4bfb5b468152fb2c64cfa0aad5d8"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (caught, then discarded): \u0060catch (e)\u0060 takes every exception and records none of it \u2014 the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"packages/flutter_chat_ui/lib/src/chat_message/chat_message_internal.dart"},"region":{"startLine":182}}}],"partialFingerprints":{"codehealthFindingId/v1":"99e2c0679d3d7aa333af51b129213093c2ff03f84d23dec6d8eccb07f591bcf4"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (empty catch): An empty catch block silently discards the error \u2014 failures vanish with no log and no rethrow. Log it, handle it, or don\u0027t catch it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"packages/cross_cache/lib/src/cross_cache.dart"},"region":{"startLine":59}}}],"partialFingerprints":{"codehealthFindingId/v1":"b92927b7e0074bdc542fdf2674c79f842a1b5fdc809827a74e36f7be0d22762c"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (empty catch): An empty catch block silently discards the error \u2014 failures vanish with no log and no rethrow. Log it, handle it, or don\u0027t catch it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"packages/cross_cache/lib/src/cross_cache.dart"},"region":{"startLine":105}}}],"partialFingerprints":{"codehealthFindingId/v1":"cb4dc11b8bba493ad5165a53cb3d0254ed37b5a65338b56fd2a5ee3531ac2dbe"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (empty catch): An empty catch block silently discards the error \u2014 failures vanish with no log and no rethrow. Log it, handle it, or don\u0027t catch it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"packages/cross_cache/lib/src/cross_cache.dart"},"region":{"startLine":112}}}],"partialFingerprints":{"codehealthFindingId/v1":"09597e4efdddef8cfbf9faa2d6e87012531399987aa665cbeb94c99df0006992"}}],"taxonomies":[{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d","organization":"MITRE","informationUri":"https://cwe.mitre.org/","isComprehensive":false,"shortDescription":{"text":"The MITRE Common Weakness Enumeration (CWE)."},"taxa":[{"id":"CWE-259","guid":"ae9ad959-fbb6-9d5e-892d-3dca66da0b69","name":"Use of Hard-coded Password","shortDescription":{"text":"Use of Hard-coded Password"},"helpUri":"https://cwe.mitre.org/data/definitions/259.html"},{"id":"CWE-77","guid":"332c8ade-6612-9f56-a06b-d8d90b1a8750","name":"Improper Neutralization of Special Elements used in a Command (\u0027Command Injection\u0027)","shortDescription":{"text":"Improper Neutralization of Special Elements used in a Command (\u0027Command Injection\u0027)"},"helpUri":"https://cwe.mitre.org/data/definitions/77.html"},{"id":"CWE-78","guid":"2e31ceaf-c7ae-2e5e-9661-cfb1362789cf","name":"Improper Neutralization of Special Elements used in an OS Command (\u0027OS Command Injection\u0027)","shortDescription":{"text":"Improper Neutralization of Special Elements used in an OS Command (\u0027OS Command Injection\u0027)"},"helpUri":"https://cwe.mitre.org/data/definitions/78.html"},{"id":"CWE-79","guid":"fd45580b-e8c4-fc5e-8c2f-aa8fab0b4dbf","name":"Improper Neutralization of Input During Web Page Generation (\u0027Cross-site Scripting\u0027)","shortDescription":{"text":"Improper Neutralization of Input During Web Page Generation (\u0027Cross-site Scripting\u0027)"},"helpUri":"https://cwe.mitre.org/data/definitions/79.html"},{"id":"CWE-798","guid":"5e8f057d-fee3-995a-a0cb-9fc5b0d174d1","name":"Use of Hard-coded Credentials","shortDescription":{"text":"Use of Hard-coded Credentials"},"helpUri":"https://cwe.mitre.org/data/definitions/798.html"},{"id":"CWE-89","guid":"6d08fdad-37eb-c150-bbf0-d7d946863407","name":"Improper Neutralization of Special Elements used in an SQL Command (\u0027SQL Injection\u0027)","shortDescription":{"text":"Improper Neutralization of Special Elements used in an SQL Command (\u0027SQL Injection\u0027)"},"helpUri":"https://cwe.mitre.org/data/definitions/89.html"},{"id":"CWE-94","guid":"75e7f50c-6c2f-dd52-bf40-bf6c52b861fd","name":"Improper Control of Generation of Code (\u0027Code Injection\u0027)","shortDescription":{"text":"Improper Control of Generation of Code (\u0027Code Injection\u0027)"},"helpUri":"https://cwe.mitre.org/data/definitions/94.html"}]},{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61","version":"2025","organization":"OWASP Foundation","informationUri":"https://top10.owasp.org/2025/","isComprehensive":false,"shortDescription":{"text":"The OWASP Top 10:2025 web application security risks."},"taxa":[{"id":"A05:2025","guid":"87e86033-3231-8458-8e4a-5cb82743553a","name":"Injection","shortDescription":{"text":"Injection"},"helpUri":"https://top10.owasp.org/2025/A05_2025-Injection/"},{"id":"A07:2025","guid":"334ddd78-539d-d35c-83dd-253647eb7eaf","name":"Authentication Failures","shortDescription":{"text":"Authentication Failures"},"helpUri":"https://top10.owasp.org/2025/A07_2025-Authentication_Failures/"}]}],"properties":{"codehealthPublication":{"public":true,"notice":"This is the PUBLIC form of this artifact. Findings are listed in full, but the details of SECURITY findings \u2014 which rule fired, in which file, on which line, and how to fix it \u2014 are deliberately withheld, and any secret-scanner results are excluded entirely. Where detail is absent here it was REMOVED FOR PUBLICATION; it is not missing from the analysis. The complete artifact is available from the repository owner.","securityFindingsRedacted":0,"secretScannerRunsExcluded":0}}}]}