toMap<T, S> function

Map<T, S> toMap<T, S>(
  1. dynamic value
)

Converts value to Map or throws FormatException if conversion fails.

Implementation

Map<T, S> toMap<T, S>(dynamic value) =>
    toMapOrNull(value) ?? (throw FormatException('Invalid Map value: $value'));