get<R> method

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

id optional parameter can be anything

this is ignored in simple event structure, included here to unify get api for complex data structure

Implementation

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