load static method

Future<NebulaProjectConfig?> load([
  1. String path = _defaultPath
])

Loads config from path. Returns null if the file does not exist. Throws FormatException if the file is not valid JSON.

Implementation

static Future<NebulaProjectConfig?> load(
    [String path = _defaultPath]) async {
  final file = File(path);
  if (!await file.exists()) return null;

  final content = await file.readAsString();
  final json = jsonDecode(content) as Map<String, dynamic>;
  return NebulaProjectConfig.fromJson(json);
}