Setup common lockscreen
This commit is contained in:
committed by
AmanRajSinghMourya
parent
e352de8b9c
commit
7a91e714fe
@@ -1,13 +1,13 @@
|
||||
import 'dart:io';
|
||||
|
||||
import 'package:ente_lock_screen/local_authentication_service.dart';
|
||||
import 'package:ente_lock_screen/lock_screen_settings.dart';
|
||||
import 'package:ente_strings/ente_strings.dart';
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter_local_authentication/flutter_local_authentication.dart';
|
||||
import 'package:local_auth/local_auth.dart';
|
||||
import 'package:local_auth_android/local_auth_android.dart';
|
||||
import 'package:local_auth_darwin/types/auth_messages_ios.dart';
|
||||
import 'package:lock_screen/local_authentication_service.dart';
|
||||
import 'package:lock_screen/lock_screen_settings.dart';
|
||||
import 'package:logging/logging.dart';
|
||||
|
||||
Future<bool> requestAuthentication(
|
||||
|
||||
@@ -1,10 +1,5 @@
|
||||
import 'dart:io';
|
||||
|
||||
import 'package:ente_lock_screen/auth_util.dart';
|
||||
import 'package:ente_lock_screen/lock_screen_settings.dart';
|
||||
import 'package:ente_lock_screen/ui/app_lock.dart';
|
||||
import 'package:ente_lock_screen/ui/lock_screen_password.dart';
|
||||
import 'package:ente_lock_screen/ui/lock_screen_pin.dart';
|
||||
import 'package:ente_ui/utils/dialog_util.dart';
|
||||
import 'package:ente_ui/utils/toast_util.dart';
|
||||
import 'package:flutter/foundation.dart';
|
||||
@@ -12,6 +7,11 @@ import 'package:flutter/material.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
import 'package:flutter_local_authentication/flutter_local_authentication.dart';
|
||||
import 'package:local_auth/local_auth.dart';
|
||||
import 'package:lock_screen/auth_util.dart';
|
||||
import 'package:lock_screen/lock_screen_settings.dart';
|
||||
import 'package:lock_screen/ui/app_lock.dart';
|
||||
import 'package:lock_screen/ui/lock_screen_password.dart';
|
||||
import 'package:lock_screen/ui/lock_screen_pin.dart';
|
||||
import 'package:logging/logging.dart';
|
||||
|
||||
class LocalAuthenticationService {
|
||||
|
||||
@@ -3,10 +3,10 @@ import "dart:io";
|
||||
import "dart:typed_data";
|
||||
|
||||
import "package:ente_configuration/base_configuration.dart";
|
||||
import "package:ente_crypto_dart/ente_crypto_dart.dart";
|
||||
import "package:ente_utils/platform_util.dart";
|
||||
import "package:ente_events/event_bus.dart";
|
||||
import "package:ente_events/models/signed_out_event.dart";
|
||||
import "package:ente_utils/platform_util.dart";
|
||||
import "package:ente_crypto_dart/ente_crypto_dart.dart";
|
||||
import "package:flutter/material.dart";
|
||||
import "package:flutter_secure_storage/flutter_secure_storage.dart";
|
||||
import "package:privacy_screen/privacy_screen.dart";
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import 'dart:async';
|
||||
|
||||
import 'package:ente_lock_screen/lock_screen_settings.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:lock_screen/lock_screen_settings.dart';
|
||||
|
||||
/// A widget which handles app lifecycle events for showing and hiding a lock screen.
|
||||
/// This should wrap around a `MyApp` widget (or equivalent).
|
||||
@@ -144,8 +144,8 @@ class _AppLockState extends State<AppLock> with WidgetsBindingObserver {
|
||||
|
||||
Widget get _lockScreen {
|
||||
return PopScope(
|
||||
canPop: false,
|
||||
child: this.widget.lockScreen,
|
||||
canPop: false,
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -3,15 +3,15 @@ import 'dart:math';
|
||||
|
||||
import 'package:ente_accounts/ente_accounts.dart';
|
||||
import 'package:ente_configuration/base_configuration.dart';
|
||||
import 'package:ente_lock_screen/auth_util.dart';
|
||||
import 'package:ente_lock_screen/lock_screen_settings.dart';
|
||||
import 'package:ente_lock_screen/ui/app_lock.dart';
|
||||
import 'package:ente_strings/ente_strings.dart';
|
||||
import 'package:ente_ui/theme/ente_theme.dart';
|
||||
import 'package:ente_ui/utils/dialog_util.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/scheduler.dart';
|
||||
import 'package:flutter_animate/flutter_animate.dart';
|
||||
import 'package:lock_screen/auth_util.dart';
|
||||
import 'package:lock_screen/lock_screen_settings.dart';
|
||||
import 'package:lock_screen/ui/app_lock.dart';
|
||||
import 'package:logging/logging.dart';
|
||||
|
||||
class LockScreen extends StatefulWidget {
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
import 'package:ente_lock_screen/lock_screen_settings.dart';
|
||||
import 'package:ente_strings/ente_strings.dart';
|
||||
import 'package:ente_ui/components/captioned_text_widget.dart';
|
||||
import 'package:ente_ui/components/divider_widget.dart';
|
||||
@@ -8,6 +7,7 @@ import 'package:ente_ui/components/title_bar_title_widget.dart';
|
||||
import 'package:ente_ui/components/title_bar_widget.dart';
|
||||
import 'package:ente_ui/theme/ente_theme.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:lock_screen/lock_screen_settings.dart';
|
||||
|
||||
class LockScreenAutoLock extends StatefulWidget {
|
||||
const LockScreenAutoLock({super.key});
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
import "package:ente_lock_screen/lock_screen_settings.dart";
|
||||
import "package:ente_strings/ente_strings.dart";
|
||||
import "package:ente_ui/components/buttons/dynamic_fab.dart";
|
||||
import "package:ente_ui/components/buttons/icon_button_widget.dart";
|
||||
@@ -6,6 +5,7 @@ import "package:ente_ui/components/text_input_widget.dart";
|
||||
import "package:ente_ui/theme/ente_theme.dart";
|
||||
import "package:flutter/material.dart";
|
||||
import "package:flutter/services.dart";
|
||||
import "package:lock_screen/lock_screen_settings.dart";
|
||||
|
||||
class LockScreenConfirmPassword extends StatefulWidget {
|
||||
const LockScreenConfirmPassword({
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
import "dart:io";
|
||||
|
||||
import "package:ente_lock_screen/lock_screen_settings.dart";
|
||||
import "package:ente_lock_screen/ui/custom_pin_keypad.dart";
|
||||
import "package:ente_strings/ente_strings.dart";
|
||||
import "package:ente_ui/theme/ente_theme.dart";
|
||||
import "package:flutter/material.dart";
|
||||
import "package:flutter/services.dart";
|
||||
import "package:lock_screen/lock_screen_settings.dart";
|
||||
import "package:lock_screen/ui/custom_pin_keypad.dart";
|
||||
import "package:pinput/pinput.dart";
|
||||
|
||||
class LockScreenConfirmPin extends StatefulWidget {
|
||||
|
||||
@@ -1,12 +1,6 @@
|
||||
import "dart:async";
|
||||
import "dart:io";
|
||||
|
||||
import "package:ente_lock_screen/local_authentication_service.dart";
|
||||
import "package:ente_lock_screen/lock_screen_settings.dart";
|
||||
import "package:ente_lock_screen/ui/app_lock.dart";
|
||||
import "package:ente_lock_screen/ui/lock_screen_auto_lock.dart";
|
||||
import "package:ente_lock_screen/ui/lock_screen_password.dart";
|
||||
import "package:ente_lock_screen/ui/lock_screen_pin.dart";
|
||||
import "package:ente_strings/ente_strings.dart";
|
||||
import "package:ente_ui/components/buttons/button_widget.dart";
|
||||
import "package:ente_ui/components/buttons/models/button_type.dart";
|
||||
@@ -20,6 +14,12 @@ import "package:ente_ui/components/toggle_switch_widget.dart";
|
||||
import "package:ente_ui/theme/ente_theme.dart";
|
||||
import "package:ente_utils/platform_util.dart";
|
||||
import "package:flutter/material.dart";
|
||||
import "package:lock_screen/local_authentication_service.dart";
|
||||
import "package:lock_screen/lock_screen_settings.dart";
|
||||
import "package:lock_screen/ui/app_lock.dart";
|
||||
import "package:lock_screen/ui/lock_screen_auto_lock.dart";
|
||||
import "package:lock_screen/ui/lock_screen_password.dart";
|
||||
import "package:lock_screen/ui/lock_screen_pin.dart";
|
||||
|
||||
class LockScreenOptions extends StatefulWidget {
|
||||
const LockScreenOptions({super.key});
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
import "dart:convert";
|
||||
|
||||
import "package:ente_crypto_dart/ente_crypto_dart.dart";
|
||||
import "package:ente_lock_screen/lock_screen_settings.dart";
|
||||
import "package:ente_lock_screen/ui/lock_screen_confirm_password.dart";
|
||||
import "package:ente_lock_screen/ui/lock_screen_options.dart";
|
||||
import "package:ente_strings/ente_strings.dart";
|
||||
import "package:ente_ui/components/buttons/dynamic_fab.dart";
|
||||
import "package:ente_ui/components/buttons/icon_button_widget.dart";
|
||||
import "package:ente_ui/components/text_input_widget.dart";
|
||||
import "package:ente_ui/theme/ente_theme.dart";
|
||||
import "package:ente_crypto_dart/ente_crypto_dart.dart";
|
||||
import "package:flutter/material.dart";
|
||||
import "package:flutter/services.dart";
|
||||
import "package:lock_screen/lock_screen_settings.dart";
|
||||
import "package:lock_screen/ui/lock_screen_confirm_password.dart";
|
||||
import "package:lock_screen/ui/lock_screen_options.dart";
|
||||
|
||||
/// [isChangingLockScreenSettings] Authentication required for changing lock screen settings.
|
||||
/// Set to true when the app requires the user to authenticate before allowing
|
||||
|
||||
@@ -1,17 +1,17 @@
|
||||
import "dart:convert";
|
||||
import "dart:io";
|
||||
|
||||
import "package:ente_crypto_dart/ente_crypto_dart.dart";
|
||||
import "package:ente_lock_screen/lock_screen_settings.dart";
|
||||
import "package:ente_lock_screen/ui/custom_pin_keypad.dart";
|
||||
import "package:ente_lock_screen/ui/lock_screen_confirm_pin.dart";
|
||||
import "package:ente_lock_screen/ui/lock_screen_options.dart";
|
||||
import "package:ente_strings/ente_strings.dart";
|
||||
import "package:ente_ui/theme/colors.dart";
|
||||
import "package:ente_ui/theme/ente_theme.dart";
|
||||
import "package:ente_ui/theme/text_style.dart";
|
||||
import "package:ente_crypto_dart/ente_crypto_dart.dart";
|
||||
import "package:flutter/material.dart";
|
||||
import "package:flutter/services.dart";
|
||||
import "package:lock_screen/lock_screen_settings.dart";
|
||||
import "package:lock_screen/ui/custom_pin_keypad.dart";
|
||||
import "package:lock_screen/ui/lock_screen_confirm_pin.dart";
|
||||
import "package:lock_screen/ui/lock_screen_options.dart";
|
||||
import 'package:pinput/pinput.dart';
|
||||
|
||||
/// [isChangingLockScreenSettings] Authentication required for changing lock screen settings.
|
||||
|
||||
@@ -409,11 +409,10 @@ packages:
|
||||
flutter_local_authentication:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
path: "."
|
||||
ref: "1ac346a04592a05fd75acccf2e01fa3c7e955d96"
|
||||
resolved-ref: "1ac346a04592a05fd75acccf2e01fa3c7e955d96"
|
||||
url: "https://github.com/eaceto/flutter_local_authentication"
|
||||
source: git
|
||||
name: flutter_local_authentication
|
||||
sha256: eb2e471ba77fbc42b6ce8b358939dc9878dc71fcce5a482a8ddcb045563d87cd
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.2.0"
|
||||
flutter_localizations:
|
||||
dependency: transitive
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
name: ente_lock_screen
|
||||
name: lock_screen
|
||||
description: A Flutter package containing lock screen UI components and services for Ente apps
|
||||
version: 1.0.0
|
||||
publish_to: none
|
||||
@@ -8,6 +8,8 @@ environment:
|
||||
flutter: ">=1.17.0"
|
||||
|
||||
dependencies:
|
||||
flutter:
|
||||
sdk: flutter
|
||||
ente_accounts:
|
||||
path: ../accounts
|
||||
ente_configuration:
|
||||
@@ -23,13 +25,8 @@ dependencies:
|
||||
path: ../ui
|
||||
ente_utils:
|
||||
path: ../utils
|
||||
flutter:
|
||||
sdk: flutter
|
||||
flutter_animate: ^4.1.0
|
||||
flutter_local_authentication:
|
||||
git:
|
||||
url: https://github.com/eaceto/flutter_local_authentication
|
||||
ref: 1ac346a04592a05fd75acccf2e01fa3c7e955d96
|
||||
flutter_local_authentication: ^1.1.11
|
||||
flutter_secure_storage: ^9.0.0
|
||||
local_auth: ^2.1.8
|
||||
logging: ^1.1.1
|
||||
@@ -38,8 +35,8 @@ dependencies:
|
||||
shared_preferences: ^2.5.3
|
||||
|
||||
dev_dependencies:
|
||||
flutter_lints: ^5.0.0
|
||||
flutter_test:
|
||||
sdk: flutter
|
||||
flutter_lints: ^5.0.0
|
||||
|
||||
flutter:
|
||||
|
||||
Reference in New Issue
Block a user