Skip to content

armgit / ente

Public Imported from GitHub
0

πŸ’š End-to-end encrypted cloud for everything.

Remove Auth scanner device preflight

Neeraj Gupta2ad0923caa03
diff --git a/mobile/apps/auth/lib/ui/components/scanner_camera_view.dart b/mobile/apps/auth/lib/ui/components/scanner_camera_view.dart
index 84a3e9873c..26d0a8b016 100644
--- a/mobile/apps/auth/lib/ui/components/scanner_camera_view.dart
+++ b/mobile/apps/auth/lib/ui/components/scanner_camera_view.dart
@@ -1,6 +1,3 @@
-import 'dart:io';
-
-import 'package:device_info_plus/device_info_plus.dart';
import 'package:ente_qr_scanner/ente_qr_scanner.dart';
import 'package:flutter/material.dart';
@@ -21,27 +18,8 @@ class ScannerCameraView extends StatefulWidget {
}
class _ScannerCameraViewState extends State<ScannerCameraView> {
- late final Future<bool> _isCameraScannerAvailable =
- _isCameraScannerAvailableOnDevice();
-
@override
Widget build(BuildContext context) {
- if (!Platform.isIOS) {
- return _buildScannerView();
- }
-
- return FutureBuilder<bool>(
- future: _isCameraScannerAvailable,
- builder: (context, snapshot) {
- if (snapshot.data == true) {
- return _buildScannerView();
- }
- return const ColoredBox(color: Colors.black);
- },
- );
- }
-
- Widget _buildScannerView() {
return EnteQrScannerView(
overlay: widget.overlay,
onScannerCreated: widget.onScannerCreated,
@@ -49,16 +27,3 @@ class _ScannerCameraViewState extends State<ScannerCameraView> {
);
}
}
-
-Future<bool> _isCameraScannerAvailableOnDevice() async {
- if (!Platform.isIOS) {
- return true;
- }
-
- try {
- final iosInfo = await DeviceInfoPlugin().iosInfo;
- return iosInfo.isPhysicalDevice;
- } catch (_) {
- return true;
- }
-}
diff --git a/mobile/apps/auth/pubspec.lock b/mobile/apps/auth/pubspec.lock
index a8454e9202..6fa4e391b1 100644
--- a/mobile/apps/auth/pubspec.lock
+++ b/mobile/apps/auth/pubspec.lock
@@ -249,7 +249,7 @@ packages:
source: hosted
version: "0.7.12"
device_info_plus:
- dependency: "direct main"
+ dependency: transitive
description:
name: device_info_plus
sha256: "98f28b42168cc509abc92f88518882fd58061ea372d7999aecc424345c7bff6a"
diff --git a/mobile/apps/auth/pubspec.yaml b/mobile/apps/auth/pubspec.yaml
index 8b8a53423c..4fccd2b3a2 100644
--- a/mobile/apps/auth/pubspec.yaml
+++ b/mobile/apps/auth/pubspec.yaml
@@ -19,7 +19,6 @@ dependencies:
confetti: 0.8.0
connectivity_plus: 6.1.4
convert: 3.1.2
- device_info_plus: 11.5.0
dio: 5.9.2
dots_indicator: 4.0.1
dotted_border: 3.1.0