// ignore_for_file: non_constant_identifier_names, camel_case_types, missing_return, unused_import, unused_local_variable, dead_code, unnecessary_cast
//////////////////////////////////////////////////////////
// GENERATED BY FLUTTIFY. DO NOT EDIT IT.
//////////////////////////////////////////////////////////

import 'dart:typed_data';

import 'package:amap_map_fluttify/src/android/android.export.g.dart';
import 'package:flutter/foundation.dart';
import 'package:flutter/services.dart';

import 'package:foundation_fluttify/foundation_fluttify.dart';
import 'package:core_location_fluttify/core_location_fluttify.dart';
import 'package:amap_core_fluttify/amap_core_fluttify.dart';
import 'package:amap_search_fluttify/amap_search_fluttify.dart';
import 'package:amap_location_fluttify/amap_location_fluttify.dart';

class com_amap_api_maps_AMapUtils extends java_lang_Object  {
  //region constants
  static const String name__ = 'com.amap.api.maps.AMapUtils';

  @override
  final String tag__ = 'amap_map_fluttify';

  static final int DRIVING_DEFAULT = 0;
  static final int DRIVING_SAVE_MONEY = 1;
  static final int DRIVING_SHORT_DISTANCE = 2;
  static final int DRIVING_NO_HIGHWAY = 3;
  static final int DRIVING_AVOID_CONGESTION = 4;
  static final int DRIVING_NO_HIGHWAY_AVOID_SHORT_MONEY = 5;
  static final int DRIVING_NO_HIGHWAY_AVOID_CONGESTION = 6;
  static final int DRIVING_SAVE_MONEY_AVOID_CONGESTION = 7;
  static final int DRIVING_NO_HIGHWAY_SAVE_MONEY_AVOID_CONGESTION = 8;
  static final int BUS_TIME_FIRST = 0;
  static final int BUS_MONEY_LITTLE = 1;
  static final int BUS_TRANSFER_LITTLE = 2;
  static final int BUS_WALK_LITTLE = 3;
  static final int BUS_COMFORT = 4;
  static final int BUS_NO_SUBWAY = 5;
  //endregion

  //region creators
  static Future<com_amap_api_maps_AMapUtils> create__() async {
    final __result__ = await kAmapMapFluttifyChannel.invokeMethod(
      'ObjectFactory::createcom_amap_api_maps_AMapUtils__',
    
    );
    return AmapMapFluttifyAndroidAs<com_amap_api_maps_AMapUtils>(__result__)!;
  }
  
  static Future<List<com_amap_api_maps_AMapUtils>> create_batch__(int length) async {
    assert(true);
    final __result_batch__ = await  kAmapMapFluttifyChannel.invokeListMethod(
      'ObjectFactory::create_batchcom_amap_api_maps_AMapUtils__',
      {'length': length}
    );
    return __result_batch__
        ?.map((it) => AmapMapFluttifyAndroidAs<com_amap_api_maps_AMapUtils>(it))
        .where((element) => element !=null)
        .cast<com_amap_api_maps_AMapUtils>()
        .toList() ?? <com_amap_api_maps_AMapUtils>[];
  }
  
  //endregion

  //region getters
  
  //endregion

  //region setters
  
  //endregion

  //region methods
  
