dart:ui_web library
Classes
- AssetManager
- This class downloads assets over the network.
- BrowserDetection
- The core Browser Detection functionality from the Flutter web engine.
- BrowserPlatformLocation
- Delegates to real browser APIs to provide platform location functionality.
- FlutterViewManagerProxy
- This class exposes web-only attributes for the registered views in a multi-view app.
- HashUrlStrategy
- This is an implementation of UrlStrategy that uses the browser URL's hash fragments to represent its state.
- PlatformLocation
- Encapsulates all calls to DOM apis, which allows the UrlStrategy classes to be platform agnostic and testable.
- PlatformViewRegistry
- A registry for factories that create platform views.
- UrlStrategy
- Represents and reads route state from the browser's URL.
Enums
- BrowserEngine
- The HTML engine used by the current browser.
- OperatingSystem
- Operating system where the current browser runs.
Extensions
Properties
- assetManager → AssetManager
-
Provides the AssetManager used by the Flutter Engine.
no setter
- benchmarkValueCallback ← BenchmarkValueCallback?
-
A callback for receiving benchmark values.
no getter
- browser ↔ BrowserDetection
-
A short-hand accessor to the BrowserDetection.instance singleton.
getter/setter pair
- debugDefaultUrlStrategyOverride ↔ UrlStrategy?
-
Overrides the default URL strategy.
getter/setter pair
- debugEmulateFlutterTesterEnvironment ↔ bool
-
Whether the Flutter engine is running in
flutter test
emulation mode.getter/setter pair - isCustomUrlStrategySet ↔ bool
-
Whether a custom URL strategy has been set or not.
getter/setter pair
- platformViewRegistry → PlatformViewRegistry
-
The platform view registry for this app.
final
- urlStrategy ↔ UrlStrategy?
-
Returns the present UrlStrategy for handling the browser URL.
getter/setter pair
- views → FlutterViewManagerProxy
-
Exposes web-only functionality for this app's
FlutterView
s objects.final
Functions
-
bootstrapEngine(
{VoidCallback? registerPlugins, VoidCallback? runApp}) → Future< void> - Bootstraps the Flutter Web engine and app.
-
createImageCodecFromUrl(
Uri uri, {ImageCodecChunkCallback? chunkCallback}) → Future< Codec> -
Creates a ui.Codec for the image located at
uri
. -
createImageFromImageBitmap(
JSAny imageSource) → FutureOr< Image> - Creates a ui.Image from an ImageBitmap object.
-
createImageFromTextureSource(
JSAny object, {required int width, required int height, bool transferOwnership = false}) → FutureOr< Image> - Creates a ui.Image from a valid texture source (for example HTMLImageElement | HTMLVideoElement | HTMLCanvasElement).
-
debugOverrideDevicePixelRatio(
double? value) → void - Overrides the value of ui.FlutterView.devicePixelRatio in tests.
-
debugResetCustomUrlStrategy(
) → void - Resets everything to do with custom URL strategy.
-
preventCustomUrlStrategy(
) → void - From this point on, prevents setting a custom URL strategy.
-
setPluginHandler(
PlatformMessageCallback handler) → void - Sets the handler that forwards platform messages to web plugins.
Typedefs
- BenchmarkValueCallback = void Function(String name, double value)
-
Signature of the callback that receives a benchmark
value
labeled byname
. - EventListener = dynamic Function(Object event)
- Function type that handles pop state events.
- ImageCodecChunkCallback = void Function(int cumulativeBytesLoaded, int expectedTotalBytes)
- Signature of the callback that receives progress updates as image chunks are loaded.
- ParameterizedPlatformViewFactory = Object Function(int viewId, {Object? params})
-
A function which takes a unique
id
and someparams
and creates an HTML element. - PlatformViewFactory = Object Function(int viewId)
-
A function which takes a unique
id
and creates an HTML element. - PopStateListener = void Function(Object? state)
- Callback that receives the new state of the browser history entry.