foundation library

Classes

AssetsBundle
ConversionLayerAdapter
A conversion layer which translates Dio HTTP requests to http compatible requests. This way there's no need to implement custom HttpClientAdapter for each platform. Therefore, the required effort to add tests is kept to a minimum. Since CupertinoClient and CronetClient depend anyway on http this also doesn't add any additional dependency.
CookieManager
DataBundle
DebugFlags
Dimension
FileBundle
The bundle that source from local io.
FlexLayoutLog
Centralized helper for flex layout diagnostics.
FormData
A class to create readable "multipart/form-data" streams. It can be used to submit forms and file uploads to http server.
HttpCacheController
HttpCacheObject
HttpCacheObjectBlob
HttpClientCachedResponse
The HttpClientResponse that hits http cache.
HttpClientStreamResponse
LoadingStateRegistry
A global registry to access LoadingStateDumper instances by contextId. This allows network requests and other low-level components to report loading state without direct access to the controller.
NetworkBundle
PositionedLayoutLog
Centralized helper for positioned layout diagnostics.
ProxyHttpClient
ProxyHttpClientRequest
QuickJSByteCodeCache
This is a bytecode cache class that caches bytecodes generated during JavaScript parsing. Use bytecode instead of JavaScript code string can result in a 58.1% reduction in loading time, particularly for larger JavaScript files (>= 1MB).
QuickJSByteCodeCacheObject
UriParser
WebFBundle
WebFDioCacheCookieInterceptor
WebFHttpOverrides
WebFLogger
Global logger configuration for WebF
WidgetLog
Centralized helper for grouped RenderWidget logs with per-feature/impl filters.

Enums

ByteCodeCacheMode
FlexFeature
Feature buckets for flex layout logging.
FlexImpl
Implementation buckets for flex layout logging. Keep coarse to avoid excessive categories while providing context.
HttpCacheMode
PositionedFeature
Feature buckets for positioned layout logging.
PositionedImpl
Implementation buckets for positioned layout logging. Keep coarse to avoid excessive categories while providing context.
WidgetFeature
Feature buckets for grouping RenderWidget diagnostics.
WidgetImpl
Implementation categories for WidgetElement/RenderWidget logs.

Constants

DEFAULT_URL → const String
HttpHeaderContext → const String
UTF_8 → const String

Properties

bridgeLogger → Logger
final
canvasLogger → Logger
final
cssLogger → Logger
final
devToolsLogger → Logger
final
devToolsProtocolLogger → Logger
final
domLogger → Logger
final
htmlContentType ContentType
final
javascriptContentType ContentType
final
renderingLogger → Logger
final
useWebFHttpCache bool
getter/setter pair
webfBc1ContentType ContentType
final

Functions

castToType<T>(dynamic value) → T
createHttpHeaders({Map<String, List<String>>? initialHeaders}) HttpHeaders
createWebFHttpClient() HttpClient
Creates a WebF-aware HttpClient without modifying global HttpOverrides. The returned client wraps a native HttpClient with ProxyHttpClient and applies consistent connection settings.
deleteFile(File file) Future<void>
disposeSharedDioForContext(double contextId) → void
Dispose the shared Dio for a specific WebF context when controller is torn down.
getEntrypointUri(double? contextId) Uri
getOrCreateWebFDio({required double contextId, required Uri uri, WebFBundle? ownerBundle, Duration connectTimeout = const Duration(seconds: 30), Duration receiveTimeout = const Duration(seconds: 60), Duration sendTimeout = const Duration(seconds: 60), bool followRedirects = true, int maxRedirects = 5, int maxConnectionsPerHost = 15, String? userAgent, bool validateStatus(int? statusCode)?}) Future<Dio>
Get a WebF-configured Dio. Returns a shared instance per contextId. When contextId is null, creates a new ephemeral instance.
getOrigin(Uri uri) String
getWebFMethodChannel() MethodChannel
getWebFTemporaryPath() Future<String>
isGzip(List<int> data) bool
isValidUTF8String(Uint8List data) bool
registerWebFDioInterceptorInstaller(double contextId, void installer(Dio)) → void
Register a context-aware installer to be invoked for the Dio instance associated with the given context. If the Dio already exists, the installer is applied immediately; otherwise it will be applied on first creation.
removeHttpOverrides({required double contextId}) → void
resolveStringFromData(List<int> data, {Codec codec = utf8, bool preferSync = false}) FutureOr<String>
setupHttpOverrides({required double contextId}) WebFHttpOverrides
tryParseHttpDate(String input) DateTime?
unregisterWebFDioInterceptorInstallers(double contextId) → void
Remove all registered installers for a given context.