PostgrestException.fromJson constructor

PostgrestException.fromJson(
  1. Map<String, dynamic> json, {
  2. String? message,
  3. int? code,
  4. String? details,
})

Implementation

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