init static method
void
init({})
Initializes the PlatformData instance with the given values, falling back to the browser's values for any that are omitted.
Call once at startup, before the first read of PlatformData.current. Each call replaces the instance, so values from an earlier call are not kept.
Implementation
static void init({
String? baseUrl,
String? currentPath,
String? userAgent,
int? width,
int? height,
String? language,
}) {
_instance = PlatformData._(
baseUrl: baseUrl ?? '',
currentPath: currentPath ?? '',
userAgent: userAgent ?? '',
width: width ?? 0,
height: height ?? 0,
language: language,
);
}