// 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/ios/ios.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';

extension UserLocation on MAMapView {
  //region getters
  Future<bool?> get_showsUserLocation() async {
    final __result__ = await kAmapMapFluttifyChannel.invokeMethod("MAMapView::get_showsUserLocation", {'__this__': this});
    return __result__;
  }
  
  Future<MAUserLocation?> get_userLocation() async {
    final __result__ = await kAmapMapFluttifyChannel.invokeMethod("MAMapView::get_userLocation", {'__this__': this});
    return AmapMapFluttifyIOSAs<MAUserLocation>(__result__);
  }
  
  Future<bool?> get_customizeUserLocationAccuracyCircleRepresentation() async {
    final __result__ = await kAmapMapFluttifyChannel.invokeMethod("MAMapView::get_customizeUserLocationAccuracyCircleRepresentation", {'__this__': this});
    return __result__;
  }
  
  Future<MACircle?> get_userLocationAccuracyCircle() async {
    final __result__ = await kAmapMapFluttifyChannel.invokeMethod("MAMapView::get_userLocationAccuracyCircle", {'__this__': this});
    return AmapMapFluttifyIOSAs<MACircle>(__result__);
  }
  
  Future<MAUserTrackingMode?> get_userTrackingMode() async {
    final __result__ = await kAmapMapFluttifyChannel.invokeMethod("MAMapView::get_userTrackingMode", {'__this__': this});
    return (__result__ as int).toMAUserTrackingMode();
  }
  
  Future<bool?> get_userLocationVisible() async {
    final __result__ = await kAmapMapFluttifyChannel.invokeMethod("MAMapView::get_isUserLocationVisible", {'__this__': this});
    return __result__;
  }
  
  Future<double?> get_distanceFilter() async {
    final __result__ = await kAmapMapFluttifyChannel.invokeMethod("MAMapView::get_distanceFilter", {'__this__': this});
    return __result__;
  }
  
  Future<double?> get_desiredAccuracy() async {
    final __result__ = await kAmapMapFluttifyChannel.invokeMethod("MAMapView::get_desiredAccuracy", {'__this__': this});
    return __result__;
  }
  
  Future<double?> get_headingFilter() async {
    final __result__ = await kAmapMapFluttifyChannel.invokeMethod("MAMapView::get_headingFilter", {'__this__': this});
    return __result__;
  }
  
  Future<bool?> get_pausesLocationUpdatesAutomatically() async {
    final __result__ = await kAmapMapFluttifyChannel.invokeMethod("MAMapView::get_pausesLocationUpdatesAutomatically", {'__this__': this});
    return __result__;
  }
  
  Future<bool?> get_allowsBackgroundLocationUpdates() async {
    final __result__ = await kAmapMapFluttifyChannel.invokeMethod("MAMapView::get_allowsBackgroundLocationUpdates", {'__this__': this});
    return __result__;
  }
  
  //endregion

  //region setters
  Future<void> set_showsUserLocation(bool? showsUserLocation) async {
    await kAmapMapFluttifyChannel.invokeMethod('MAMapView::set_showsUserLocation', <String, dynamic>{'__this__': this, "showsUserLocation": showsUserLocation});
  }
  
  Future<void> set_customizeUserLocationAccuracyCircleRepresentation(bool? customizeUserLocationAccuracyCircleRepresentation) async {
    await kAmapMapFluttifyChannel.invokeMethod('MAMapView::set_customizeUserLocationAccuracyCircleRepresentation', <String, dynamic>{'__this__': this, "customizeUserLocationAccuracyCircleRepresentation": customizeUserLocationAccuracyCircleRepresentation});
  }
  
  Future<void> set_userTrackingMode(MAUserTrackingMode? userTrackingMode) async {
    await kAmapMapFluttifyChannel.invokeMethod('MAMapView::set_userTrackingMode', <String, dynamic>{'__this__': this, "userTrackingMode": userTrackingMode?.toValue()});
  }
  
  Future<void> set_distanceFilter(double? distanceFilter) async {
    await kAmapMapFluttifyChannel.invokeMethod('MAMapView::set_distanceFilter', <String, dynamic>{'__this__': this, "distanceFilter": distanceFilter});
  }
  
  Future<void> set_desiredAccuracy(double? desiredAccuracy) async {
    await kAmapMapFluttifyChannel.invokeMethod('MAMapView::set_desiredAccuracy', <String, dynamic>{'__this__': this, "desiredAccuracy": desiredAccuracy});
  }
  
  Future<void> set_headingFilter(double? headingFilter) async {
    await kAmapMapFluttifyChannel.invokeMethod('MAMapView::set_headingFilter', <String, dynamic>{'__this__': this, "headingFilter": headingFilter});
  }
  
  Future<void> set_pausesLocationUpdatesAutomatically(bool? pausesLocationUpdatesAutomatically) async {
    await kAmapMapFluttifyChannel.invokeMethod('MAMapView::set_pausesLocationUpdatesAutomatically', <String, dynamic>{'__this__': this, "pausesLocationUpdatesAutomatically": pausesLocationUpdatesAutomatically});
  }
  
  Future<void> set_allowsBackgroundLocationUpdates(bool? allowsBackgroundLocationUpdates) async {
    await kAmapMapFluttifyChannel.invokeMethod('MAMapView::set_allowsBackgroundLocationUpdates', <String, dynamic>{'__this__': this, "allowsBackgroundLocationUpdates": allowsBackgroundLocationUpdates});
  }
  
  //endregion

  //region methods
  
  Future<void> setUserTrackingMode_animated(MAUserTrackingMode? mode, bool? animated) async {
    // print log
    if (fluttifyLogEnabled) {
      debugPrint('fluttify-dart: MAMapView@$refId::setUserTrackingMode([\'animated\':$animated])');
    }
  
    // invoke native method
    final __result__ = await kAmapMapFluttifyChannel.invokeMethod('MAMapView::setUserTrackingMode_animated', {"mode": mode?.toValue(), "animated": animated, "__this__": this});
  
  
    // handle native call
  
  
    return __result__;
  }
  
  
  Future<void> updateUserLocationRepresentation(MAUserLocationRepresentation? representation) async {
    // print log
    if (fluttifyLogEnabled) {
      debugPrint('fluttify-dart: MAMapView@$refId::updateUserLocationRepresentation([])');
    }
  
    // invoke native method
    final __result__ = await kAmapMapFluttifyChannel.invokeMethod('MAMapView::updateUserLocationRepresentation', {"representation": representation, "__this__": this});
  
  
    // handle native call
  
  
    return __result__;
  }
  
  //endregion
}