PlatformData constructor

PlatformData({
  1. String baseUrl = '',
  2. String currentUrl = '',
  3. String userAgent = '',
  4. int width = 0,
  5. int height = 0,
  6. String? language,
})

Creates a client-side PlatformData instance.

Implementation

PlatformData({
  String baseUrl = '',
  String currentUrl = '',
  String userAgent = '',
  int width = 0,
  int height = 0,
  String? language,
}) : _baseUrl = baseUrl.trim().isEmpty ? null : baseUrl,
     _currentUrl = currentUrl.trim().isEmpty ? null : currentUrl,
     _userAgent = userAgent.trim().isEmpty ? null : userAgent,
     _width = width == 0 ? null : width,
     _height = height == 0 ? null : height,
     _language = language.isNullOrEmpty ? null : language;