readListFile static method

Future<AssetList?> readListFile(
  1. Lib lib,
  2. SharedOptions options
)

Implementation

static Future<AssetList?> readListFile(Lib lib, SharedOptions options) async {
  final File file = File(options.listPath);
  if (await file.exists()) {
    final String content = await file.readAsString();
    final AssetList list = AssetList(
      lib: lib,
      options: options,
      content: content,
    );
    return list;
  } else {
    return null;
  }
}