-
-
Notifications
You must be signed in to change notification settings - Fork 270
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
Conversation
Maybe it should also be mentioned that template variables can be used to update the |
lib/src/upgrade_messages.dart
Outdated
@@ -46,7 +46,7 @@ enum UpgraderMessage { | |||
/// String get buttonTitleIgnore => 'My Ignore'; | |||
/// } | |||
/// | |||
/// UpgradeAlert(messages: MyUpgraderMessages()); | |||
/// UpgradeAlert(upgrader: Upgrader(messages: MyUpgraderMessages()); |
There was a problem hiding this comment.
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);
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point. Updated. @larryaasen
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@amarell Thanks
This is the correct way to override UpgraderMessages, right? I don't see
messages
parameter inUpgradeAlert
.Probably something that changed in recent updates.