Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updated documentation for UpgraderMessages #402

Merged
merged 4 commits into from
Jun 9, 2024

Conversation

amarell
Copy link
Contributor

@amarell amarell commented Apr 16, 2024

This is the correct way to override UpgraderMessages, right? I don't see messages parameter in UpgradeAlert.

Probably something that changed in recent updates.

@amarell
Copy link
Contributor Author

amarell commented Apr 16, 2024

Maybe it should also be mentioned that template variables can be used to update the body message, although this is documented for body getter.

@@ -46,7 +46,7 @@ enum UpgraderMessage {
/// String get buttonTitleIgnore => 'My Ignore';
/// }
///
/// UpgradeAlert(messages: MyUpgraderMessages());
/// UpgradeAlert(upgrader: Upgrader(messages: MyUpgraderMessages());
Copy link
Owner

Choose a reason for hiding this comment

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

@amarell Good catch. However, in examples, we don't like to instantiate Upgrader() in the build method so it would look better like this:

/// final upgrader = Upgrader(messages: MyUpgraderMessages());
/// ...
/// UpgradeAlert(upgrader: upgrader);

Copy link
Contributor Author

@amarell amarell Jun 9, 2024

Choose a reason for hiding this comment

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

Good point. Updated. @larryaasen

Copy link
Owner

Choose a reason for hiding this comment

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

@amarell Thanks

@larryaasen larryaasen self-assigned this May 29, 2024
@larryaasen larryaasen added need more information Further information is requested documentation Documentation requested labels May 29, 2024
@larryaasen larryaasen merged commit fa02d08 into larryaasen:master Jun 9, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Documentation requested need more information Further information is requested
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants