From 83af9efbe989a154a5bc51aad1373a2c2cfbc3a4 Mon Sep 17 00:00:00 2001 From: Stuart Morgan Date: Tue, 2 Mar 2021 11:54:31 -0500 Subject: [PATCH] [device_info] Enable NNBD for unit test Removes the opt-out now that the underlying issue is fixed --- .../test/method_channel_device_info_test.dart | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/packages/device_info/device_info_platform_interface/test/method_channel_device_info_test.dart b/packages/device_info/device_info_platform_interface/test/method_channel_device_info_test.dart index 03ff4b53cda9..b257109fe2f6 100644 --- a/packages/device_info/device_info_platform_interface/test/method_channel_device_info_test.dart +++ b/packages/device_info/device_info_platform_interface/test/method_channel_device_info_test.dart @@ -2,9 +2,6 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -// TODO(cyanglaz): Remove once https://github.com/flutter/flutter/issues/59879 is fixed. -// @dart = 2.9 - import 'package:flutter/services.dart'; import 'package:flutter_test/flutter_test.dart'; import 'package:device_info_platform_interface/device_info_platform_interface.dart'; @@ -14,7 +11,7 @@ void main() { TestWidgetsFlutterBinding.ensureInitialized(); group("$MethodChannelDeviceInfo", () { - MethodChannelDeviceInfo methodChannelDeviceInfo; + late MethodChannelDeviceInfo methodChannelDeviceInfo; setUp(() async { methodChannelDeviceInfo = MethodChannelDeviceInfo(); @@ -162,7 +159,7 @@ void main() { group( "$MethodChannelDeviceInfo handles null value in the map returned from method channel", () { - MethodChannelDeviceInfo methodChannelDeviceInfo; + late MethodChannelDeviceInfo methodChannelDeviceInfo; setUp(() async { methodChannelDeviceInfo = MethodChannelDeviceInfo(); @@ -261,7 +258,7 @@ void main() { }); group("$MethodChannelDeviceInfo handles method channel returns null", () { - MethodChannelDeviceInfo methodChannelDeviceInfo; + late MethodChannelDeviceInfo methodChannelDeviceInfo; setUp(() async { methodChannelDeviceInfo = MethodChannelDeviceInfo(); @@ -329,7 +326,7 @@ void main() { }); group("$MethodChannelDeviceInfo android handles null values in list", () { - MethodChannelDeviceInfo methodChannelDeviceInfo; + late MethodChannelDeviceInfo methodChannelDeviceInfo; setUp(() async { methodChannelDeviceInfo = MethodChannelDeviceInfo(); @@ -339,9 +336,9 @@ void main() { switch (methodCall.method) { case 'getAndroidDeviceInfo': return ({ - "supported32BitAbis": ["x86", null], - "supported64BitAbis": ["x86_64", null], - "supportedAbis": ["x86_64", "x86", null], + "supported32BitAbis": ["x86"], + "supported64BitAbis": ["x86_64"], + "supportedAbis": ["x86_64", "x86"], "systemFeatures": [ "android.hardware.sensor.proximity", "android.software.adoptable_storage", @@ -349,7 +346,6 @@ void main() { "android.hardware.faketouch", "android.software.backup", "android.hardware.touchscreen", - null ], }); default: