@ -14,6 +14,7 @@ import 'package:http/http.dart' as http;
import ' package:matrix/encryption.dart ' ;
import ' package:matrix/encryption.dart ' ;
import ' package:matrix/matrix.dart ' ;
import ' package:matrix/matrix.dart ' ;
import ' package:provider/provider.dart ' ;
import ' package:provider/provider.dart ' ;
import ' package:shared_preferences/shared_preferences.dart ' ;
import ' package:universal_html/html.dart ' as html ;
import ' package:universal_html/html.dart ' as html ;
import ' package:url_launcher/url_launcher.dart ' ;
import ' package:url_launcher/url_launcher.dart ' ;
import ' package:vrouter/vrouter.dart ' ;
import ' package:vrouter/vrouter.dart ' ;
@ -32,6 +33,8 @@ import '../utils/background_push.dart';
import ' ../utils/famedlysdk_store.dart ' ;
import ' ../utils/famedlysdk_store.dart ' ;
import ' ../utils/platform_infos.dart ' ;
import ' ../utils/platform_infos.dart ' ;
/ / import ' package:flutter_secure_storage/flutter_secure_storage.dart ' ;
class Matrix extends StatefulWidget {
class Matrix extends StatefulWidget {
static const String callNamespace = ' chat.fluffy.jitsi_call ' ;
static const String callNamespace = ' chat.fluffy.jitsi_call ' ;
@ -407,8 +410,11 @@ class MatrixState extends State<Matrix> with WidgetsBindingObserver {
/ / Display the app lock
/ / Display the app lock
if ( PlatformInfos . isMobile ) {
if ( PlatformInfos . isMobile ) {
WidgetsBinding . instance . addPostFrameCallback ( ( _ ) {
WidgetsBinding . instance . addPostFrameCallback ( ( _ ) {
const FlutterSecureStorage ( )
( [ TargetPlatform . linux ] . contains ( Theme . of ( context ) . platform )
. read ( key: SettingKeys . appLockKey )
? SharedPreferences . getInstance ( )
. then ( ( prefs ) = > prefs . getString ( SettingKeys . appLockKey ) )
: const FlutterSecureStorage ( )
. read ( key: SettingKeys . appLockKey ) )
. then ( ( lock ) {
. then ( ( lock ) {
if ( lock ? . isNotEmpty ? ? false ) {
if ( lock ? . isNotEmpty ? ? false ) {
AppLock . of ( widget . context ) . enable ( ) ;
AppLock . of ( widget . context ) . enable ( ) ;