getContext property

({OffscreenCanvasRenderingContext2D? Function(String contextId, [dynamic options]) $1, ImageBitmapRenderingContext? Function(String contextId, [dynamic options]) $2, WebGLRenderingContext? Function(String contextId, [dynamic options]) $3, WebGL2RenderingContext? Function(String contextId, [dynamic options]) $4, Object? Function(OffscreenRenderingContextId contextId, [dynamic options]) $5}) get getContext

Overload accessor: $1, $2, $3, $4, $5

Implementation

({
  /// Returns an object that exposes an API for drawing on the OffscreenCanvas object. contextId specifies the desired API: "2d", "bitmaprenderer", "webgl", or "webgl2". options is handled by that API.
  ///
  ///  This specification defines the "2d" context below, which is similar but distinct from the "2d" context that is created from a canvas element. The WebGL specifications define the "webgl" and "webgl2" contexts. [WEBGL]
  ///
  ///  Returns null if the canvas has already been initialized with another context type (e.g., trying to get a "2d" context after getting a "webgl" context).
  ///
  ///  [MDN Reference](https://developer.mozilla.org/docs/Web/API/OffscreenCanvas/getContext)
  _i3.OffscreenCanvasRenderingContext2D? Function(
    _i2.String contextId, [
    _i2.dynamic options,
  ]) $1,

  /// Returns an object that exposes an API for drawing on the OffscreenCanvas object. contextId specifies the desired API: "2d", "bitmaprenderer", "webgl", or "webgl2". options is handled by that API.
  ///
  /// This specification defines the "2d" context below, which is similar but distinct from the "2d" context that is created from a canvas element. The WebGL specifications define the "webgl" and "webgl2" contexts. [WEBGL]
  ///
  /// Returns null if the canvas has already been initialized with another context type (e.g., trying to get a "2d" context after getting a "webgl" context).
  ///
  /// [MDN Reference](https://developer.mozilla.org/docs/Web/API/OffscreenCanvas/getContext)
  _i3.ImageBitmapRenderingContext? Function(
    _i2.String contextId, [
    _i2.dynamic options,
  ]) $2,

  /// Returns an object that exposes an API for drawing on the OffscreenCanvas object. contextId specifies the desired API: "2d", "bitmaprenderer", "webgl", or "webgl2". options is handled by that API.
  ///
  /// This specification defines the "2d" context below, which is similar but distinct from the "2d" context that is created from a canvas element. The WebGL specifications define the "webgl" and "webgl2" contexts. [WEBGL]
  ///
  /// Returns null if the canvas has already been initialized with another context type (e.g., trying to get a "2d" context after getting a "webgl" context).
  ///
  /// [MDN Reference](https://developer.mozilla.org/docs/Web/API/OffscreenCanvas/getContext)
  _i3.WebGLRenderingContext? Function(
    _i2.String contextId, [
    _i2.dynamic options,
  ]) $3,

  /// Returns an object that exposes an API for drawing on the OffscreenCanvas object. contextId specifies the desired API: "2d", "bitmaprenderer", "webgl", or "webgl2". options is handled by that API.
  ///
  /// This specification defines the "2d" context below, which is similar but distinct from the "2d" context that is created from a canvas element. The WebGL specifications define the "webgl" and "webgl2" contexts. [WEBGL]
  ///
  /// Returns null if the canvas has already been initialized with another context type (e.g., trying to get a "2d" context after getting a "webgl" context).
  ///
  /// [MDN Reference](https://developer.mozilla.org/docs/Web/API/OffscreenCanvas/getContext)
  _i3.WebGL2RenderingContext? Function(
    _i2.String contextId, [
    _i2.dynamic options,
  ]) $4,

  /// Returns an object that exposes an API for drawing on the OffscreenCanvas object. contextId specifies the desired API: "2d", "bitmaprenderer", "webgl", or "webgl2". options is handled by that API.
  ///
  /// This specification defines the "2d" context below, which is similar but distinct from the "2d" context that is created from a canvas element. The WebGL specifications define the "webgl" and "webgl2" contexts. [WEBGL]
  ///
  /// Returns null if the canvas has already been initialized with another context type (e.g., trying to get a "2d" context after getting a "webgl" context).
  ///
  /// [MDN Reference](https://developer.mozilla.org/docs/Web/API/OffscreenCanvas/getContext)
  _i2.Object? Function(
    _i3.OffscreenRenderingContextId contextId, [
    _i2.dynamic options,
  ]) $5,
}) get getContext => (
      $1: _getContext$1,
      $2: _getContext$2,
      $3: _getContext$3,
      $4: _getContext$4,
      $5: _getContext$5,
    );