Kevin Worth [Fri, 8 May 2020 15:01:21 +0000 (11:01 -0400)]
Rip out column and just show player list view
This was the easiest thing to do quickly, because a list view does not
play nicely inside of a column widget (can't put a scrollable inside of
a scrollable, sort of thing...)
Eventually, we need to combine the views or make separate screens for
each one.
Kevin Worth [Fri, 8 May 2020 13:07:17 +0000 (09:07 -0400)]
Clean up some leftover hello flutter code
The hello flutter code has button which increments a number on the
screen and this has just been cluttering things up. This will likely be
a good place to put the logic we'll need for submitting the user's
name and character, so we won't get rid of it completely.
Kevin Worth [Mon, 4 May 2020 11:53:03 +0000 (07:53 -0400)]
Rename directory flutterfamilies to flutterempires
Originally the flutter app was created in a directory called flutterfamilies
and this should take care of the final references still pointing to that old
directory now that it's renamed to flutterempires
Kevin Worth [Fri, 8 May 2020 12:58:03 +0000 (08:58 -0400)]
Display total number of players
Setting up a new widget to display the list of players, but for the
time being (for simplicity's sake) it's just displaying the size of the
returned list of players.
Kevin Worth [Fri, 8 May 2020 12:52:02 +0000 (08:52 -0400)]
Stop using dart:js in player.dart
This "web only" package was preventing the app from being built on
Android and iOS, so now that we have a method for parsing the player
list, we no longer need to use the (albeit simpler) JsArray type.
Kevin Worth [Mon, 4 May 2020 02:39:44 +0000 (22:39 -0400)]
Change fetchPlayer to fetchFirstPlayer
Initially I was going to fix the logic in this method to fit the name,
but instead - for the time being - I'll simply make the name more
accurately describe what the method is doing.
Kevin Worth [Mon, 4 May 2020 00:21:31 +0000 (20:21 -0400)]
Add initState to start the async call to fetch player
initState is a good place to do asynchronous calls that we just
need to happen one time at the beginning.
So, in initStart we fetch the player and put it in a Future, and then
when (each and every time) build gets called, it uses what has
been fetched or shows the spinner if the fetch hasn't completed
successfully yet.
Kevin Worth [Sun, 3 May 2020 19:31:41 +0000 (15:31 -0400)]
Add a FutureBuilder widget to hold a fetched player
Rather than doing a fetch within this build method (which gets called repeatedly),
we use a FutureBuilder to show a spinner until the player has finished being
fetched asynchronously.