BmapCoreFluttifyAndroidAs<T> function

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

Implementation

@optionalTypeArgs
T? BmapCoreFluttifyAndroidAs<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;
  }


  final FoundationFluttifyObject = FoundationFluttifyAndroidAs<T>(__this__);
  if (FoundationFluttifyObject != null) {
    return FoundationFluttifyObject;
  }
  final CoreLocationFluttifyObject = CoreLocationFluttifyAndroidAs<T>(__this__);
  if (CoreLocationFluttifyObject != null) {
    return CoreLocationFluttifyObject;
  }

  // 匹配不到目标类型, 直接返回原对象
  debugPrint('匹配不到目标类型, 直接返回原对象');
  return __this__;
}