feat: add remote pull and push

This commit is contained in:
2026-09-23 00:19:58 +02:00
parent 9aaba69e3c
commit ccf5165417
29 changed files with 3042 additions and 24 deletions
+10 -2
View File
@@ -2,9 +2,16 @@ import 'package:flutter/material.dart';
class AppLifecycleLockObserver extends WidgetsBindingObserver {
final VoidCallback onLock;
final VoidCallback? onBackground;
final VoidCallback? onForeground;
final bool Function()? shouldLock;
AppLifecycleLockObserver({required this.onLock, this.shouldLock});
AppLifecycleLockObserver({
required this.onLock,
this.onBackground,
this.onForeground,
this.shouldLock,
});
@override
void didChangeAppLifecycleState(AppLifecycleState state) {
@@ -14,8 +21,9 @@ class AppLifecycleLockObserver extends WidgetsBindingObserver {
case AppLifecycleState.paused:
case AppLifecycleState.detached:
if (shouldLock?.call() ?? true) onLock();
onBackground?.call();
case AppLifecycleState.resumed:
break;
onForeground?.call();
}
}
}