flutter/packages/flutter_tools/lib/src/commands
James D. Lin e4206ac5dd
[flutter tools] Add a DelegatingLogger class (#67581)
[flutter tools] Add a DelegatingLogger class

Move most of `DelegateLogger` `from test/src/testbed.dart` to
`lib/src/base/logger.dart` to better formalize the common practice of
chaining `Logger`s together.  I renamed the class since it isn't
itself the delegate and to better match the `Delegating...` classes
from `package:collection`.

Additionally, add a freestanding `asLogger<T>` function to "cast" a
`Logger` into a matching delegate if possible.  This will allow
`Logger` chains to be ordered a *bit* more freely (e.g.
`NotifyingLogger` and `AppRunLogger` will no longer required to be
at the end of the chain, an unwritten rule that has led to breakage in
google3).  Chain order still matters since lack of virtual dispatch
means that parent `Logger`s can never invoke child methods, however.

I made `asLogger<T>` a freestanding function because I didn't want to
make it part of the `Logger` interface (and I thought that making it
an extension method might be weird).

Bonus cleanup:
There no longer appears to be a way to construct an `AppRunLogger`
with a null parent, so remove all of code paths for that case and
make the `parent` construction parameter required.
2020-10-09 15:55:24 -07:00
..
analyze_base.dart Remove unused 'dart:async' imports. (#65568) 2020-09-16 14:14:06 -07:00
analyze_continuously.dart Remove unused 'dart:async' imports. (#65568) 2020-09-16 14:14:06 -07:00
analyze_once.dart [flutter_tools] According to AnalysisSeverity return exit code detailed proposal (#61589) 2020-10-01 18:50:33 -07:00
analyze.dart [flutter_tools] According to AnalysisSeverity return exit code detailed proposal (#61589) 2020-10-01 18:50:33 -07:00
assemble.dart [flutter_tools] hot reload/restart update for asset manager change (#66742) 2020-10-09 12:25:15 -07:00
attach.dart Improve consistency of top-level help text (#66748) 2020-09-27 15:12:03 -07:00
build_aar.dart Remove unused 'dart:async' imports. (#65568) 2020-09-16 14:14:06 -07:00
build_aot.dart Remove unused 'dart:async' imports. (#65568) 2020-09-16 14:14:06 -07:00
build_apk.dart Minor tool text typo (#66801) 2020-09-28 09:27:04 -07:00
build_appbundle.dart Remove unused 'dart:async' imports. (#65568) 2020-09-16 14:14:06 -07:00
build_bundle.dart Remove unused 'dart:async' imports. (#65568) 2020-09-16 14:14:06 -07:00
build_fuchsia.dart Remove unused 'dart:async' imports. (#65568) 2020-09-16 14:14:06 -07:00
build_ios_framework.dart Remove unused 'dart:async' imports. (#65568) 2020-09-16 14:14:06 -07:00
build_ios.dart Build xcarchive command (#67598) 2020-10-08 19:51:35 -07:00
build_linux.dart Remove unused 'dart:async' imports. (#65568) 2020-09-16 14:14:06 -07:00
build_macos.dart Remove unused 'dart:async' imports. (#65568) 2020-09-16 14:14:06 -07:00
build_web.dart [flutter_tools] disable source maps by default for release builds, enable for run and with command line arg (#67331) 2020-10-05 13:24:51 -07:00
build_windows.dart Remove unused 'dart:async' imports. (#65568) 2020-09-16 14:14:06 -07:00
build.dart Build xcarchive command (#67598) 2020-10-08 19:51:35 -07:00
channel.dart Improve consistency of top-level help text (#66748) 2020-09-27 15:12:03 -07:00
clean.dart Remove unused 'dart:async' imports. (#65568) 2020-09-16 14:14:06 -07:00
config.dart Remove unused 'dart:async' imports. (#65568) 2020-09-16 14:14:06 -07:00
create.dart Remove the Windows 'flutter create' warning (#66113) 2020-09-18 14:32:10 -07:00
daemon.dart [flutter tools] Add a DelegatingLogger class (#67581) 2020-10-09 15:55:24 -07:00
devices.dart [flutter_tools] remove globals from compile and devices (#67485) 2020-10-08 12:28:58 -07:00
doctor.dart [flutter_tools] work around hostonly test (#67369) 2020-10-05 18:26:37 -07:00
downgrade.dart Add "flutter downgrade" command (#50506) 2020-02-13 11:56:45 -08:00
drive.dart [flutter_tools] remove globals from compile and devices (#67485) 2020-10-08 12:28:58 -07:00
emulators.dart Remove unused 'dart:async' imports. (#65568) 2020-09-16 14:14:06 -07:00
format.dart Improve consistency of top-level help text (#66748) 2020-09-27 15:12:03 -07:00
generate_localizations.dart Improve consistency of top-level help text (#66748) 2020-09-27 15:12:03 -07:00
generate.dart [flutter_tools] turn down flutter generate (#61475) 2020-07-16 09:51:22 -07:00
ide_config.dart Remove unused 'dart:async' imports. (#65568) 2020-09-16 14:14:06 -07:00
install.dart Remove unused 'dart:async' imports. (#65568) 2020-09-16 14:14:06 -07:00
logs.dart [flutter_tools] flutter logs no longer requires supported device (#66696) 2020-10-02 21:12:50 -07:00
make_host_app_editable.dart Remove unused 'dart:async' imports. (#65568) 2020-09-16 14:14:06 -07:00
packages.dart Revert "[flutter_tools] remove all pub caching logic (#66776)" (#67572) 2020-10-07 15:30:46 -07:00
precache.dart Improve consistency of top-level help text (#66748) 2020-09-27 15:12:03 -07:00
run.dart Add publish-port flag to disable mDNS port discovery (#67452) 2020-10-07 08:52:05 -07:00
screenshot.dart Remove unused 'dart:async' imports. (#65568) 2020-09-16 14:14:06 -07:00
shell_completion.dart Remove unused 'dart:async' imports. (#65568) 2020-09-16 14:14:06 -07:00
symbolize.dart Improve consistency of top-level help text (#66748) 2020-09-27 15:12:03 -07:00
test.dart Revert "[flutter_tools] remove all pub caching logic (#66776)" (#67572) 2020-10-07 15:30:46 -07:00
update_packages.dart Revert "[flutter_tools] remove all pub caching logic (#66776)" (#67572) 2020-10-07 15:30:46 -07:00
upgrade.dart Revert "[flutter_tools] remove all pub caching logic (#66776)" (#67572) 2020-10-07 15:30:46 -07:00