fromAssets static method

Future<ZdsThemeData> fromAssets(
  1. String path
)

Asynchronously creates an instance of ZdsThemeData from the JSON file at the given path.

path represents the location of the JSON file in your application assets.

The JSON data is expected to be a serialized version of the ZdsThemeData object.

Returns a Future that completes with the ZdsThemeData once it has been loaded and parsed.

Implementation

static Future<ZdsThemeData> fromAssets(String path) async {
  final json = await _readAsset(path);
  return ZdsThemeData.fromJsonString(json);
}