简体   繁体   中英

Flutter. How to have constant/permanent notification running?

I would love to know if it is possible to have this kind of notification using flutter. These image I made on my phone from the app "A HIIT Interval Timer". 在此处输入图片说明 在此处输入图片说明

There is an Icon when it is resized but when you put down the notification bar it shows you the remaining time left. I would like to make a very similiar thing for my app that includes a timer. What is the correct name for this kind of notification? Where should I start looking for making this? thanks

flutter_local_notifications plugin can be used for this use case. On Android, the icon that will be used comes from the Android resources folder.

// Initialize the plugin, app_icon needs to be a added as a drawable resource to the Android head project

const AndroidInitializationSettings initializationSettingsAndroid =
    AndroidInitializationSettings('app_icon');

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM