startCustomTracking method

  1. @override
Future<String?> startCustomTracking(
  1. ProfileSource sourceType,
  2. String source
)
override

The function startCustomTracking takes a ProfileSource and a source as arguments, converts them into a map of arguments, invokes a method called startCustomTracking using a method channel, and returns the result as a Future<String?>. @param {ProfileSource} sourceType - The sourceType parameter is of type ProfileSource and represents the type of the profile source. It could be an enum value or a string that indicates the source type. @param {String} source - The source parameter is a string that represents the source of the tracking. It could be a URL, a file path, or any other identifier that helps identify the source of the tracking data. @returns The method startCustomTracking returns a Future of type String?.

Implementation

@override
Future<String?> startCustomTracking(
    ProfileSource sourceType, String source) async {
  Map<String, String> arguments = {
    'sourceType': sourceType.toString(),
    'source': source,
  };
  final returnVal = await methodChannel.invokeMethod<String>(
      'startCustomTracking', arguments);
  return returnVal;
}