ShareDetails.fromJson constructor

ShareDetails.fromJson(
  1. Map<String, dynamic> json
)

Implementation

factory ShareDetails.fromJson(Map<String, dynamic> json) {
  return ShareDetails(
    shareErrors: (json['ShareErrors'] as List?)
        ?.whereNotNull()
        .map((e) => ShareError.fromJson(e as Map<String, dynamic>))
        .toList(),
    successfulShares: (json['SuccessfulShares'] as List?)
        ?.whereNotNull()
        .map((e) => e as String)
        .toList(),
  );
}