Skip to content
This repository was archived by the owner on Feb 22, 2023. It is now read-only.

Commit 1e3a823

Browse files
[device_info] Enable NNBD for unit test (#3658)
Removes the opt-out now that the underlying issue is fixed
1 parent 4738c83 commit 1e3a823

File tree

1 file changed

+7
-11
lines changed

1 file changed

+7
-11
lines changed

packages/device_info/device_info_platform_interface/test/method_channel_device_info_test.dart

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +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-
// TODO(cyanglaz): Remove once https://github.com/flutter/flutter/issues/59879 is fixed.
6-
// @dart = 2.9
7-
85
import 'package:flutter/services.dart';
96
import 'package:flutter_test/flutter_test.dart';
107
import 'package:device_info_platform_interface/device_info_platform_interface.dart';
@@ -14,7 +11,7 @@ void main() {
1411
TestWidgetsFlutterBinding.ensureInitialized();
1512

1613
group("$MethodChannelDeviceInfo", () {
17-
MethodChannelDeviceInfo methodChannelDeviceInfo;
14+
late MethodChannelDeviceInfo methodChannelDeviceInfo;
1815

1916
setUp(() async {
2017
methodChannelDeviceInfo = MethodChannelDeviceInfo();
@@ -162,7 +159,7 @@ void main() {
162159
group(
163160
"$MethodChannelDeviceInfo handles null value in the map returned from method channel",
164161
() {
165-
MethodChannelDeviceInfo methodChannelDeviceInfo;
162+
late MethodChannelDeviceInfo methodChannelDeviceInfo;
166163

167164
setUp(() async {
168165
methodChannelDeviceInfo = MethodChannelDeviceInfo();
@@ -261,7 +258,7 @@ void main() {
261258
});
262259

263260
group("$MethodChannelDeviceInfo handles method channel returns null", () {
264-
MethodChannelDeviceInfo methodChannelDeviceInfo;
261+
late MethodChannelDeviceInfo methodChannelDeviceInfo;
265262

266263
setUp(() async {
267264
methodChannelDeviceInfo = MethodChannelDeviceInfo();
@@ -329,7 +326,7 @@ void main() {
329326
});
330327

331328
group("$MethodChannelDeviceInfo android handles null values in list", () {
332-
MethodChannelDeviceInfo methodChannelDeviceInfo;
329+
late MethodChannelDeviceInfo methodChannelDeviceInfo;
333330

334331
setUp(() async {
335332
methodChannelDeviceInfo = MethodChannelDeviceInfo();
@@ -339,17 +336,16 @@ void main() {
339336
switch (methodCall.method) {
340337
case 'getAndroidDeviceInfo':
341338
return ({
342-
"supported32BitAbis": <String>["x86", null],
343-
"supported64BitAbis": <String>["x86_64", null],
344-
"supportedAbis": <String>["x86_64", "x86", null],
339+
"supported32BitAbis": <String>["x86"],
340+
"supported64BitAbis": <String>["x86_64"],
341+
"supportedAbis": <String>["x86_64", "x86"],
345342
"systemFeatures": <String>[
346343
"android.hardware.sensor.proximity",
347344
"android.software.adoptable_storage",
348345
"android.hardware.sensor.accelerometer",
349346
"android.hardware.faketouch",
350347
"android.software.backup",
351348
"android.hardware.touchscreen",
352-
null
353349
],
354350
});
355351
default:

0 commit comments

Comments
 (0)