userAgent property

String get userAgent

The User-Agent for REST calls, e.g. hatang-chat-flutter/0.2.0 (ios/18.1; protocol/1).

Implementation

String get userAgent {
  final v = osVersion;
  final platform = v == null || v.isEmpty ? os : '$os/$v';
  return 'hatang-chat-$sdkName/$sdkVersion ($platform; protocol/$protocolVersion)';
}