decode static method

int decode(
  1. String pageToken, [
  2. int defaultValue = 0
])

Implementation

static int decode(String pageToken, [int defaultValue = 0]) {
  var value = defaultValue;
  if (!(pageToken == null || pageToken.trim().isEmpty)) {
    try {
      value = int.parse(utf8.decode(base64Decode(pageToken)).split(':').last);
    } catch (e) {}
  }
  return value;
}