AmapLocationFluttifyAndroidAs<T> function

  1. @optionalTypeArgs
T? AmapLocationFluttifyAndroidAs<T>(
  1. dynamic __this__
)

Implementation

@optionalTypeArgs
T? AmapLocationFluttifyAndroidAs<T>(dynamic __this__) {
  final typeName = T.toString();

  if (__this__ == null) {
    return null;
  } else if (RegExp(r'^(List<)?(String|int|double)(>)?|(Map<String,(String|int|double)>)$').hasMatch(typeName)) {
    return __this__ as T;
  }
  else if (T == com_amap_api_location_AMapLocationClient) {
    return (com_amap_api_location_AMapLocationClient()..refId = (__this__ as Ref).refId) as T;
  } else if (T == com_amap_api_location_AMapLocationListener) {
    return (com_amap_api_location_AMapLocationListener.subInstance()..refId = (__this__ as Ref).refId) as T;
  } else if (T == com_amap_api_location_APSService) {
    return (com_amap_api_location_APSService()..refId = (__this__ as Ref).refId) as T;
  } else if (T == com_amap_api_location_DPoint) {
    return (com_amap_api_location_DPoint()..refId = (__this__ as Ref).refId) as T;
  } else if (T == com_amap_api_location_CoordinateConverter) {
    return (com_amap_api_location_CoordinateConverter()..refId = (__this__ as Ref).refId) as T;
  } else if (T == com_amap_api_location_CoordUtil) {
    return (com_amap_api_location_CoordUtil()..refId = (__this__ as Ref).refId) as T;
  } else if (T == com_amap_api_location_UmidtokenInfo) {
    return (com_amap_api_location_UmidtokenInfo()..refId = (__this__ as Ref).refId) as T;
  } else if (T == com_amap_api_location_AMapLocation) {
    return (com_amap_api_location_AMapLocation()..refId = (__this__ as Ref).refId) as T;
  } else if (T == com_amap_api_location_AMapLocationClientOption) {
    return (com_amap_api_location_AMapLocationClientOption()..refId = (__this__ as Ref).refId) as T;
  } else if (T == com_amap_api_location_AMapLocationQualityReport) {
    return (com_amap_api_location_AMapLocationQualityReport()..refId = (__this__ as Ref).refId) as T;
  } else if (T == com_amap_api_fence_DistrictItem) {
    return (com_amap_api_fence_DistrictItem()..refId = (__this__ as Ref).refId) as T;
  } else if (T == com_amap_api_fence_GeoFenceClient) {
    return (com_amap_api_fence_GeoFenceClient()..refId = (__this__ as Ref).refId) as T;
  } else if (T == com_amap_api_fence_GeoFenceListener) {
    return (com_amap_api_fence_GeoFenceListener.subInstance()..refId = (__this__ as Ref).refId) as T;
  } else if (T == com_amap_api_fence_GeoFence) {
    return (com_amap_api_fence_GeoFence()..refId = (__this__ as Ref).refId) as T;
  } else if (T == com_amap_api_fence_PoiItem) {
    return (com_amap_api_fence_PoiItem()..refId = (__this__ as Ref).refId) as T;
  } else if (T == android_content_Context) {
    return (android_content_Context()..refId = (__this__ as Ref).refId) as T;
  } else if (T == android_content_Intent) {
    return (android_content_Intent()..refId = (__this__ as Ref).refId) as T;
  } else if (T == android_content_ContentProvider) {
    return (android_content_ContentProvider()..refId = (__this__ as Ref).refId) as T;
  } else if (T == android_app_Application) {
    return (android_app_Application()..refId = (__this__ as Ref).refId) as T;
  } else if (T == android_app_Notification) {
    return (android_app_Notification()..refId = (__this__ as Ref).refId) as T;
  } else if (T == android_app_Activity) {
    return (android_app_Activity()..refId = (__this__ as Ref).refId) as T;
  } else if (T == android_app_PendingIntent) {
    return (android_app_PendingIntent()..refId = (__this__ as Ref).refId) as T;
  } else if (T == android_os_Bundle) {
    return (android_os_Bundle()..refId = (__this__ as Ref).refId) as T;
  } else if (T == android_os_Binder) {
    return (android_os_Binder()..refId = (__this__ as Ref).refId) as T;
  } else if (T == android_view_View) {
    return (android_view_View()..refId = (__this__ as Ref).refId) as T;
  } else if (T == android_view_SurfaceView) {
    return (android_view_SurfaceView()..refId = (__this__ as Ref).refId) as T;
  } else if (T == android_view_SurfaceHolder) {
    return (android_view_SurfaceHolder.subInstance()..refId = (__this__ as Ref).refId) as T;
  } else if (T == android_opengl_GLSurfaceView) {
    return (android_opengl_GLSurfaceView()..refId = (__this__ as Ref).refId) as T;
  } else if (T == android_view_View_OnApplyWindowInsetsListener) {
    return (android_view_View_OnApplyWindowInsetsListener.subInstance()..refId = (__this__ as Ref).refId) as T;
  } else if (T == android_view_ViewGroup) {
    return (android_view_ViewGroup()..refId = (__this__ as Ref).refId) as T;
  } else if (T == android_graphics_Point) {
    return (android_graphics_Point()..refId = (__this__ as Ref).refId) as T;
  } else if (T == android_graphics_PointF) {
    return (android_graphics_PointF()..refId = (__this__ as Ref).refId) as T;
  } else if (T == android_graphics_Bitmap) {
    return (android_graphics_Bitmap()..refId = (__this__ as Ref).refId) as T;
  } else if (T == android_widget_ImageView) {
    return (android_widget_ImageView()..refId = (__this__ as Ref).refId) as T;
  } else if (T == java_io_Serializable) {
    return (java_io_Serializable.subInstance()..refId = (__this__ as Ref).refId) as T;
  } else if (T == java_io_File) {
    return (java_io_File()..refId = (__this__ as Ref).refId) as T;
  } else if (T == android_location_Location) {
    return (android_location_Location()..refId = (__this__ as Ref).refId) as T;
  } else if (T == android_view_MotionEvent) {
    return (android_view_MotionEvent()..refId = (__this__ as Ref).refId) as T;
  } else if (T == android_graphics_drawable_Drawable) {
    return (android_graphics_drawable_Drawable()..refId = (__this__ as Ref).refId) as T;
  } else if (T == android_widget_FrameLayout) {
    return (android_widget_FrameLayout()..refId = (__this__ as Ref).refId) as T;
  } else if (T == android_widget_TextView) {
    return (android_widget_TextView()..refId = (__this__ as Ref).refId) as T;
  } else if (T == android_widget_LinearLayout) {
    return (android_widget_LinearLayout()..refId = (__this__ as Ref).refId) as T;
  } else if (T == android_widget_RelativeLayout) {
    return (android_widget_RelativeLayout()..refId = (__this__ as Ref).refId) as T;
  } else if (T == android_os_Parcelable) {
    return (android_os_Parcelable.subInstance()..refId = (__this__ as Ref).refId) as T;
  } else if (T == android_util_Pair) {
    return (android_util_Pair()..refId = (__this__ as Ref).refId) as T;
  }

  else {
    return __this__;
  }
}