FloatyProxyClient class final
Overlay-side proxy client that calls services on the main app, e.g.
await FloatyProxyClient().call('location', 'getCurrentPosition').
Throws FloatyProxyDisconnectedException when the main app is not
connected (unless a fallback is given), FloatyProxyTimeoutException
when the call takes longer than timeout, and
FloatyProxyErrorException when the host handler threw.
Constructors
- FloatyProxyClient({Duration timeout})
-
Creates a client whose calls time out after
timeout.factory
Properties
Methods
-
call(
String service, String method, {Map< String, dynamic> params = const {}, Object? fallback()?}) → Future<Object?> -
Calls
methodofserviceon the main app and returns its result. -
dispose(
) → void - Releases resources and cancels all pending requests.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited