fix: prevent background worker when main app is running (#22252)

* fix: prevent background worker only when the main app is actively running

* handle ref disposals better

---------

Co-authored-by: shenlong-tanwen <139912620+shalong-tanwen@users.noreply.github.com>
Co-authored-by: Alex <alex.tran1502@gmail.com>
This commit is contained in:
shenlong 2025-09-22 07:15:47 +05:30 committed by GitHub
parent b33e8abcdd
commit 35b62cd016
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
15 changed files with 418 additions and 95 deletions

View file

@ -1,3 +1,5 @@
import 'dart:async';
import 'package:auto_route/auto_route.dart';
import 'package:flutter/material.dart';
import 'package:hooks_riverpod/hooks_riverpod.dart';