mockOn static method
void
mockOn({})
Change to test mode.
Implementation
@visibleForTesting
static void mockOn({
String? deviceId,
String? osName,
String? osVersion,
num? osVersionCode,
String? softwareName,
String? softwareVersion,
String? applicationId,
String? applicationType,
String? applicationName,
String? applicationVersion,
String? applicationBuildCode,
}) {
_isMockMode = true;
_mockData = DeviceInformation();
if (deviceId?.isNotEmpty ?? false) {
_mockData.deviceId = deviceId!;
}
if (osName?.isNotEmpty ?? false) {
_mockData.osName = osName!;
}
if (osVersion?.isNotEmpty ?? false) {
_mockData.osVersion = osVersion!;
}
if (osVersionCode != null) {
_mockData.osVersionCode = osVersionCode;
}
if (softwareName?.isNotEmpty ?? false) {
_mockData.softwareName = softwareName!;
}
if (softwareVersion?.isNotEmpty ?? false) {
_mockData.softwareVersion = softwareVersion!;
}
if (applicationId?.isNotEmpty ?? false) {
_mockData.applicationId = applicationId!;
}
if (applicationType?.isNotEmpty ?? false) {
_mockData.applicationType = applicationType!;
}
if (applicationName?.isNotEmpty ?? false) {
_mockData.applicationName = applicationName!;
}
if (applicationVersion?.isNotEmpty ?? false) {
_mockData.applicationVersion = applicationVersion!;
}
if (applicationBuildCode?.isNotEmpty ?? false) {
_mockData.applicationBuildCode = applicationBuildCode!;
}
}