  static Future<double?> calculateLineDistance(com_amap_api_maps_model_LatLng? var0, com_amap_api_maps_model_LatLng? var1) async {
    // print log
    if (fluttifyLogEnabled) {
      debugPrint('fluttify-dart: com.amap.api.maps.AMapUtils::calculateLineDistance([])');
    }
  
    // invoke native method
    final __result__ = await kAmapMapFluttifyChannel.invokeMethod('com.amap.api.maps.AMapUtils::calculateLineDistance', {"var0": var0, "var1": var1});
  
  
    // handle native call
  
  
    return __result__;
  }
  
  
  static Future<double?> calculateArea__com_amap_api_maps_model_LatLng__com_amap_api_maps_model_LatLng(com_amap_api_maps_model_LatLng? var0, com_amap_api_maps_model_LatLng? var1) async {
    // print log
    if (fluttifyLogEnabled) {
      debugPrint('fluttify-dart: com.amap.api.maps.AMapUtils::calculateArea([])');
    }
  
    // invoke native method
    final __result__ = await kAmapMapFluttifyChannel.invokeMethod('com.amap.api.maps.AMapUtils::calculateArea__com_amap_api_maps_model_LatLng__com_amap_api_maps_model_LatLng', {"var0": var0, "var1": var1});
  
  
    // handle native call
  
  
    return __result__;
  }
  
  
  static Future<double?> calculateArea__List_com_amap_api_maps_model_LatLng_(List<com_amap_api_maps_model_LatLng>? var0) async {
    // print log
    if (fluttifyLogEnabled) {
      debugPrint('fluttify-dart: com.amap.api.maps.AMapUtils::calculateArea([])');
    }
  
    // invoke native method
    final __result__ = await kAmapMapFluttifyChannel.invokeMethod('com.amap.api.maps.AMapUtils::calculateArea__List_com_amap_api_maps_model_LatLng_', {"var0": var0});
  
  
    // handle native call
  
  
    return __result__;
  }
  
  
  static Future<void> getLatestAMapApp(android_content_Context? var0) async {
    // print log
    if (fluttifyLogEnabled) {
      debugPrint('fluttify-dart: com.amap.api.maps.AMapUtils::getLatestAMapApp([])');
    }
  
    // invoke native method
    final __result__ = await kAmapMapFluttifyChannel.invokeMethod('com.amap.api.maps.AMapUtils::getLatestAMapApp', {"var0": var0});
  
  
    // handle native call
  
  
    return __result__;
  }
  
  
  static Future<void> openAMapNavi(com_amap_api_maps_model_NaviPara? var0, android_content_Context? var1) async {
    // print log
    if (fluttifyLogEnabled) {
      debugPrint('fluttify-dart: com.amap.api.maps.AMapUtils::openAMapNavi([])');
    }
  
    // invoke native method
    final __result__ = await kAmapMapFluttifyChannel.invokeMethod('com.amap.api.maps.AMapUtils::openAMapNavi', {"var0": var0, "var1": var1});
  
  
    // handle native call
  
  
    return __result__;
  }
  
  
  static Future<void> openAMapPoiNearbySearch(com_amap_api_maps_model_PoiPara? var0, android_content_Context? var1) async {
    // print log
    if (fluttifyLogEnabled) {
      debugPrint('fluttify-dart: com.amap.api.maps.AMapUtils::openAMapPoiNearbySearch([])');
    }
  
    // invoke native method
    final __result__ = await kAmapMapFluttifyChannel.invokeMethod('com.amap.api.maps.AMapUtils::openAMapPoiNearbySearch', {"var0": var0, "var1": var1});
  
  
    // handle native call
  
  
    return __result__;
  }
  
  
  static Future<void> openAMapDrivingRoute(com_amap_api_maps_model_RoutePara? var0, android_content_Context? var1) async {
    // print log
    if (fluttifyLogEnabled) {
      debugPrint('fluttify-dart: com.amap.api.maps.AMapUtils::openAMapDrivingRoute([])');
    }
  
    // invoke native method
    final __result__ = await kAmapMapFluttifyChannel.invokeMethod('com.amap.api.maps.AMapUtils::openAMapDrivingRoute', {"var0": var0, "var1": var1});
  
  
    // handle native call
  
  
    return __result__;
  }
  
  
  static Future<void> openAMapTransitRoute(com_amap_api_maps_model_RoutePara? var0, android_content_Context? var1) async {
    // print log
    if (fluttifyLogEnabled) {
      debugPrint('fluttify-dart: com.amap.api.maps.AMapUtils::openAMapTransitRoute([])');
    }
  
    // invoke native method
    final __result__ = await kAmapMapFluttifyChannel.invokeMethod('com.amap.api.maps.AMapUtils::openAMapTransitRoute', {"var0": var0, "var1": var1});
  
  
    // handle native call
  
  
    return __result__;
  }
  
  
  static Future<void> openAMapWalkingRoute(com_amap_api_maps_model_RoutePara? var0, android_content_Context? var1) async {
    // print log
    if (fluttifyLogEnabled) {
      debugPrint('fluttify-dart: com.amap.api.maps.AMapUtils::openAMapWalkingRoute([])');
    }
  
    // invoke native method
    final __result__ = await kAmapMapFluttifyChannel.invokeMethod('com.amap.api.maps.AMapUtils::openAMapWalkingRoute', {"var0": var0, "var1": var1});
  
  
    // handle native call
  
  
    return __result__;
  }
  
  //endregion

  @override
  String toString() {
    return 'com_amap_api_maps_AMapUtils{refId: $refId, runtimeType: $runtimeType, tag__: $tag__}';
  }
}

extension com_amap_api_maps_AMapUtils_Batch on List<com_amap_api_maps_AMapUtils?> {
  String? get refId {
    if (isEmpty) return null;
    return first?.refId;
  }

  //region getters
  
  //endregion

  //region setters
  
  //endregion

  //region methods
  
