Raylib constructor
Raylib({
- required String core,
- String? gui,
- RaylibTempOptions? tempOptions,
- Random? random,
Implementation
Raylib({
required String core,
String? gui,
RaylibTempOptions? tempOptions,
Random? random,
}) {
_dynCore = .open(core);
_dynGui = gui != null ? .open(gui) : null;
this.tempOptions = tempOptions ?? .new();
this.random = random ?? .new();
if (_instance != null) {
throw StateError("There can only be one instance of a $runtimeType!");
}
if (this.tempOptions.stringCount < 4) {
throw StateError("Raylib expects at least 4 preallocated String slots, got ${this.tempOptions.stringCount}");
}
_instance = this;
_init();
}