-1

For example: I have an API and when I update the API with data then I should get a notification on my flutter app

Basically, the app should fetch API even when my app is completely closed and if available then show me the notification in the notification centre of the device. (Currently specifically for Android) Also please note that the API is built on a flask app.

heyom
  • 322
  • 2
  • 7

1 Answers1

1

Firebase is the best way, but if you do not want to use it, this is the way

You can use Local notification plugin https://pub.dev/packages/flutter_local_notifications

After your API response, just show that data in your local notification

and you need a service in background https://pub.dev/packages/flutter_background_service

Here is a similar question for service background How to create a service in Flutter to make an app to run always in background?