This is a refactor I did to help get myself familiar with the codebase. It does not change any functionality. It does 2 things:
Pulls the ListTile for a character in the character select menu out into it's own widget
Takes some of the things we did repeatedly in that widget and pulls them into a var.
Why?
Pulling these things out into variables should do a few things for us:
Makes things a little easier to read by giving them a meaningful name.
Gives us 1 spot in the code to tweak these should they ever need tweaked.
For the variables storing the return value of a function, it allows us to just run those calculations once instead of multiple times per character.
Notes
This is by no means necessary. Again, we don't really gain any user facing benefits here, this was more for me (and other developers) to help make this bit of code just a tad easier to read.
I'm new to Flutter and happy to make changes/learn as I go. Please feel free to leave helpful suggestions or point me in the right direction if something I've done doesn't follow best practices or your preferences.
What is this
This is a refactor I did to help get myself familiar with the codebase. It does not change any functionality. It does 2 things:
Why?
Pulling these things out into variables should do a few things for us:
Notes
This is by no means necessary. Again, we don't really gain any user facing benefits here, this was more for me (and other developers) to help make this bit of code just a tad easier to read.
I'm new to Flutter and happy to make changes/learn as I go. Please feel free to leave helpful suggestions or point me in the right direction if something I've done doesn't follow best practices or your preferences.