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

Commit

Permalink
[device_info] Enable NNBD for unit test (#3658)
Browse files Browse the repository at this point in the history
Removes the opt-out now that the underlying issue is fixed
  • Loading branch information
stuartmorgan authored Mar 2, 2021
1 parent 4738c83 commit 1e3a823
Showing 1 changed file with 7 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand All @@ -14,7 +11,7 @@ void main() {
TestWidgetsFlutterBinding.ensureInitialized();

group("$MethodChannelDeviceInfo", () {
MethodChannelDeviceInfo methodChannelDeviceInfo;
late MethodChannelDeviceInfo methodChannelDeviceInfo;

setUp(() async {
methodChannelDeviceInfo = MethodChannelDeviceInfo();
Expand Down Expand Up @@ -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();
Expand Down Expand Up @@ -261,7 +258,7 @@ void main() {
});

group("$MethodChannelDeviceInfo handles method channel returns null", () {
MethodChannelDeviceInfo methodChannelDeviceInfo;
late MethodChannelDeviceInfo methodChannelDeviceInfo;

setUp(() async {
methodChannelDeviceInfo = MethodChannelDeviceInfo();
Expand Down Expand Up @@ -329,7 +326,7 @@ void main() {
});

group("$MethodChannelDeviceInfo android handles null values in list", () {
MethodChannelDeviceInfo methodChannelDeviceInfo;
late MethodChannelDeviceInfo methodChannelDeviceInfo;

setUp(() async {
methodChannelDeviceInfo = MethodChannelDeviceInfo();
Expand All @@ -339,17 +336,16 @@ void main() {
switch (methodCall.method) {
case 'getAndroidDeviceInfo':
return ({
"supported32BitAbis": <String>["x86", null],
"supported64BitAbis": <String>["x86_64", null],
"supportedAbis": <String>["x86_64", "x86", null],
"supported32BitAbis": <String>["x86"],
"supported64BitAbis": <String>["x86_64"],
"supportedAbis": <String>["x86_64", "x86"],
"systemFeatures": <String>[
"android.hardware.sensor.proximity",
"android.software.adoptable_storage",
"android.hardware.sensor.accelerometer",
"android.hardware.faketouch",
"android.software.backup",
"android.hardware.touchscreen",
null
],
});
default:
Expand Down

0 comments on commit 1e3a823

Please sign in to comment.