[various] Enable avoid_dynamic_calls (#6834)

* Enable the option

* Fix camera

* Fix webview

* Remove unnecessary 'call's from camera tests

* Fix maps

* Fix sign-in

* fix image_picker

* Fix IAP

* Fix shared_preferences

* Fix url_launcher_android

* Version bumps

* Fix tool

* Re-apply webview test fix

* Re-bump versions

* Fix one new tool issue
This commit is contained in:
stuartmorgan
2023-01-10 06:17:39 -08:00
committed by GitHub
parent 1a1865e10a
commit 5dae598918
9 changed files with 42 additions and 33 deletions

View File

@ -110,8 +110,10 @@ void main() {
final MockGitDir gitDir = MockGitDir();
when(gitDir.runCommand(any, throwOnError: anyNamed('throwOnError')))
.thenAnswer((Invocation invocation) {
final List<String> arguments =
invocation.positionalArguments[0]! as List<String>;
final MockProcessResult mockProcessResult = MockProcessResult();
if (invocation.positionalArguments[0][0] == 'diff') {
if (arguments[0] == 'diff') {
when<String?>(mockProcessResult.stdout as String?)
.thenReturn(gitDiffResponse);
}