get<T> method

T get<T>(
  1. int index, {
  2. dynamic def,
})

Implementation

T get<T>(int index, {dynamic def}) {
  var val = this[index];

  if (val == null) {
    return def as T;
  }

  return val as T;
}