CockpitCommandError.fromJson constructor

CockpitCommandError.fromJson(
  1. Map<String, Object?> json
)

Decodes a CockpitCommandError from a JSON object.

Implementation

factory CockpitCommandError.fromJson(Map<String, Object?> json) {
  return CockpitCommandError(
    code: json['code']! as String,
    message: json['message']! as String,
    details: Map<String, Object?>.from(
      (json['details'] as Map<Object?, Object?>?) ??
          const <Object?, Object?>{},
    ),
  );
}