SuccessMessage.fromJson(Map<String, dynamic> json) : success = json["success"], error = json.containsKey('error') ? (json['error']) : null;