Removed broken type-comparison (#240)
* Removed broken type-comparison
I remembered why I used the '.toString()' in my last PR: Android passes actual bool-types which should not be directly compared to 'true'...
The iOs comparison in line 243 still stands since iOS does pass string-representations of bool-values.
* version push to 0.0.2
* Updated changelog for isPhysicalDevice
* properly incremented version number
* Merged version entries 0.0.2+1 and 0.0.2+2
diff --git a/packages/device_info/CHANGELOG.md b/packages/device_info/CHANGELOG.md
index 788b565..171b5f9 100644
--- a/packages/device_info/CHANGELOG.md
+++ b/packages/device_info/CHANGELOG.md
@@ -1,3 +1,8 @@
+## 0.0.2 - Oct 20, 2017
+
+* Fixed broke type comparison
+* Added "isPhysicaldevice" field, detecting emulators/simulators
+
## 0.0.1 - June 28, 2017
* Implements platform-specific device/OS properties
diff --git a/packages/device_info/lib/device_info.dart b/packages/device_info/lib/device_info.dart
index 9172163..5f870f6 100644
--- a/packages/device_info/lib/device_info.dart
+++ b/packages/device_info/lib/device_info.dart
@@ -141,7 +141,7 @@
supportedAbis: json['supportedAbis'],
tags: json['tags'],
type: json['type'],
- isPhysicalDevice: json['isPhysicalDevice'] == 'true',
+ isPhysicalDevice: json['isPhysicalDevice'],
);
}
}
diff --git a/packages/device_info/pubspec.yaml b/packages/device_info/pubspec.yaml
index bdc8cca..9fa8c40 100644
--- a/packages/device_info/pubspec.yaml
+++ b/packages/device_info/pubspec.yaml
@@ -1,6 +1,6 @@
name: device_info
description: Provides detailed information about the device the Flutter app is running on.
-version: 0.0.1
+version: 0.0.2
author: Flutter Team <flutter-dev@googlegroups.com>
homepage: https://github.com/flutter/plugins/tree/master/packages/device_info