$getProperty method

  1. @override
$Value? $getProperty(
  1. Runtime runtime,
  2. String identifier
)

Get a property by identifier on this instance

Implementation

@override
$Value? $getProperty(Runtime runtime, String identifier) {
  switch (identifier) {
    case 'crs':
      final _crs = $value.crs;
      return runtime.wrapAlways(_crs);

    case 'initialCenter':
      final _initialCenter = $value.initialCenter;
      return runtime.wrapAlways(_initialCenter);

    case 'initialZoom':
      final _initialZoom = $value.initialZoom;
      return $double(_initialZoom);

    case 'initialRotation':
      final _initialRotation = $value.initialRotation;
      return $double(_initialRotation);

    case 'initialCameraFit':
      final _initialCameraFit = $value.initialCameraFit;
      return _initialCameraFit == null
          ? const $null()
          : $CameraFit.wrap(_initialCameraFit);

    case 'minZoom':
      final _minZoom = $value.minZoom;
      return _minZoom == null ? const $null() : $double(_minZoom);

    case 'maxZoom':
      final _maxZoom = $value.maxZoom;
      return _maxZoom == null ? const $null() : $double(_maxZoom);

    case 'backgroundColor':
      final _backgroundColor = $value.backgroundColor;
      return $Color.wrap(_backgroundColor);

    case 'onTap':
      final _onTap = $value.onTap;
      return _onTap == null
          ? const $null()
          : $Function((runtime, target, args) {
              _onTap(args[0]!.$value, args[1]!.$value);
              return const $null();
            });

    case 'onSecondaryTap':
      final _onSecondaryTap = $value.onSecondaryTap;
      return _onSecondaryTap == null
          ? const $null()
          : $Function((runtime, target, args) {
              _onSecondaryTap(args[0]!.$value, args[1]!.$value);
              return const $null();
            });

    case 'onLongPress':
      final _onLongPress = $value.onLongPress;
      return _onLongPress == null
          ? const $null()
          : $Function((runtime, target, args) {
              _onLongPress(args[0]!.$value, args[1]!.$value);
              return const $null();
            });

    case 'onPointerDown':
      final _onPointerDown = $value.onPointerDown;
      return _onPointerDown == null
          ? const $null()
          : $Function((runtime, target, args) {
              _onPointerDown(args[0]!.$value, args[1]!.$value);
              return const $null();
            });

    case 'onPointerUp':
      final _onPointerUp = $value.onPointerUp;
      return _onPointerUp == null
          ? const $null()
          : $Function((runtime, target, args) {
              _onPointerUp(args[0]!.$value, args[1]!.$value);
              return const $null();
            });

    case 'onPointerCancel':
      final _onPointerCancel = $value.onPointerCancel;
      return _onPointerCancel == null
          ? const $null()
          : $Function((runtime, target, args) {
              _onPointerCancel(args[0]!.$value, args[1]!.$value);
              return const $null();
            });

    case 'onPointerHover':
      final _onPointerHover = $value.onPointerHover;
      return _onPointerHover == null
          ? const $null()
          : $Function((runtime, target, args) {
              _onPointerHover(args[0]!.$value, args[1]!.$value);
              return const $null();
            });

    case 'onPositionChanged':
      final _onPositionChanged = $value.onPositionChanged;
      return _onPositionChanged == null
          ? const $null()
          : $Function((runtime, target, args) {
              _onPositionChanged(args[0]!.$value, args[1]!.$value);
              return const $null();
            });

    case 'onMapEvent':
      final _onMapEvent = $value.onMapEvent;
      return _onMapEvent == null
          ? const $null()
          : $Function((runtime, target, args) {
              _onMapEvent(args[0]!.$value);
              return const $null();
            });

    case 'cameraConstraint':
      return $CameraConstraint.wrap($value.cameraConstraint);

    case 'onMapReady':
      final _onMapReady = $value.onMapReady;
      return _onMapReady == null
          ? const $null()
          : $Function((runtime, target, args) {
              _onMapReady();
              return const $null();
            });

    case 'keepAlive':
      return $bool($value.keepAlive);

    case 'interactionOptions':
      return $InteractionOptions.wrap($value.interactionOptions);
  }
  return _superclass.$getProperty(runtime, identifier);
}