search method

Future<Map<String, dynamic>?> search(
  1. String name,
  2. String path
)

Search for the configuration in the file at path.

Implementation

Future<Map<String, dynamic>?> search(String name, String path) async {
  try {
    final contents = await fs.file(path).readAsString();
    return getConfig(name, path, contents);
  } catch (e) {
    // ignore: avoid_print
    print('Error reading $path: $e');
    return null;
  }
}