-
Notifications
You must be signed in to change notification settings - Fork 72
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
Display version number in settings #34
Conversation
micedreams
commented
Sep 29, 2023
•
edited
Loading
edited
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.
Minor comment, rest all looks good!
final info = await PackageInfo.fromPlatform(); | ||
emit(info.version); | ||
} | ||
} |
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.
Creating a new cubit is not necessary as we don't have any dynamic properties in the state. Also, we can't update the version number dynamically in Flutter. So It's fine to call PackageInfo.fromPlatform();
directly in the VersionNumber
widget.
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.
@SankethBK I did not see Future Builder being used anywhere... that's why I created a cubit. Can I use a Future builder? or should I use something else?!!
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.
Hey again... I went ahead and used Future builder.
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.
Hey FutureBuilder
is fine
Thank you again for contribution |