factory ErrorDetails.fromJson(Map<String, dynamic> json) { return ErrorDetails( code: json['code'] as String?, message: json['message'] as String?, ); }