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.

Implements

Constructors

ConnectionHandler()

Properties

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.
read-only
hashCode → int
The hash code for this object.
read-only, inherited
runtimeType → Type
A representation of the runtime type of the object.
read-only, inherited

Methods

checkServerProtocolVersion(Version version) → bool
Return true if the server's protocol is compatible.
onFailedToConnect() → void
onProtocolNotSupported(Version version) → void
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
serverConnected({Duration timeLimit }) → Future<bool>
Return a future that completes with a bool indicating whether a connection was successfully established with the server.
handleEvent(Notification notification) → void
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent 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
onAnalysisNavigation(AnalysisNavigationParams params) → void
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
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
onFlutterOutline(FlutterOutlineParams params) → void
Reports the Flutter outline associated with a single file. [...]
inherited
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
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
toString() → String
Returns a string representation of this object.
inherited

Operators

operator ==(dynamic other) → bool
The equality operator.
inherited