[flutter_tools] remove zone level overrides of verbose and daemon logging (#57448)

Make it possible for all FlutterCommands to be global free, by moving instantiation to inside the Zone context. Additionally, provide VerboseLogger and NotifyLogger (daemon) at the top level and remove from command-specific overrides.

This allows removing a work around where web devices needed to look up directly from the context in non-test code.

Technically the output preferences are still zone injected, but these will be moved soon as they were not being used correctly by the top level command (the injection comes after ArgParser reads the overflow values, causing numerous wrap issues)
This commit is contained in:
Jonah Williams
2020-06-04 16:35:36 -07:00
committed by GitHub
parent e9a4759947
commit f5de6aadd4
15 changed files with 131 additions and 92 deletions

View File

@@ -98,7 +98,7 @@ Future<void> main(List<String> args) async {
Cache.disableLocking(); // ignore: invalid_use_of_visible_for_testing_member
await runner.run(
command,
<FlutterCommand>[
() => <FlutterCommand>[
_FuchsiaAttachCommand(),
_FuchsiaDoctorCommand(), // If attach fails the tool will attempt to run doctor.
],