AssetsRequestHandler class
This RequestHandler is used to provide access to assets
- Inheritance
-
- Object
- RequestHandler
- AssetsRequestHandler
Constructors
- AssetsRequestHandler(String path, {required AssetProvider assetProvider, TransformData? transformData})
- Creates an instance of AssetsRequestHandler with a root path and an assetProvider.
Properties
- assetProvider → AssetProvider
-
The assetProvider implementation may depend on the platform
(Native or JS).
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- path → String
-
Folder containing the assets, relative to the root bundle.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- transformData → TransformData
-
This function is able to modify a resource based on the String param.
final
Methods
-
getParamAsInt(
HttpRequest request, String name, {int defaultValue = 0}) → int -
Extract a
request
paramname
and convert it to intinherited -
handle(
int requestId, HttpRequest request, String href) → Future< bool> -
This method should handle the requests if the implementation supports the
resource demanded.
override
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
sendData(
HttpRequest request, {required List< int> data, MediaType? mediaType}) → Future<void> -
Sends a bytes buffer as the request response.
inherited
-
sendResource(
HttpRequest request, {required Resource resource, MediaType? mediaType}) → Future< void> -
Sends a byte stream (supporting range access) as the request response.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited