fromMap method

  1. @override
NotificationFailure fromMap(
  1. Map<String, dynamic> map
)

Converts the object from a Map representation.

Returns the object from the Map representation.

Implementation

@override
NotificationFailure fromMap(Map<String, dynamic> map) {
  return NotificationFailure(
    message: map.parseDefault<String>('message', ''),
    code: map.parse<String>('code'),
    details: map.parse<String>('details'),
    stackTrace: map.parse<String>('stackTrace') != null
        ? StackTrace.fromString(map.parse<String>('stackTrace') ?? '')
        : null,
  );
}