AssetStruct class

Constructors

AssetStruct({required String name, required List<String> files, required List<AssetStruct> structs, required String? packageName})
AssetStruct.fromDirectory(Directory directory, {AssetStruct? parent, String? packageName})
from directory
factory

Properties

allStructs List<AssetStruct>
取得所有層級的子目錄, 包含自己
no setter
classname String?
類別名稱, 當呼叫過toDartCode後才會有值
getter/setter pair
files List<String>
檔案名稱列表
final
hashCode int
The hash code for this object.
no setterinherited
hasPackageName bool
是否有packageName
no setter
name String
final
packageName String?
package名稱 套件名稱, 當有值時會將路徑聲明為特定套件內的資源路徑 例如: 有值時 (packages/packageName/assets/images/a.png) 無值時 (assets/images/a.png)
final
parent AssetStruct?
no setter
path String
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
structs List<AssetStruct>
第一層子目錄
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toDartCode({String classNamePrefix = '', bool fieldStatic = false, List<String> classNamePath = const [], bool generateInstance = false, String? instanceName}) String
to dart code classNamePrefix 類別名稱的前綴 fieldStatic 所有欄位是否為static classNamePath 類別名稱的路徑 generateInstance 是否產生實體 instanceName 實體名稱
toJson() Map<String, dynamic>
to json
toString() String
A string representation of this object.
override

Operators

operator ==(Object other) bool
The equality operator.
inherited