getMobileIntegrationsMap method

Map<String, bool>? getMobileIntegrationsMap()

Gets the integrations map formatted for mobile platforms.

Converts integration configurations to boolean values for mobile compatibility. Object values are treated as true, boolean values are preserved.

Returns a Map<String, bool> of integration settings.

Implementation

Map<String, bool>? getMobileIntegrationsMap() {
  // if the enabled value for an integration is an object, then we will consider it as true by default.
  Map<String, bool>? integrationsMobile = integrations?.map(
      (integration, enabled) =>
          MapEntry(integration, enabled is bool ? enabled : true));
  return integrationsMobile;
}