521b102563
In WorkspaceFlutterWidgetPreviewsHandler.handle() and FlutterWidgetPreviewsHandler.handle(), an explicit cast of the server instance to LspAnalysisServer was used. When the analysis server is running in legacy mode, the server is a LegacyAnalysisServer, which caused a TypeError. This change removes the unnecessary cast and uses the base server instead. Fixes https://github.com/flutter/flutter/issues/185657 Change-Id: If331de5ff2b7e987c07e49dd3a9cd8a03fc75853 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/499720 Commit-Queue: Ben Konyi <bkonyi@google.com> Reviewed-by: Helin Shiah <helinx@google.com>