Notification when application is closed

Hello there, how to allow the user to receive notifications even when the app is closed.
Thank you in advance.

Please checkout this link

By default background messaging is not enabled. To handle messages in the background:

  1. Add the dependency in your app-level build.gradle file that is typically located at <app-name>/android/app/build.gradle .
dependencies {
  // ...

  implementation '<latest_version>'

Note: you can find out what the latest version of the plugin is here (“Cloud Messaging”).
2. Add an class to your app in the same directory as your . This is typically found in <app-name>/android/app/src/main/java/<app-organization-path>/ .

package io.flutter.plugins.firebasemessagingexample;

import io.flutter.plugin.common.PluginRegistry;
import io.flutter.plugin.common.PluginRegistry.PluginRegistrantCallback;
import io.flutter.plugins.GeneratedPluginRegistrant;
import io.flutter.plugins.firebasemessaging.FlutterFirebaseMessagingService;

public class Application extends FlutterApplication implements PluginRegistrantCallback {
  public void onCreate() {

  public void registerWith(PluginRegistry registry) {

Thank you, i use onesignal to send notification. Ok I will insert it.