Window.fromId constructor

Window.fromId(
  1. Sdl sdl,
  2. int id
)

Get a window from a stored ID.

Implementation

factory Window.fromId(final Sdl sdl, final int id) {
  final handle = sdl.sdl.SDL_GetWindowFromID(id);
  if (handle == nullptr) {
    throw SdlError(id, sdl.getError());
  }
  return Window(sdl, handle);
}