ConnectionHandler mixin
ConnectionHandler listens to analysis server notifications and detects when a connection has been established with the server.
Clients may override onFailedToConnect, onProtocolNotSupported, and onServerError to display connection failure information.
Clients may mix-in this class, but may not extend or implement it.
- Implemented types
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- server → Server
-
Clients should implement this method to return the server being managed.
This mixin will stop the server process if a connection cannot be
established or if a server error occurs after connecting.
no setter
Methods
-
checkServerProtocolVersion(
Version version) → bool -
Return
true
if the server's protocol is compatible. -
handleEvent(
Notification notification) → void -
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
onAnalysisAnalyzedFiles(
AnalysisAnalyzedFilesParams params) → void -
Reports the paths of the files that are being analyzed.
inherited
-
onAnalysisClosingLabels(
AnalysisClosingLabelsParams params) → void -
Reports closing labels relevant to a given file.
inherited
-
onAnalysisErrors(
AnalysisErrorsParams params) → void -
Reports the errors associated with a given file. The set of
errors included in the notification is always a complete
list that supersedes any previously reported errors.
inherited
-
onAnalysisFlushResults(
AnalysisFlushResultsParams params) → void -
Reports that any analysis results that were previously
associated with the given files should be considered to be
invalid because those files are no longer being analyzed,
either because the analysis root that contained it is no
longer being analyzed or because the file no longer exists.
inherited
-
onAnalysisFolding(
AnalysisFoldingParams params) → void -
Reports the folding regions associated with a given
file. Folding regions can be nested, but will not be
overlapping. Nesting occurs when a foldable element, such as
a method, is nested inside another foldable element such as
a class.
inherited
-
onAnalysisHighlights(
AnalysisHighlightsParams params) → void -
Reports the highlight regions associated with a given file.
inherited
-
onAnalysisImplemented(
AnalysisImplementedParams params) → void -
Reports the classes that are implemented or extended and
class members that are implemented or overridden in a file.
inherited
-
onAnalysisInvalidate(
AnalysisInvalidateParams params) → void -
Reports that the navigation information associated with a region of a
single file has become invalid and should be re-requested.
inherited
-
Reports the navigation targets associated with a given file.
inherited
-
onAnalysisOccurrences(
AnalysisOccurrencesParams params) → void -
Reports the occurrences of references to elements within a
single file.
inherited
-
onAnalysisOutline(
AnalysisOutlineParams params) → void -
Reports the outline associated with a single file.
inherited
-
onAnalysisOverrides(
AnalysisOverridesParams params) → void -
Reports the overriding members in a file.
inherited
-
onCompletionAvailableSuggestions(
CompletionAvailableSuggestionsParams params) → void -
Reports the pre-computed, candidate completions from symbols defined
in a corresponding library. This notification may be sent multiple times.
When a notification is processed, clients should replace any previous
information about the libraries in the list of changedLibraries, discard
any information about the libraries in the list of removedLibraries, and
preserve any previously received information about any libraries that are
not included in either list.
inherited
-
onCompletionExistingImports(
CompletionExistingImportsParams params) → void -
Reports existing imports in a library. This notification may be sent
multiple times for a library. When a notification is processed, clients
should replace any previous information for the library.
inherited
-
onCompletionResults(
CompletionResultsParams params) → void -
Reports the completion suggestions that should be presented
to the user. The set of suggestions included in the
notification is always a complete list that supersedes any
previously reported suggestions.
inherited
-
onExecutionLaunchData(
ExecutionLaunchDataParams params) → void -
Reports information needed to allow a single file to be launched.
inherited
-
onFailedToConnect(
) → void -
onFlutterOutline(
FlutterOutlineParams params) → void -
Reports the Flutter outline associated with a single file.
inherited
-
onProtocolNotSupported(
Version version) → void -
onSearchResults(
SearchResultsParams params) → void -
Reports some or all of the results of performing a requested
search. Unlike other notifications, this notification
contains search results that should be added to any
previously received search results associated with the same
search id.
inherited
-
onServerConnected(
ServerConnectedParams params) → void -
Reports that the server is running. This notification is
issued once after the server has started running but before
any requests are processed to let the client know that it
started correctly.
override
-
onServerError(
ServerErrorParams params) → void -
Reports that an unexpected error has occurred while
executing the server. This notification is not used for
problems with specific requests (which are returned as part
of the response) but is used for exceptions that occur while
performing other tasks, such as analysis or preparing
notifications.
override
-
onServerLog(
ServerLogParams params) → void -
The stream of entries describing events happened in the server.
inherited
-
onServerStatus(
ServerStatusParams params) → void -
Reports the current status of the server. Parameters are
omitted if there has been no change in the status
represented by that parameter.
inherited
-
onUnknownNotification(
String event, dynamic params) → void -
Reports a notification that is not processed
by any other notification handlers.
inherited
-
serverConnected(
{Duration? timeLimit}) → Future< bool> -
Return a future that completes with a
bool
indicating whether a connection was successfully established with the server. -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited