GlpiException.fromResponse constructor Null safety

GlpiException.fromResponse(
  1. int code,
  2. List json
)

Create a new GlpiException from a http response

Implementation

factory GlpiException.fromResponse(int code, List<dynamic> json) {
  final reason = {
    'error': json.first.toString(),
    'message': json.last.toString()
  };
  return GlpiException._(code, reason);
}