segmentio/analytics_flutter

Set push token

lironzemingo opened this issue · 6 comments

How do I set a Firebase push token?

hi @lironzemingo , do yo mean about this token ?

hi @lironzemingo , do yo mean about this token ?

yes

You can follow that URL (from firebase) they explain how implement in flutter, for your project, you can include analytics_flutter methods like 'track' inside the message methods.

You can follow that URL (from firebase) they explain how implement in flutter, for your project, you can include analytics_flutter methods like 'track' inside the message methods.

when I used the discontinued flutter_segment package, I set the token using :

await Segment.setContext({
  'device': {
    'token': yourTokenString
  },
});

(see docs)
isn't there something similar here?

Hi @lironzemingo sorry for the delay, you can follow this test as example to set token on your context:
image
On line 36 you can access to set a new token value for your context.