EmptyMessage.fromJson constructor

EmptyMessage.fromJson(
  1. dynamic jsonObject
)

Implementation

EmptyMessage.fromJson(dynamic jsonObject) : super.fromJson(jsonObject) {
  if (type != DidcommMessages.emptyMessage.value) {
    throw Exception('Wrong message type');
  }
  if (body.isNotEmpty) throw Exception('this message is not empty');
}