load static method
Implementation
static Future<StaticHeadConfig> load(File file) async {
final decoded = jsonDecode(await file.readAsString());
if (decoded is! Map) {
throw const FormatException('Config root must be a JSON object.');
}
return StaticHeadConfig.fromJson(Map<String, Object?>.from(decoded));
}