FAssets class
Contains the assets and nested directories in the assets
directory.
Besides the assets and nested directories, it also provides a contents for querying the assets in the current directory.
To convert an asset into a widget, call the asset like a function
(https://dart.dev/language/callable-objects].
final widget = FAssets.path.to.asset();
The call(...)
functions are provided by extensions. By default, only the ImageAsset extension is bundled.
3rd party packages are supported via 'extension' packages. extension
packages contain an extension
that provide a
call(...)
function that transforms an Asset
into a 3rd party type.
Type | Package | Extension Package | Version |
---|---|---|---|
SVG images | flutter_svg |
nitrogen_flutter_svg |
|
Lottie animations | lottie |
nitrogen_lottie |
Constructors
- FAssets()
-
const
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