ProjectModel class

Represents config.json

Constructors

ProjectModel.new(String name, String cidCode, int generateNfts, List<ProjectLayerModel> layers, Directory metaDir, Directory layerDir, Directory layerCrunchDir, Directory imageDir, Directory rarityDir, File rarityNftCsv, File rarityLayersCsv, File rarityNftPng, File rarityLayersPng)
Constructor.

Properties

cidCode String
getter/setter pair
generateNfts int
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
imageDir Directory
final
layerCrunchDir Directory
getter/setter pair
layerDir Directory
getter/setter pair
layers List<ProjectLayerModel>
getter/setter pair
metaDir Directory
final
name String
getter/setter pair
rarityDir Directory
final
rarityLayersCsv File
final
rarityLayersPng File
final
rarityNftCsv File
final
rarityNftPng File
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

addLayer(String name, Directory directory, double probability, Map<String, int> weights) → dynamic
Adds layer to model.
getCombinationCount() int
How many NFT permutations are possible, assuming each file has the same chance / weight to be used.
getFileCount() int
How many files (in layer folders) does this project have?
getLayerCount() int
How many layers does the project have.
isEmpty() bool
Returns whether this model is empty by testing emptiness of name.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
saveToFolder(Directory projectDir) Future
Saves this ProjectModel to the specified folder.
toJson() Map<String, dynamic>
toPrettyJson() String
Convenience method.
toString() String
A string representation of this object.
inherited

Operators

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

Static Properties

cidDefaultCode String
final

Static Methods

empty() ProjectModel
Returns empty model.
fromJson(Map<String, dynamic> projectJson, Directory projectDir) ProjectModel
throws NftCliException if false.
init(String name, int generateNfts, List<ProjectLayerModel> projectLayers, Directory layersDir) ProjectModel
Returns model with initial values. Some of the model's values are set to sensible defaults.
loadFromFolder(Directory projectDir) Future<ProjectModel>
throws NftCliException if false.