setSource static method

Future<void> setSource(
  1. String resource,
  2. String platform,
  3. String language
)

Sets SDK source metadata.

Migration Note: Migrated from platform channels to native Dart implementation. Stores source metadata in SDK configuration.

Android Reference: CometChat.setSource()

Implementation

static Future<void> setSource(
    String resource, String platform, String language) async {
  try {
    // Store in SDK config or preferences
    // This is metadata that can be sent with API requests
    Logger.info('CometChat',
        'Set source: resource=$resource, platform=$platform, language=$language');

    // For now, just log it. In production, this would be stored and sent with API requests
    // The SDK instance can access this via config if needed
  } catch (e) {
    Logger.error('CometChat', 'Set source failed', e);
  }
}