getImage method

  1. @override
ImageWrapper getImage(
  1. int? maxTextureSize
)
override

Method is used to obtain origin sublocation image with specified maxTextureSize. maxTextureSize maximum texture size to render. Returns platform image.

Example:

// Get sublocation image
ImageWrapper? image = sublocation.getImage(1024); // max texture size 1024
if (image != null) {
 print('Sublocation image obtained with max texture size 1024');
}

Implementation

@override
ImageWrapper getImage(int? maxTextureSize) {
    final _getImageFfi = __lib.catchArgumentError(() => __lib.nativeLibrary.lookupFunction<
        Pointer<Void> Function(Pointer<Void>, Pointer<Void>),
        Pointer<Void> Function(Pointer<Void>, Pointer<Void>)
      >('navigine_sdk_flutter_Sublocation_getImage__MaxTextureSize'));
    final __resultHandle = _getImageFfi(this.ptr, toNativePtrInt32(maxTextureSize));
    final _result = ImageWrapperImpl.fromNativePtr(__resultHandle);
    exception.checkCallResult();
    return _result;
}