Skip to content

Add support for universal banner messages#8995

Merged
kenzieschmoll merged 3 commits intoflutter:masterfrom
kenzieschmoll:banner-message
Mar 6, 2025
Merged

Add support for universal banner messages#8995
kenzieschmoll merged 3 commits intoflutter:masterfrom
kenzieschmoll:banner-message

Conversation

@kenzieschmoll
Copy link
Copy Markdown
Member

@kenzieschmoll kenzieschmoll commented Mar 6, 2025

Banner messages added with the universal id universalBannerMessageId will show up on every DevTools screen.

Follow up to #8995 and part of the work to address #7002.

Comment thread packages/devtools_app/test/shared/managers/banner_messages_test.dart Outdated
Comment thread packages/devtools_app/test/shared/managers/banner_messages_test.dart Outdated
///
/// Messages with this screen id will be added to the list of messages for
/// every screen from the [BannerMessages] widget.
const universalBannerMessageId = 'universal';
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is the banner ID the same as the banner key? (Can there be more than one universal banner? Does dismissing one of them dismiss all of them?)

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good question. No this is the ID to use for the screen, not the ID for the banner message itself. There can be more than one banner message with this screen id, much like there can be multiple banner messages for any other screen id. I will rename this to universalScreenId to make this less confusing. Banner messages are still identified by their key.

Copy link
Copy Markdown
Member

@elliette elliette left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One question but LGTM!

@kenzieschmoll kenzieschmoll merged commit d60e38c into flutter:master Mar 6, 2025
@kenzieschmoll kenzieschmoll deleted the banner-message branch March 6, 2025 18:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants