read static method

Future<Map<String, dynamic>?> read()

Read the state for this project. Returns null when absent.

Falls back to the legacy pointer when no session file exists, so an app started by an older artisan, or a hand-written ~/.artisan/state.json from the documented recovery recipe, still resolves.

Implementation

static Future<Map<String, dynamic>?> read() async {
  return await _readFile(path) ?? await _readFile(legacyPointerPath);
}