ServerTime.fromCBJson constructor

ServerTime.fromCBJson(
  1. Map<String, dynamic> json
)

Creates a ServerTime from a Coinbase JSON object.

Implementation

factory ServerTime.fromCBJson(Map<String, dynamic> json) {
  return ServerTime(
    DateTime.parse(json['iso']),
    nullableNumber(json, 'epochSeconds'),
    nullableNumber(json, 'epochMillis'),
  );
}