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

[device_info] Enable NNBD for unit test #3658

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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