setTag method

Future<void> setTag(
  1. String key,
  2. String value
)

Tag this subscriber with a key/value so you can target them in segments — e.g. setTag('role', 'client'), setTag('username', 'ehs4nnn'). Build tag-condition segments in the console (Push → Segments → Tag is …).

Safe before or after push is enabled: if a token is already registered the tags sync immediately, otherwise they're attached on the next registration.

Implementation

Future<void> setTag(String key, String value) => setTags({key: value});