registerPushToken method Null safety
- {required PushTokenType type,
- required String token,
- bool alwaysPush = false,
- bool unique = false}
Registers push token
with type
.
In order to make push notification work with sendbird, token
has to be
registered with specific PushTokenType such as fcm or apns. If unique
is true
then only one push token will be keep tracked
Make sure to pass token
that is for the specific PushTokenType
Implementation
Future<PushTokenRegistrationStatus> registerPushToken({
required PushTokenType type,
required String token,
bool alwaysPush = false,
bool unique = false,
}) async {
return _int.api
.send<PushTokenRegistrationStatus>(UserPushTokenRegisterRequest(
type: type,
token: token,
alwaysPush: alwaysPush,
unique: unique,
));
}