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.
@override
void initState() {
super.initState();
- futurePlayer = Player.fetchPlayer();
+ futurePlayer = Player.fetchFirstPlayer();
}
void _incrementCounter() {
);
}
- static Future<Player> fetchPlayer() async {
+ static Future<Player> fetchFirstPlayer() async {
final response = await http.get('https://families.cworth.org/api/players');
if (response.statusCode == 200) {