// 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_search_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';

class _com_amap_api_services_share_ShareSearch_OnShareSearchListener_SUB extends java_lang_Object with com_amap_api_services_share_ShareSearch_OnShareSearchListener {}

mixin com_amap_api_services_share_ShareSearch_OnShareSearchListener on java_lang_Object {
  

  static com_amap_api_services_share_ShareSearch_OnShareSearchListener subInstance() => _com_amap_api_services_share_ShareSearch_OnShareSearchListener_SUB();

  static Future<com_amap_api_services_share_ShareSearch_OnShareSearchListener> anonymous__() async {
    final __result__ = await kAmapSearchFluttifyChannel.invokeMethod('com.amap.api.services.share.ShareSearch.OnShareSearchListener::createAnonymous__');
  
    final __object__ = AmapSearchFluttifyAndroidAs<com_amap_api_services_share_ShareSearch_OnShareSearchListener>(__result__)!;
  
    // handle callback
    MethodChannel('com.amap.api.services.share.ShareSearch.OnShareSearchListener::Callback@${__object__.refId}', kAmapSearchFluttifyMethodCodec)
        .setMethodCallHandler((methodCall) async {
          try {
            final args = methodCall.arguments as Map;
            switch (methodCall.method) {
              case 'onPoiShareUrlSearched_':
                // print log
                if (fluttifyLogEnabled) {
                  debugPrint('fluttify-dart-callback: __object__.onPoiShareUrlSearched?.call([\'var1\':${args['var1']}, \'var2\':${args['var2']}])');
                }
            
                // handle the native call
                __object__.onPoiShareUrlSearched?.call(args['var1'], args['var2']);
                break;
              case 'onLocationShareUrlSearched_':
                // print log
                if (fluttifyLogEnabled) {
                  debugPrint('fluttify-dart-callback: __object__.onLocationShareUrlSearched?.call([\'var1\':${args['var1']}, \'var2\':${args['var2']}])');
                }
            
                // handle the native call
                __object__.onLocationShareUrlSearched?.call(args['var1'], args['var2']);
                break;
              case 'onNaviShareUrlSearched_':
                // print log
                if (fluttifyLogEnabled) {
                  debugPrint('fluttify-dart-callback: __object__.onNaviShareUrlSearched?.call([\'var1\':${args['var1']}, \'var2\':${args['var2']}])');
                }
            
                // handle the native call
                __object__.onNaviShareUrlSearched?.call(args['var1'], args['var2']);
                break;
              case 'onBusRouteShareUrlSearched_':
                // print log
                if (fluttifyLogEnabled) {
                  debugPrint('fluttify-dart-callback: __object__.onBusRouteShareUrlSearched?.call([\'var1\':${args['var1']}, \'var2\':${args['var2']}])');
                }
            
                // handle the native call
                __object__.onBusRouteShareUrlSearched?.call(args['var1'], args['var2']);
                break;
              case 'onWalkRouteShareUrlSearched_':
                // print log
                if (fluttifyLogEnabled) {
                  debugPrint('fluttify-dart-callback: __object__.onWalkRouteShareUrlSearched?.call([\'var1\':${args['var1']}, \'var2\':${args['var2']}])');
                }
            
                // handle the native call
                __object__.onWalkRouteShareUrlSearched?.call(args['var1'], args['var2']);
                break;
              case 'onDrivingRouteShareUrlSearched_':
                // print log
                if (fluttifyLogEnabled) {
                  debugPrint('fluttify-dart-callback: __object__.onDrivingRouteShareUrlSearched?.call([\'var1\':${args['var1']}, \'var2\':${args['var2']}])');
                }
            
                // handle the native call
                __object__.onDrivingRouteShareUrlSearched?.call(args['var1'], args['var2']);
                break;
              default:
                throw MissingPluginException('方法${methodCall.method}未实现');
                break;
            }
          } catch (e) {
            debugPrint(e.toString());
            rethrow;
          }
        });
  
    return __object__;
  }
  

  @override
  final String tag__ = 'amap_search_fluttify';

  

  

  Future<void> Function(String? var1, int? var2)? onPoiShareUrlSearched;
  
  Future<void> Function(String? var1, int? var2)? onLocationShareUrlSearched;
  
  Future<void> Function(String? var1, int? var2)? onNaviShareUrlSearched;
  
  Future<void> Function(String? var1, int? var2)? onBusRouteShareUrlSearched;
  
  Future<void> Function(String? var1, int? var2)? onWalkRouteShareUrlSearched;
  
  Future<void> Function(String? var1, int? var2)? onDrivingRouteShareUrlSearched;
  
}

