瀏覽代碼

bug: fixed cast

flutter-beta
Julian Steenbakker 5 年之前
父節點
當前提交
a722df9415
沒有發現已知的金鑰在資料庫的簽署中 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);
}


Loading…
取消
儲存