Skip to content

Updating the Tile #5

@Eliote

Description

@Eliote

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);
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions