AssetPDFSource class
Fetches a PDF document from an AssetBundle.
This class provides functionality to load a PDF document from an asset specified by assetPath
.
It can use either a provided AssetBundle or the default asset bundle of the current BuildContext.
See also:
- SfPdfViewer.asset, which provides a convenient way to display a PDF viewer widget using an asset.
Constructors
- AssetPDFSource.new(String assetPath, {AssetBundle? bundle})
- Creates an AssetPDFSource that fetches the PDF document from the specified asset.
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
-
getBytes(
BuildContext context) → Future< Uint8List> -
Retrieves the bytes of the PDF document from the asset.
override
-
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