From: Kevin Worth Date: Mon, 4 May 2020 02:39:44 +0000 (-0400) Subject: Change fetchPlayer to fetchFirstPlayer X-Git-Url: https://git.cworth.org/git?p=lmno.games;a=commitdiff_plain;h=893153993716d14aa37813af19fd7dff83f70af3 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. --- diff --git a/flutterempires/lib/main.dart b/flutterempires/lib/main.dart index 816b13e..e313be1 100644 --- a/flutterempires/lib/main.dart +++ b/flutterempires/lib/main.dart @@ -58,7 +58,7 @@ class _MyHomePageState extends State { @override void initState() { super.initState(); - futurePlayer = Player.fetchPlayer(); + futurePlayer = Player.fetchFirstPlayer(); } void _incrementCounter() { diff --git a/flutterempires/lib/player.dart b/flutterempires/lib/player.dart index c25a53b..36d7ced 100644 --- a/flutterempires/lib/player.dart +++ b/flutterempires/lib/player.dart @@ -15,7 +15,7 @@ class Player { ); } - static Future fetchPlayer() async { + static Future fetchFirstPlayer() async { final response = await http.get('https://families.cworth.org/api/players'); if (response.statusCode == 200) {