Skip to content
This repository has been archived by the owner on Jul 11, 2024. It is now read-only.

There's some way to lazy load all packages? #89

Open
alexrintt opened this issue Jul 1, 2022 · 0 comments
Open

There's some way to lazy load all packages? #89

alexrintt opened this issue Jul 1, 2022 · 0 comments

Comments

@alexrintt
Copy link

Problem

Taking too long to load all packages once on real devices.

Emulators usually doesn't have hundreds of installed apps, so when using this package on it there's no performance/loading issues, everything loads smooth and fast (packages count < 40, 50).

But since I tried to use the package on my real devices which contains a hundred of apps (> 200) the package takes too long to load all packages, so I'm forced to see a loading screen of 10 seconds.

My question is: do we have an alternative of:

List<Application> apps = await DeviceApps.getInstalledApplications();

That looks like:

Stream<Application> apps = DeviceApps.getInstalledApplications();

apps.listen((installedApp) => setState(() => _myApps.add(installedApp)));

In this way I can show the apps as they load instead waiting all of them and then displaying in the screen. So basically:

  • Current scenario: load all packages once and then return all.
  • Perfect scenario: load packages individually.

Thanks for the package! This is really helpful.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant