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

Display version number in settings #34

Merged
merged 5 commits into from
Sep 30, 2023

Conversation

micedreams
Copy link
Collaborator

@micedreams micedreams commented Sep 29, 2023

Screenshot 2023-09-29 at 18 58 45 Screenshot 2023-09-29 at 18 59 00

@micedreams micedreams linked an issue Sep 29, 2023 that may be closed by this pull request
@micedreams micedreams closed this Sep 29, 2023
@micedreams micedreams reopened this Sep 30, 2023
@micedreams micedreams added the hacktoberfest Applicable to hacktoberfest label Sep 30, 2023
Copy link
Owner

@SankethBK SankethBK left a 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);
}
}
Copy link
Owner

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.

Copy link
Collaborator Author

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?!!

Copy link
Collaborator Author

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.

Copy link
Owner

Choose a reason for hiding this comment

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

Hey FutureBuilder is fine

@micedreams micedreams merged commit cd3c2d9 into master Sep 30, 2023
1 check passed
@SankethBK
Copy link
Owner

Thank you again for contribution

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
hacktoberfest Applicable to hacktoberfest
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Display version number in settings
2 participants