This repository was archived by the owner on Jul 16, 2023. It is now read-only.
This repository was archived by the owner on Jul 16, 2023. It is now read-only.
[BUG] use-setstate-synchronously
doesn't recognize assert
statements #1178
Closed
Description
Environment and configuration
DCM version: 5.5.1
Dart SDK version: 3.0.0-52.0.dev
Configuration
dart_code_metrics:
extends:
- package:dart_code_metrics/presets/all.yaml
What did you do?
await doThing();
assert(mounted);
setState(() => {}); // error: use-setstate-synchronously
What did you expect to happen?
no error
What actually happened?
use-setstate-synchronously
error
Participation
- I am willing to submit a pull request for this issue.
Additional comments
No response