AssetResource class

Asset resource’s metadata class. For example, here is the metadata of packages/flutter_demo/assets/images/example.png asset:

  • packageName:flutter_demo
  • assetName:assets/images/example.png
  • fileDirname:assets/images
  • fileBasename:example.png
  • fileBasenameNoExtension:example
  • fileExtname:.png

Constructors

AssetResource(String assetName, {String? packageName})
Creates an object to hold the asset resource’s metadata.
const

Properties

assetName String
The name of the main asset from the set of asset resources to choose from.
final
fileBasename String
The file basename of the asset resource.
no setter
fileBasenameNoExtension String
The no extension file basename of the asset resource.
no setter
fileDirname String
The directory path name of the asset resource.
no setter
fileExtname String
The file extension name of the asset resource.
no setter
hashCode int
The hash code for this object.
no setterinherited
keyName String
The name used to generate the key to obtain the asset resource. For local assets this is assetName, and for assets from packages the assetName is prefixed 'packages/<package_name>/'.
no setter
packageName String?
The name of the package from which the asset resource is included.
final
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