handleMethodCall method

Future handleMethodCall(
  1. MethodCall call
)

Handles method calls over the MethodChannel of this plugin. Note: Check the "federated" architecture for a new way of doing this: https://flutter.dev/go/federated-plugins

Implementation

Future<dynamic> handleMethodCall(MethodCall call) async {
  switch (call.method) {
    case 'initialize':
      initialize(call);
      break;
    case 'setServerURL':
      handleSetServerURL(call);
      break;
    case "hasOptedOutTracking":
      return handleHasOptedOutTracking();
    case "optInTracking":
      handleOptInTracking();
      break;
    case "optOutTracking":
      handleOptOutTracking();
      break;
    case "identify":
      handleIdentify(call);
      break;
    case "alias":
      handleAlias(call);
      break;
    case 'track':
      handleTrack(call);
      break;
    case "trackWithGroups":
      handleTrackWithGroups(call);
      break;
    case "setGroup":
      handleSetGroup(call);
      break;
    case "addGroup":
      handleAddGroup(call);
      break;
    case "removeGroup":
      handleRemoveGroup(call);
      break;
    case "registerSuperProperties":
      handleRegisterSuperProperties(call);
      break;
    case "registerSuperPropertiesOnce":
      handleRegisterSuperPropertiesOnce(call);
      break;
    case "unregisterSuperProperty":
      handleUnregisterSuperProperty(call);
      break;
    case "timeEvent":
      handleTimeEvent(call);
      break;
    case "reset":
      handleReset();
      break;
    case "getDistinctId":
      return handleGetDistinctId();
    case "set":
      handleSet(call);
      break;
    case "setOnce":
      handleSetOnce(call);
      break;
    case "increment":
      handlePeopleIncrement(call);
      break;
    case "append":
      handlePeopleAppend(call);
      break;
    case "union":
      handlePeopleUnion(call);
      break;
    case "remove":
      handlePeopleRemove(call);
      break;
    case "unset":
      handlePeopleUnset(call);
      break;
    case "trackCharge":
      handleTrackCharge(call);
      break;
    case "clearCharge":
      handleClearCharge();
      break;
    case "deleteUsers":
      handleDeleteUsers();
      break;
    case "groupSetProperties":
      handleGroupSetProperties(call);
      break;
    case "groupSetPropertyOnce":
      handleGroupSetPropertyOnce(call);
      break;
    case "groupUnsetProperty":
      handleGroupUnsetProperty(call);
      break;
    case "groupRemovePropertyValue":
      handleGroupRemove(call);
      break;
    case "groupUnionProperty":
      handleGroupUnion(call);
      break;
    default:
      throw PlatformException(
        code: 'Unimplemented',
        details:
            'mixpanel_flutter for web doesn\'t implement \'${call.method}\'',
      );
  }
}