tryParse static method

ContactButton? tryParse(
  1. Json j
)

Parses the wire shape, or null for an unknown kind.

Implementation

static ContactButton? tryParse(Json j) {
  final kind = ContactKind.tryParse(str(j, 'kind'));
  if (kind == null) return null;
  return ContactButton(kind: kind, url: strOr(j, 'url'), label: strOr(j, 'label'));
}