Skip to content

Commit dfc3f3d

Browse files
committed
Merge branch 'main' into win
2 parents 0d5069d + d1d7ad5 commit dfc3f3d

File tree

28 files changed

+891
-87
lines changed

28 files changed

+891
-87
lines changed

packages/device_info_plus/device_info_plus/CHANGELOG.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,12 @@
1+
## 5.0.1
2+
3+
- Fixing federated plugin architecture versions.
4+
5+
## 5.0.0
6+
7+
- Re-introduce: Added more information to `WindowsDeviceInfo`.
8+
- device_info_plus_platform_interface to 4.0.0
9+
110
## 4.1.3
211

312
- Detects iOS simulator device id instead of simulator's underlying architecture.

packages/device_info_plus/device_info_plus/example/integration_test/device_info_plus_test.dart

Lines changed: 95 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ void main() {
7676
expect(iosInfo.utsname.version, isNotNull);
7777
}, skip: !Platform.isIOS);
7878

79-
testWidgets('Check all android info values are set',
79+
testWidgets('Check all android info values are available',
8080
(WidgetTester tester) async {
8181
expect(androidInfo.version.baseOS, isNotNull);
8282
expect(androidInfo.version.codename, isNotNull);
@@ -110,7 +110,7 @@ void main() {
110110
expect(androidInfo.systemFeatures, isNotNull);
111111
}, skip: !Platform.isAndroid);
112112

113-
testWidgets('Check all macos info values are set',
113+
testWidgets('Check all macos info values are available',
114114
((WidgetTester tester) async {
115115
expect(macosInfo.computerName, isNotNull);
116116
expect(macosInfo.hostName, isNotNull);
@@ -137,4 +137,97 @@ void main() {
137137
expect(linuxInfo.variant, isNull);
138138
expect(linuxInfo.variantId, isNull);
139139
}), skip: !Platform.isLinux);
140+
141+
testWidgets('Check all Windows info values are available',
142+
((WidgetTester tester) async {
143+
expect(
144+
windowsInfo.numberOfCores,
145+
isPositive,
146+
);
147+
expect(
148+
windowsInfo.computerName,
149+
isNotEmpty,
150+
);
151+
expect(
152+
windowsInfo.systemMemoryInMegabytes,
153+
isPositive,
154+
);
155+
expect(
156+
windowsInfo.userName,
157+
isNotEmpty,
158+
);
159+
expect(
160+
windowsInfo.majorVersion,
161+
equals(10),
162+
);
163+
expect(
164+
windowsInfo.minorVersion,
165+
equals(0),
166+
);
167+
expect(
168+
windowsInfo.buildNumber,
169+
greaterThan(10240),
170+
);
171+
expect(
172+
windowsInfo.platformId,
173+
equals(2),
174+
);
175+
expect(
176+
windowsInfo.reserved,
177+
isZero,
178+
);
179+
expect(
180+
windowsInfo.buildLab,
181+
isNotEmpty,
182+
);
183+
expect(
184+
windowsInfo.buildLab,
185+
startsWith(
186+
windowsInfo.buildNumber.toString(),
187+
),
188+
);
189+
expect(
190+
windowsInfo.buildLabEx,
191+
isNotEmpty,
192+
);
193+
expect(
194+
windowsInfo.buildLab,
195+
startsWith(windowsInfo.buildNumber.toString()),
196+
);
197+
expect(
198+
windowsInfo.digitalProductId,
199+
isNotEmpty,
200+
);
201+
expect(
202+
windowsInfo.editionId,
203+
isNotEmpty,
204+
);
205+
expect(
206+
windowsInfo.productId,
207+
isNotEmpty,
208+
);
209+
expect(
210+
RegExp(r'^([A-Z0-9]{5}-){4}[A-Z0-9]{5}$')
211+
.hasMatch(windowsInfo.productId) ||
212+
RegExp(r'^([A-Z0-9]{5}-){3}[A-Z0-9]{5}$')
213+
.hasMatch(windowsInfo.productId),
214+
isTrue,
215+
);
216+
expect(
217+
windowsInfo.productName,
218+
isNotEmpty,
219+
);
220+
expect(
221+
windowsInfo.productName,
222+
startsWith('Windows'),
223+
);
224+
expect(
225+
windowsInfo.releaseId,
226+
isNotEmpty,
227+
);
228+
expect(
229+
windowsInfo.deviceId,
230+
isNotEmpty,
231+
);
232+
}), skip: !Platform.isWindows);
140233
}

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

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

packages/device_info_plus/device_info_plus/pubspec.yaml

Lines changed: 6 additions & 6 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.1.3
4+
version: 5.0.1
55
homepage: https://plus.fluttercommunity.dev/
66
repository: https://github.com/fluttercommunity/plus_plugins/tree/main/packages/
77
issue_tracker: https://github.com/fluttercommunity/plus_plugins/labels/device_info_plus
@@ -26,11 +26,11 @@ flutter:
2626
dependencies:
2727
flutter:
2828
sdk: flutter
29-
device_info_plus_platform_interface: ^3.0.0
30-
device_info_plus_macos: ^3.0.0
31-
device_info_plus_linux: ^3.0.0
32-
device_info_plus_web: ^3.0.0
33-
device_info_plus_windows: ^4.0.0
29+
device_info_plus_platform_interface: ^4.0.0
30+
device_info_plus_macos: ^4.0.0
31+
device_info_plus_linux: ^4.0.0
32+
device_info_plus_web: ^4.0.0
33+
device_info_plus_windows: ^5.0.0
3434

3535
dev_dependencies:
3636
flutter_test:

packages/device_info_plus/device_info_plus_linux/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## 4.0.0
2+
3+
- platform interface to 4.0.0
4+
15
## 3.0.0
26

37
- platform interface to 3.0.0

packages/device_info_plus/device_info_plus_linux/pubspec.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: device_info_plus_linux
22
description: Linux implementation of the device_info_plus plugin
3-
version: 3.0.0
3+
version: 4.0.0
44
homepage: https://plus.fluttercommunity.dev/
55
repository: https://github.com/fluttercommunity/plus_plugins/tree/main/packages/
66

@@ -9,7 +9,7 @@ environment:
99
flutter: ">=1.20.0"
1010

1111
dependencies:
12-
device_info_plus_platform_interface: ^3.0.0
12+
device_info_plus_platform_interface: ^4.0.0
1313
file: ^6.0.0
1414
flutter:
1515
sdk: flutter

packages/device_info_plus/device_info_plus_macos/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## 4.0.0
2+
3+
- platform interface to 4.0.0
4+
15
## 3.0.0
26

37
- platform interface to 3.0.0

packages/device_info_plus/device_info_plus_macos/pubspec.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,14 @@ name: device_info_plus_macos
22
description: Macos implementation of the device_info_plus plugin
33
homepage: https://plus.fluttercommunity.dev/
44
repository: https://github.com/fluttercommunity/plus_plugins/tree/main/packages/
5-
version: 3.0.0
5+
version: 4.0.0
66

77
environment:
88
sdk: ">=2.12.0 <3.0.0"
99
flutter: ">=1.20.0"
1010

1111
dependencies:
12-
device_info_plus_platform_interface: ^3.0.0
12+
device_info_plus_platform_interface: ^4.0.0
1313
flutter:
1414
sdk: flutter
1515

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+
## 4.0.0
2+
3+
- Re-introduce 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.
4+
15
## 3.0.0
26

37
- Redo 2.6.0 into 3.0.0

0 commit comments

Comments
 (0)