As a temporary workaround for not being able to send push messages from within a Flutter app, you can add a web service block that allows app users with a certain role to send push messages. We'll show you how to set this up for "Boss" type users in this simple and basic tutorial. 


Prerequisites: 

- Pro subscription

- It helps when you have some experience with using web services in AppMachine, but it is not a strict requirement. 


  1. Start by adding a new web service block to your app:


  2. Select the "Custom web service" option from the list after adding the block:


  3. In the next screen, select the "POST" from the dropdown:


  4. As URL enter the following URL: https://api.appmachine.com/v1/pushnotification

  5. Select the "AppMachine API" option from the Authorization provider dropdown:

  6. Add the following parameters in the Body tab:
    message
    isEnabledIOS: true
    isEnabledAndroid: true

    Like this: 
    Don't forget to set the "message" field to "required".

  7. Click next, name your web service and then click next again: 

  8. Name your block and you're done with adding the block: 

  9. Remove the "IsEnabledIOS" and "IsEnabledAndroid" fields from your layout so your left with this: 



  10. Change the button text if you want: 


  11. Add a Lock block with the following lock type: 
    And the following settings:


  12. Place the Push web service block nested below the Lock block: 


  13. You're done! 


Notes: There is no way of displaying the amount of characters the user has left to type. There is a limit of 140, so you may want to add a label to inform the user about this. They'll have to keep an eye on the length of the message themselves.