resources library
Utilities for working with test resources.
Functions
-
copyResourceInto(
String path, Directory dir, {String prefix = _defaultPrefix}) → void -
Copies the test resource at the specified
pathinto the providedDirectoryas aFilewith the same filename as the original. -
copyResourceTo(
String path, File file, {String prefix = _defaultPrefix}) → void -
Copies the test resource at the specified
pathinto the providedFile, creating it if necessary. -
resourceBytes(
String path, {String prefix = _defaultPrefix}) → Uint8List - Retrieves a test resource, as a the bytes of the file content.
-
resourceDirectory(
{String path = '', String prefix = _defaultPrefix}) → Directory -
Retrieves a test resource
Directory. -
resourceFile(
String path, {String prefix = _defaultPrefix}) → File -
Retrieves a test resource, as a
File. -
resourceString(
String path, {String prefix = _defaultPrefix}) → String -
Retrieves a test resource, as a
Stringof the file contents. -
resourceUri(
String path, {String prefix = _defaultPrefix}) → Uri -
Retrieves a test resource, as a
Uri. -
templateResource(
String path, Map< String, dynamic> params, {String prefix = _defaultPrefix}) → String -
Retrieves a
Stringcontaining the contents of a resource text file with its template values (surrounded by{{}}) replaced with the provided map values.