Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updating the Tile #5

Open
Eliote opened this issue Jun 25, 2023 · 2 comments
Open

Updating the Tile #5

Eliote opened this issue Jun 25, 2023 · 2 comments

Comments

@Eliote
Copy link

Eliote commented Jun 25, 2023

Hello,
It would be really useful to have a way to update the Tile at any given time.

This would allow us to something like the following:

Tile? onTileClicked(Tile tile) {
  tile.label = "Starting...";
  tile.tileStatus = TileStatus.unavailable;
  unawaited(foo(tile));
  return tile;
}

Future<void> foo(Tile tile) async {
  final didItWork = await bar();
  tile.label = didItWork ? "FooBar ON" : "FooBar OFF";
  tile.tileStatus = didItWork ? TileStatus.active : TileStatus.inactive;
  QuickSettings.updateTile(tile);
}
@AliNajafzadeh7916
Copy link

Hello
I also faced this issue and I need it

Is it possible to add it to the package?

@taheri79
Copy link

taheri79 commented Dec 10, 2024

me too

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

No branches or pull requests

3 participants