Skip to content

Commit a13768c

Browse files
Issue #1000 - revert recent changes (#1010)
* Revert "[device_info_plus] Added more information for Windows (#814)" This reverts commit 055da82. * Issue #1000 - revert recent changes
1 parent 62c29f1 commit a13768c

File tree

11 files changed

+24
-497
lines changed

11 files changed

+24
-497
lines changed

packages/device_info_plus/device_info_plus/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## 4.0.3
2+
3+
- Reverted changes in 4.0.2
4+
15
## 4.0.2
26

37
- Added more information to `WindowsDeviceInfo`.

packages/device_info_plus/device_info_plus/example/lib/main.dart

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -177,28 +177,6 @@ class _MyAppState extends State<MyApp> {
177177
'numberOfCores': data.numberOfCores,
178178
'computerName': data.computerName,
179179
'systemMemoryInMegabytes': data.systemMemoryInMegabytes,
180-
'userName': data.userName,
181-
'majorVersion': data.majorVersion,
182-
'minorVersion': data.minorVersion,
183-
'buildNumber': data.buildNumber,
184-
'platformId': data.platformId,
185-
'csdVersion': data.csdVersion,
186-
'servicePackMajor': data.servicePackMajor,
187-
'servicePackMinor': data.servicePackMinor,
188-
'suitMask': data.suitMask,
189-
'productType': data.productType,
190-
'reserved': data.reserved,
191-
'buildLab': data.buildLab,
192-
'buildLabEx': data.buildLabEx,
193-
'digitalProductId': data.digitalProductId,
194-
'displayVersion': data.displayVersion,
195-
'editionId': data.editionId,
196-
'installDate': data.installDate,
197-
'productId': data.productId,
198-
'productName': data.productName,
199-
'registeredOwner': data.registeredOwner,
200-
'releaseId': data.releaseId,
201-
'deviceId': data.deviceId,
202180
};
203181
}
204182

packages/device_info_plus/device_info_plus/pubspec.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name: device_info_plus
22
description: Flutter plugin providing detailed information about the device
33
(make, model, etc.), and Android or iOS version the app is running on.
4-
version: 4.0.2
4+
version: 4.0.3
55
homepage: https://plus.fluttercommunity.dev/
66
repository: https://github.com/fluttercommunity/plus_plugins/tree/main/packages/
77

@@ -25,11 +25,11 @@ flutter:
2525
dependencies:
2626
flutter:
2727
sdk: flutter
28-
device_info_plus_platform_interface: ^2.4.0
28+
device_info_plus_platform_interface: ^2.5.0
2929
device_info_plus_macos: ^2.2.3
3030
device_info_plus_linux: ^2.1.1
3131
device_info_plus_web: ^2.1.0
32-
device_info_plus_windows: ^3.0.2
32+
device_info_plus_windows: ^3.0.3
3333

3434
dev_dependencies:
3535
flutter_test:

packages/device_info_plus/device_info_plus_platform_interface/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## 2.5.0
2+
3+
- Revert 2.4.0 changes
4+
15
## 2.4.0
26

37
- Windows: Add userName, majorVersion, minorVersion, buildNumber, platformId, csdVersion, servicePackMajor, servicePackMinor, suitMask, productType, reserved, buildLab, buildLabEx, digitalProductId, displayVersion, editionId, installDate, productId, productName, registeredOwner, releaseId, deviceId to WindowsDeviceInfo.

packages/device_info_plus/device_info_plus_platform_interface/lib/model/windows_device_info.dart

Lines changed: 0 additions & 135 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22
// Use of this source code is governed by a BSD-style license that can be
33
// found in the LICENSE file.
44

5-
import 'dart:typed_data';
6-
75
import 'base_device_info.dart';
86

97
/// Object encapsulating WINDOWS device information.
@@ -13,28 +11,6 @@ class WindowsDeviceInfo implements BaseDeviceInfo {
1311
required this.computerName,
1412
required this.numberOfCores,
1513
required this.systemMemoryInMegabytes,
16-
required this.userName,
17-
required this.majorVersion,
18-
required this.minorVersion,
19-
required this.buildNumber,
20-
required this.platformId,
21-
required this.csdVersion,
22-
required this.servicePackMajor,
23-
required this.servicePackMinor,
24-
required this.suitMask,
25-
required this.productType,
26-
required this.reserved,
27-
required this.buildLab,
28-
required this.buildLabEx,
29-
required this.digitalProductId,
30-
required this.displayVersion,
31-
required this.editionId,
32-
required this.installDate,
33-
required this.productId,
34-
required this.productName,
35-
required this.registeredOwner,
36-
required this.releaseId,
37-
required this.deviceId,
3814
});
3915

4016
/// The computer's fully-qualified DNS name, where available.
@@ -47,124 +23,13 @@ class WindowsDeviceInfo implements BaseDeviceInfo {
4723
/// This may not be the same as available memory.
4824
final int systemMemoryInMegabytes;
4925

50-
final String userName;
51-
52-
/// The major version number of the operating system.
53-
/// For example, for Windows 2000, the major version number is five.
54-
/// For more information, see the table in Remarks.
55-
/// https://docs.microsoft.com/en-us/windows-hardware/drivers/ddi/wdm/ns-wdm-_osversioninfoexw#remarks
56-
final int majorVersion;
57-
58-
/// The minor version number of the operating system.
59-
/// For example, for Windows 2000, the minor version number is zero.
60-
/// For more information, see the table in Remarks.
61-
/// https://docs.microsoft.com/en-us/windows-hardware/drivers/ddi/wdm/ns-wdm-_osversioninfoexw#remarks
62-
final int minorVersion;
63-
64-
/// The build number of the operating system.
65-
/// For example:
66-
/// - `22000` or greater for Windows 11.
67-
/// - `10240` or greator for Windows 10.
68-
final int buildNumber;
69-
70-
/// The operating system platform.
71-
/// For Win32 on NT-based operating systems, RtlGetVersion returns the value `VER_PLATFORM_WIN32_NT`.
72-
final int platformId;
73-
74-
/// The service-pack version string.
75-
/// This member contains a null-terminated string, such as "Service Pack 3", which indicates the latest service pack installed on the system.
76-
/// If no service pack is installed, RtlGetVersion might not initialize this string. Initialize szCSDVersion to zero (empty string) before the call to RtlGetVersion.
77-
final String csdVersion;
78-
79-
/// The major version number of the latest service pack installed on the system.
80-
/// For example, for Service Pack 3, the major version number is three.
81-
/// If no service pack has been installed, the value is zero.
82-
final int servicePackMajor;
83-
84-
/// The minor version number of the latest service pack installed on the system.
85-
/// For example, for Service Pack 3, the minor version number is zero.
86-
final int servicePackMinor;
87-
88-
/// The product suites available on the system.
89-
final int suitMask;
90-
91-
/// The product type. This member contains additional information about the system.
92-
final int productType;
93-
94-
/// Reserved for future use.
95-
final int reserved;
96-
97-
/// Value of `HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\BuildLab` registry key.
98-
/// For example: `22000.co_release.210604-1628`.
99-
final String buildLab;
100-
101-
/// Value of `HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\BuildLabEx` registry key.
102-
/// For example: `22000.1.amd64fre.co_release.210604-1628`.
103-
final String buildLabEx;
104-
105-
/// Value of `HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\DigitalProductId` registry key.
106-
final Uint8List digitalProductId;
107-
108-
/// Value of `HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\DisplayVersion` registry key.
109-
/// For example: `21H2`.
110-
final String displayVersion;
111-
112-
/// Value of `HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\EditionID` registry key.
113-
final String editionId;
114-
115-
/// Value of `HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\InstallDate` registry key.
116-
final DateTime installDate;
117-
118-
/// Displayed as "Product ID" in Windows Settings.
119-
/// Value of `HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProductId` registry key.
120-
/// For example: `00000-00000-0000-AAAAA`.
121-
final String productId;
122-
123-
/// Value of `HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProductName` registry key.
124-
/// For example: `Windows 10 Home Single Language`.
125-
final String productName;
126-
127-
/// Value of `HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\RegisteredOwner` registry key.
128-
/// For example: `Microsoft Corporation`.
129-
final String registeredOwner;
130-
131-
/// Value of `HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ReleaseId` registry key.
132-
/// For example: `1903`.
133-
final String releaseId;
134-
135-
/// Displayed as "Device ID" in Windows Settings.
136-
/// Value of `HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\SQMClient\MachineId` registry key.
137-
final String deviceId;
138-
13926
/// Serializes [WindowsDeviceInfo] to a map.
14027
@override
14128
Map<String, dynamic> toMap() {
14229
return {
14330
'computerName': computerName,
14431
'numberOfCores': numberOfCores,
14532
'systemMemoryInMegabytes': systemMemoryInMegabytes,
146-
'userName': userName,
147-
'majorVersion': majorVersion,
148-
'minorVersion': minorVersion,
149-
'buildNumber': buildNumber,
150-
'platformId': platformId,
151-
'csdVersion': csdVersion,
152-
'servicePackMajor': servicePackMajor,
153-
'servicePackMinor': servicePackMinor,
154-
'suitMask': suitMask,
155-
'productType': productType,
156-
'reserved': reserved,
157-
'buildLab': buildLab,
158-
'buildLabEx': buildLabEx,
159-
'digitalProductId': digitalProductId,
160-
'displayVersion': displayVersion,
161-
'editionId': editionId,
162-
'installDate': installDate,
163-
'productId': productId,
164-
'productName': productName,
165-
'registeredOwner': registeredOwner,
166-
'releaseId': releaseId,
167-
'deviceId': deviceId,
16833
};
16934
}
17035
}

