of<D extends RaylibStruct<D>> static method

StructType<D> of<D extends RaylibStruct<D>>([
  1. D? value
])

Gets the StructType either by type D directly or by infering type from value.

Implementation

static StructType<D> of<D extends RaylibStruct<D>>([D? value]) {
  final type = _types[D];

  if (type == null) {
    throw StateError('No StructType registered for $D.');
  }

  return type as StructType<D>;
}