Raylib constructor

Raylib(
  1. void dartMain(
    1. Raylib
    ), {
  2. RaylibTempBaseOptions? tempOptions,
  3. Random? random,
})

Implementation

Raylib(void Function(Raylib) dartMain, {
  super.tempOptions,
  super.random,
}) {
  if (_instance != null) {
    throw StateError("There can only be one instance of a $runtimeType!");
  }

  _instance = this;

  _dartMain = (() {
    _init();
    dartMain(this);
  }).toJS;
}