Email.fromNative constructor

Email.fromNative(
  1. Map<Object?, Object?> data
)

Construct an Email from the given data.

Implementation

factory Email.fromNative(Map<Object?, Object?> data) {
  return Email(
    address: data['address'] as String?,
    body: data['body'] as String?,
    subject: data['subject'] as String?,
    type: EmailType.fromRawValue(data['type'] as int? ?? 0),
  );
}