current method
Returns the current properties of the system
Implementation
Future<EventSystemProperties> current() async {
String? appVersion;
try {
final packageInfo = await PackageInfo.fromPlatform();
appVersion = packageInfo.version;
} catch (e) {
appVersion = null;
}
final manager = await deviceManager.current();
return EventSystemProperties(
appVersion: appVersion,
device: DeviceProperties(
manufacturer: manager?.deviceManufacturer,
model: manager?.deviceModel,
),
browser: BrowserProperties(
name: manager?.browserName,
version: manager?.browserVersion,
userAgent: manager?.userAgent,
),
operatingSystem: OperatingSystemProperties(
name: manager?.operatingSystem ?? OperatingSystemName.unknown,
version: manager?.operatingSystemVersion,
));
}