packages/device_info_plus/device_info_plus_platform_interface/pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: device_info_plus_platform_interface
22
description: A common platform interface for the device_info_plus plugin.
3-
version: 2.4.0
3+
version: 2.5.0
44
homepage: https://plus.fluttercommunity.dev/
55
repository: https://github.com/fluttercommunity/plus_plugins/tree/main/packages/
66

packages/device_info_plus/device_info_plus_platform_interface/test/model/windows_device_info_test.dart

Lines changed: 0 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import 'dart:typed_data';
21
import 'package:device_info_plus_platform_interface/model/windows_device_info.dart';
32
import 'package:flutter_test/flutter_test.dart';
43

@@ -9,56 +8,12 @@ void main() {
98
computerName: 'computerName',
109
numberOfCores: 4,
1110
systemMemoryInMegabytes: 16,
12-
userName: 'userName',
13-
majorVersion: 10,
14-
minorVersion: 0,
15-
buildNumber: 10240,
16-
platformId: 1,
17-
csdVersion: 'csdVersion',
18-
servicePackMajor: 1,
19-
servicePackMinor: 0,
20-
suitMask: 1,
21-
productType: 1,
22-
reserved: 1,
23-
buildLab: '22000.co_release.210604-1628',
24-
buildLabEx: '22000.1.amd64fre.co_release.210604-1628',
25-
digitalProductId: Uint8List.fromList([]),
26-
displayVersion: '21H2',
27-
editionId: 'Pro',
28-
installDate: DateTime(2022, 04, 02),
29-
productId: '00000-00000-0000-AAAAA',
30-
productName: 'Windows 10 Pro',
31-
registeredOwner: 'registeredOwner',
32-
releaseId: 'releaseId',
33-
deviceId: 'deviceId',
3411
);
3512

3613
expect(windowsDeviceInfo.toMap(), {
3714
'computerName': 'computerName',
3815
'numberOfCores': 4,
3916
'systemMemoryInMegabytes': 16,
40-
'userName': 'userName',
41-
'majorVersion': 10,
42-
'minorVersion': 0,
43-
'buildNumber': 10240,
44-
'platformId': 1,
45-
'csdVersion': 'csdVersion',
46-
'servicePackMajor': 1,
47-
'servicePackMinor': 0,
48-
'suitMask': 1,
49-
'productType': 1,
50-
'reserved': 1,
51-
'buildLab': '22000.co_release.210604-1628',
52-
'buildLabEx': '22000.1.amd64fre.co_release.210604-1628',
53-
'digitalProductId': Uint8List.fromList([]),
54-
'displayVersion': '21H2',
55-
'editionId': 'Pro',
56-
'installDate': DateTime(2022, 04, 02),
57-
'productId': '00000-00000-0000-AAAAA',
58-
'productName': 'Windows 10 Pro',
59-
'registeredOwner': 'registeredOwner',
60-
'releaseId': 'releaseId',
61-
'deviceId': 'deviceId',
6217
});
6318
});
6419
});

packages/device_info_plus/device_info_plus_windows/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## 3.0.3
2+
3+
- Revert changes in 3.0.2
4+
15
## 3.0.2
26

37
- Add more information to WindowsDeviceInfo.

0 commit comments

Comments
 (0)