♻️ Add splash screen for loading data

This commit is contained in:
2024-12-14 01:32:13 +08:00
parent c7d5cb48ac
commit f763c7515a
13 changed files with 163 additions and 54 deletions

View File

@ -16,14 +16,6 @@ class NotificationProvider extends ChangeNotifier {
NotificationProvider(BuildContext context) {
_sn = context.read<SnNetworkProvider>();
_ua = context.read<UserProvider>();
// Delay to wait user provider ready to use
Future.delayed(const Duration(milliseconds: 3000), () async {
if (!_ua.isAuthorized) return;
log("Registering push notifications...");
await registerPushNotifications();
log("Registered push notification subscriber successfully!");
});
}
Future<void> registerPushNotifications() async {