Skip to content
This repository has been archived by the owner on Oct 28, 2024. It is now read-only.

enable the avoid_dynamic_calls lint #30

Merged
merged 1 commit into from
Feb 17, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
- Add optional `signIn` argument to `startWithDebugPort`.
To be used together with `user-data-dir` to start a chrome
window signed into the default profile with extensions enabled.
- Enable the `avoid_dynamic_calls` lint.

## 1.0.0

Expand Down
1 change: 1 addition & 0 deletions analysis_options.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ analyzer:
linter:
rules:
- always_declare_return_types
- avoid_dynamic_calls
- avoid_unused_constructor_parameters
- cancel_subscriptions
- directives_ordering
Expand Down
3 changes: 2 additions & 1 deletion test/chrome_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,8 @@ Future<String> _evaluateExpression(WipPage page, String expression) async {
'Runtime.evaluate',
params: {'expression': expression},
);
var value = wipResponse.json['result']['result']['value'];
var response = wipResponse.json['result'] as Map<String, dynamic>;
var value = (response['result'] as Map<String, dynamic>)['value'];
result = (value != null && value is String) ? value : '';
}
return result;
Expand Down