getProfilingData method

  1. @override
Future<Map<String, String>?> getProfilingData(
  1. String sessionId,
  2. String orgId,
  3. String fpServer
)
override

Implementation

@override
Future<Map<String, String>?> getProfilingData(
    String sessionId, String orgId, String fpServer) async {
  final result = await methodChannel.invokeMethod('getProfilingData',
      {'sessionId': sessionId, 'orgId': orgId, 'fpServer': fpServer});
  // Check if the result is not null and is a Map<dynamic, dynamic>
  Map<String, String>? profilingData = {
    'sessionId': 'null',
    'status': 'Not Completed'
  };
  if (result != null &&
      result['sessionId'] != null &&
      result is Map<dynamic, dynamic>) {
    // Convert the result to Map<String, String>
    profilingData = result.cast<String, String>();
    return profilingData;
  }
  return profilingData;
}