Cw 540 encrypt shared (#1269)

* start writing migration

* save

* finishing up migration

* more fixes

* fixes

* migration fixes

* remove commented code and ensure widget initialization in root.dart

* use securekey static functions everywhere applicable
This commit is contained in:
Matthew Fosse
2024-01-23 02:30:16 +02:00
committed by GitHub
parent efb41aa6bc
commit d664f0a16f
11 changed files with 452 additions and 282 deletions
+10 -4
View File
@@ -53,13 +53,17 @@ class RootState extends State<Root> with WidgetsBindingObserver {
@override
void initState() {
_requestAuth = widget.authService.requireAuth();
WidgetsBinding.instance.addPostFrameCallback((_) async {
bool value = await widget.authService.requireAuth();
setState(() {
_requestAuth = value;
});
});
_isInactiveController = StreamController<bool>.broadcast();
_isInactive = false;
_postFrameCallback = false;
WidgetsBinding.instance.addObserver(this);
super.initState();
if (DeviceInfo.instance.isMobile) {
initUniLinks();
}
@@ -105,8 +109,10 @@ class RootState extends State<Root> with WidgetsBindingObserver {
break;
case AppLifecycleState.resumed:
setState(() {
_requestAuth = widget.authService.requireAuth();
widget.authService.requireAuth().then((value) {
setState(() {
_requestAuth = value;
});
});
break;
default: