Skip to content

Commit

Permalink
fix(device_info_plus): add @Deprecated annotation to toMap method (
Browse files Browse the repository at this point in the history
…#1142)

Co-authored-by: Francesco Iapicca <yakforward@Francescos-MacBook-Air.local>
Co-authored-by: Miguel Beltran <m@beltran.work>
  • Loading branch information
3 people committed Oct 14, 2022
1 parent 498e5d9 commit 1f03d0e
Show file tree
Hide file tree
Showing 14 changed files with 20 additions and 2 deletions.
2 changes: 0 additions & 2 deletions packages/device_info_plus/device_info_plus/README.md
Expand Up @@ -46,8 +46,6 @@ import 'package:device_info_plus/device_info_plus.dart';
final deviceInfoPlugin = DeviceInfoPlugin();
final deviceInfo = await deviceInfoPlugin.deviceInfo;
final map = deviceInfo.toMap();
// Push [map] to your service.
```

You will find links to the API docs on the [pub page](https://pub.dev/packages/device_info_plus).
Expand Down
Expand Up @@ -114,6 +114,7 @@ class AndroidDeviceInfo implements BaseDeviceInfo {
final AndroidDisplayMetrics displayMetrics;

/// Serializes [AndroidDeviceInfo] to map.
@Deprecated('[toMap] method will be discontinued')
@override
Map<String, dynamic> toMap() {
return {
Expand Down Expand Up @@ -216,6 +217,7 @@ class AndroidBuildVersion {
final String? securityPatch;

/// Serializes [ AndroidBuildVersion ] to map.
@Deprecated('[toMap] method will be discontinued')
Map<String, dynamic> toMap() {
return {
'baseOS': baseOS,
Expand Down
@@ -1,5 +1,6 @@
/// The base class for platform's device info.
abstract class BaseDeviceInfo {
/// Serializes device info properties to a map.
@Deprecated('[toMap] method will be discontinued')
Map<String, dynamic> toMap();
}
Expand Up @@ -60,6 +60,7 @@ class IosDeviceInfo implements BaseDeviceInfo {
}

/// Serializes [IosDeviceInfo] to a map.
@Deprecated('[toMap] method will be discontinued')
@override
Map<String, dynamic> toMap() {
return {
Expand Down
Expand Up @@ -140,6 +140,7 @@ class LinuxDeviceInfo implements BaseDeviceInfo {
final String? machineId;

/// Serializes [LinuxDeviceInfo] to a map.
@Deprecated('[toMap] method will be discontinued')
@override
Map<String, dynamic> toMap() {
return {
Expand Down
Expand Up @@ -55,6 +55,7 @@ class MacOsDeviceInfo implements BaseDeviceInfo {
final String? systemGUID;

/// Serializes [MacOsDeviceInfo] to map.
@Deprecated('[toMap] method will be discontinued')
@override
Map<String, dynamic> toMap() {
return {
Expand Down
Expand Up @@ -129,6 +129,7 @@ class WebBrowserInfo implements BaseDeviceInfo {
}

/// Serializes [WebBrowserInfo] to a map.
@Deprecated('[toMap] method will be discontinued')
@override
Map<String, dynamic> toMap() {
return {
Expand Down
Expand Up @@ -137,6 +137,7 @@ class WindowsDeviceInfo implements BaseDeviceInfo {
final String deviceId;

/// Serializes [WindowsDeviceInfo] to a map.
@Deprecated('[toMap] method will be discontinued')
@override
Map<String, dynamic> toMap() {
return {
Expand Down
@@ -1,3 +1,5 @@
// ignore_for_file: deprecated_member_use_from_same_package

import 'package:device_info_plus_platform_interface/model/android_device_info.dart';
import 'package:flutter_test/flutter_test.dart';

Expand Down
@@ -1,3 +1,5 @@
// ignore_for_file: deprecated_member_use_from_same_package

import 'package:device_info_plus_platform_interface/model/ios_device_info.dart';
import 'package:flutter_test/flutter_test.dart';

Expand Down
@@ -1,3 +1,5 @@
// ignore_for_file: deprecated_member_use_from_same_package

import 'package:device_info_plus_platform_interface/model/linux_device_info.dart';
import 'package:flutter_test/flutter_test.dart';

Expand Down
@@ -1,3 +1,5 @@
// ignore_for_file: deprecated_member_use_from_same_package

import 'package:device_info_plus_platform_interface/model/macos_device_info.dart';
import 'package:flutter_test/flutter_test.dart';

Expand Down
@@ -1,3 +1,5 @@
// ignore_for_file: deprecated_member_use_from_same_package

import 'package:device_info_plus_platform_interface/model/web_browser_info.dart';
import 'package:flutter_test/flutter_test.dart';

Expand Down
@@ -1,3 +1,5 @@
// ignore_for_file: deprecated_member_use_from_same_package

import 'dart:typed_data';
import 'package:device_info_plus_platform_interface/model/windows_device_info.dart';
import 'package:flutter_test/flutter_test.dart';
Expand Down

0 comments on commit 1f03d0e

Please sign in to comment.