UWebBridge class abstract
Thin, dependency-free wrappers over the browser APIs the rest of u needs.
Constructors
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
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
Static Methods
-
activeServiceWorkerUrl(
) → String? - Script URL of the service worker serving this page, e.g. ".../flutter_service_worker.js?v=123".
-
baseUrl(
) → String - Absolute URL the app is deployed under, always with a trailing slash.
-
clearCaches(
) → Future< void> - Deletes every CacheStorage bucket, including the ones the Flutter service worker fills.
-
documentUrl(
) → String - Absolute URL of the document currently shown, including query and fragment.
-
fetch(
String url, String cacheMode) → Future< String?> -
Downloads
urlwith the given HTTP cache mode ("no-store", "force-cache", "reload", ...). Null on any failure, so callers can treat "offline" and "missing" the same way. -
isEmbedded(
) → bool - True when the page runs inside an iframe or a native WebView user-agent.
-
isStandalone(
) → bool - True when the site is running as an installed PWA (launched from the home screen).
-
listenMessage(
void onMessage(String origin, Map< String, dynamic> data)) → void Function() - Subscribes to browser window "message" events; returns a disposer that removes the listener.
-
listenVisible(
void onVisible()) → void Function() -
Runs
onVisibleevery time the tab comes back to the foreground; returns a disposer. -
reload(
String? url) → void -
Reloads the page, or navigates to
urlwithout adding a history entry. -
revalidate(
List< String> urls) → Future<void> -
Re-downloads
urlsand overwrites their HTTP cache entries, so the next navigation reads the server copy even forCache-Control: immutableassets. -
serviceWorkerHasPendingUpdate(
) → Future< bool> - Asks every registration to re-check the server; true when a newer worker is installing or waiting.
-
unregisterServiceWorkers(
) → Future< void> - Releases any waiting worker and unregisters every service worker of this origin.
-
userAgent(
) → String