0

In my flutter app the user can plan alarms to be shown at specific times. They can also choose between standard notifications and full screen intent notifications. Notifications are planned using the flutter_local_notifications package.

These notifications can have actions to be handled by the app.

The problem I'm having is that the action buttons have different styling when they are full screen intent vs standard. It colors the background of the action instead of just the text. I would like the full screen intent actions to have the same styling as a normal notification.

standard notification actions

full screen intent notification actions

I've looked through the flutter_local_notifications github code to see if I could figure out how to do any sort of styling without much success. If I understand correctly the following is what colors the action:

final Spannable actionTitleSpannable = new SpannableString(action.title);
  if (action.titleColor != null) {
    actionTitleSpannable.setSpan(
        new ForegroundColorSpan(action.titleColor), 0, actionTitleSpannable.length(), 0);
}

Why this has a different effect while the notification is a full screen intent is not clear to me.

Other stack overflow questions and the android documentation haven't been able to help me much further either. This answer is the closest I've found to an explanation.

Is it possible to style the action buttons the same for normal and full screen intent notifications?

0 Answers0