mitchhymel / local_notifications

No longer in development -Flutter plugin for creating notifications
BSD 2-Clause "Simplified" License
108 stars 14 forks source link

Does it support custom layout ? #3

Open nsreenath opened 6 years ago

nsreenath commented 6 years ago

Does it support custom layouts such as placing play/pause buttons on the notification for a music player ?

mitchhymel commented 6 years ago

Custom layouts and "media style" layouts are not supported currently. I looked into this a little bit and it's definitely possible, but it will be a fair amount of more work. My motivation for building this plugin was a use case that just required basic notifications with actions, so I built that first. If anyone wants to extend it to support custom layouts, that'd be great! Otherwise, if/when such support will land depends on my motivation and free time.

mitchhymel commented 6 years ago

On the Android side of things, custom layout support from purely dart code is not possible. See this stackoverflow post. Essentially, the types of views allowed in a custom layout notification on Android is very limited and does not include the view that could render Flutter widgets.