Resources class

Packages a file as a dart library so it can be expanded during the install process. This provide a way of shipping small resources in a dart application even if the app is compiled. NOTE: if you are publishing your dart app to pub.dev then there is a 10MB limit imposed by pub.dev.

If a resource path ends with the extension '.dcl_template' then the '.dcli_template' extension will be stripped from the filename when it is unpacked. e.g. my_class.dart.dcli_template -> my_class.dart

Constructors

Resources()

Properties

generatedRoot → String
directory where we save the packed resources.
latefinal
hashCode → int
The hash code for this object.
no setterinherited
pathToRegistry → String
Path to the registry library
latefinal
resourceRoot → String
Directory where will look for resources to pack
latefinal
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

getExcludedPaths(SettingsYaml yaml, String path, int index) → List<String>
@Throwing(PathNotFoundException) @Throwing(SettingsYamlException)
isExcluded(String path, List<String> excludes) → bool
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
pack({bool includeHidden = false}) → void
Packs the set of files located under resourceRoot Each resource has a registry entry and independently gzip-compressed 256 KiB parts in separate classes under generatedRoot.
toString() → String
A string representation of this object.
inherited

Operators

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

Static Properties

pathToPackYaml → String
no setter
projectRoot → String
@Throwing(MissingDependencyException)
no setter
scopeKeyProjectRoot → ScopeKey<String>
Inject this scope key to overload the projectRoot for unit testing.
final