extractEJson static method

Int64 extractEJson(
  1. Map<String, dynamic> eJsonMap
)

Implementation

static Int64 extractEJson(Map<String, dynamic> eJsonMap) {
  var entry = eJsonMap.entries.first;
  if (entry.key != type$int64) {
    throw ArgumentError(
        'The received Map is not a avalid EJson Int64 representation');
  }

  if (entry.value is! String) {
    throw ArgumentError(
        'The received Map is not a valid EJson Int64 representation');
  }
  return Int64(int.parse(entry.value));
}