get<R> method

  1. @override
R? get<R>([
  1. dynamic id = 0
])
override

Get Data of provide Type R and at an index id

id optional index value as int R type of argument expected

Implementation

@override
R? get<R>([id = 0]) {
  assert((data[R]?.length ?? 0) > id,
      'index out of boud ${data[R]?.length} $id');
  assert(R == dynamic || R == Object || (data[R][id]?.runtimeType ?? R) == R,
      'type mismatch expected $R found ${data[R][id]?.runtimeType}');
  return data[R][id];
}