  static Future<List<double?>> calculateLineDistance_batch(List<com_amap_api_maps_model_LatLng?> var0, List<com_amap_api_maps_model_LatLng?> var1) async {
    assert(var0.length == var1.length);
  
    // invoke native method
    final resultBatch = await kAmapMapFluttifyChannel.invokeMethod('com.amap.api.maps.AMapUtils::calculateLineDistance_batch', [for (int __i__ = 0; __i__ < var0.length; __i__++) {"var0": var0[__i__], "var1": var1[__i__]}]);
  
  
    return (resultBatch as List).map((__result__) => __result__).cast<double?>().toList();
  }
  
  
  static Future<List<double?>> calculateArea__com_amap_api_maps_model_LatLng__com_amap_api_maps_model_LatLng_batch(List<com_amap_api_maps_model_LatLng?> var0, List<com_amap_api_maps_model_LatLng?> var1) async {
    assert(var0.length == var1.length);
  
    // invoke native method
    final resultBatch = await kAmapMapFluttifyChannel.invokeMethod('com.amap.api.maps.AMapUtils::calculateArea__com_amap_api_maps_model_LatLng__com_amap_api_maps_model_LatLng_batch', [for (int __i__ = 0; __i__ < var0.length; __i__++) {"var0": var0[__i__], "var1": var1[__i__]}]);
  
  
    return (resultBatch as List).map((__result__) => __result__).cast<double?>().toList();
  }
  
  
  static Future<List<double?>> calculateArea__List_com_amap_api_maps_model_LatLng__batch(List<List<com_amap_api_maps_model_LatLng>?> var0) async {
    assert(true);
  
    // invoke native method
    final resultBatch = await kAmapMapFluttifyChannel.invokeMethod('com.amap.api.maps.AMapUtils::calculateArea__List_com_amap_api_maps_model_LatLng__batch', [for (int __i__ = 0; __i__ < var0.length; __i__++) {"var0": var0[__i__]}]);
  
  
    return (resultBatch as List).map((__result__) => __result__).cast<double?>().toList();
  }
  
  
  static Future<List<void>> getLatestAMapApp_batch(List<android_content_Context?> var0) async {
    assert(true);
  
    // invoke native method
    final resultBatch = await kAmapMapFluttifyChannel.invokeMethod('com.amap.api.maps.AMapUtils::getLatestAMapApp_batch', [for (int __i__ = 0; __i__ < var0.length; __i__++) {"var0": var0[__i__]}]);
  
  
    return (resultBatch as List).map((__result__) => __result__).cast<void>().toList();
  }
  
  
  static Future<List<void>> openAMapNavi_batch(List<com_amap_api_maps_model_NaviPara?> var0, List<android_content_Context?> var1) async {
    assert(var0.length == var1.length);
  
    // invoke native method
    final resultBatch = await kAmapMapFluttifyChannel.invokeMethod('com.amap.api.maps.AMapUtils::openAMapNavi_batch', [for (int __i__ = 0; __i__ < var0.length; __i__++) {"var0": var0[__i__], "var1": var1[__i__]}]);
  
  
    return (resultBatch as List).map((__result__) => __result__).cast<void>().toList();
  }
  
  
  static Future<List<void>> openAMapPoiNearbySearch_batch(List<com_amap_api_maps_model_PoiPara?> var0, List<android_content_Context?> var1) async {
    assert(var0.length == var1.length);
  
    // invoke native method
    final resultBatch = await kAmapMapFluttifyChannel.invokeMethod('com.amap.api.maps.AMapUtils::openAMapPoiNearbySearch_batch', [for (int __i__ = 0; __i__ < var0.length; __i__++) {"var0": var0[__i__], "var1": var1[__i__]}]);
  
  
    return (resultBatch as List).map((__result__) => __result__).cast<void>().toList();
  }
  
  
  static Future<List<void>> openAMapDrivingRoute_batch(List<com_amap_api_maps_model_RoutePara?> var0, List<android_content_Context?> var1) async {
    assert(var0.length == var1.length);
  
    // invoke native method
    final resultBatch = await kAmapMapFluttifyChannel.invokeMethod('com.amap.api.maps.AMapUtils::openAMapDrivingRoute_batch', [for (int __i__ = 0; __i__ < var0.length; __i__++) {"var0": var0[__i__], "var1": var1[__i__]}]);
  
  
    return (resultBatch as List).map((__result__) => __result__).cast<void>().toList();
  }
  
  
  static Future<List<void>> openAMapTransitRoute_batch(List<com_amap_api_maps_model_RoutePara?> var0, List<android_content_Context?> var1) async {
    assert(var0.length == var1.length);
  
    // invoke native method
    final resultBatch = await kAmapMapFluttifyChannel.invokeMethod('com.amap.api.maps.AMapUtils::openAMapTransitRoute_batch', [for (int __i__ = 0; __i__ < var0.length; __i__++) {"var0": var0[__i__], "var1": var1[__i__]}]);
  
  
    return (resultBatch as List).map((__result__) => __result__).cast<void>().toList();
  }
  
  
  static Future<List<void>> openAMapWalkingRoute_batch(List<com_amap_api_maps_model_RoutePara?> var0, List<android_content_Context?> var1) async {
    assert(var0.length == var1.length);
  
    // invoke native method
    final resultBatch = await kAmapMapFluttifyChannel.invokeMethod('com.amap.api.maps.AMapUtils::openAMapWalkingRoute_batch', [for (int __i__ = 0; __i__ < var0.length; __i__++) {"var0": var0[__i__], "var1": var1[__i__]}]);
  
  
    return (resultBatch as List).map((__result__) => __result__).cast<void>().toList();
  }
  
  //endregion
}