Преглед на файлове

bug: fixed cast

flutter-beta
Julian Steenbakker преди 5 години
родител
ревизия
a722df9415
No known key found for this signature in database GPG ключ ID: 16E437C7A3D94250
променени са 1 файла, в които са добавени 5 реда и са изтрити 3 реда
  1. +5
    -3
      lib/src/qr_code_scanner.dart

+ 5
- 3
lib/src/qr_code_scanner.dart Целия файл

@@ -304,9 +304,11 @@ class QRViewController {
Future<SystemFeatures> getSystemFeatures() async {
try {
var features =
await (_channel.invokeMapMethod<String, dynamic>('getSystemFeatures')
as FutureOr<Map<String, dynamic>>);
return SystemFeatures.fromJson(features);
await _channel.invokeMapMethod<String, dynamic>('getSystemFeatures');
if (features != null) {
return SystemFeatures.fromJson(features);
}
throw CameraException('Error', 'Could not get system features');
} on PlatformException catch (e) {
throw CameraException(e.code, e.message);
}


Зареждане…
Отказ
Запис