createToken method
Creates a notification token for the device.
Parameters:
deviceNotificationToken
: The DeviceNotificationToken to create.
Returns:
- A Future that resolves to a boolean indicating the success of the operation.
Implementation
Future<bool> createToken(
DeviceNotificationToken deviceNotificationToken,
) async {
return dio
.post(
"/create-token",
data: deviceNotificationToken.toJSON(),
)
.then(
(response) => response.data,
);
}