]> git.cworth.org Git - lmno.games/commitdiff
Change fetchPlayer to fetchFirstPlayer
authorKevin Worth <kworth082@gmail.com>
Mon, 4 May 2020 02:39:44 +0000 (22:39 -0400)
committerCarl Worth <cworth@cworth.org>
Sat, 23 May 2020 13:49:00 +0000 (06:49 -0700)
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.

flutterempires/lib/main.dart
flutterempires/lib/player.dart

index 816b13eab8ad4082d493bcb9b901e84bdc946c53..e313be10cb04ba71750ab650ab2a589a0cd48b8f 100644 (file)
@@ -58,7 +58,7 @@ class _MyHomePageState extends State<MyHomePage> {
   @override
   void initState() {
     super.initState();
-    futurePlayer = Player.fetchPlayer();
+    futurePlayer = Player.fetchFirstPlayer();
   }
 
   void _incrementCounter() {
index c25a53b75628779c57ffde4bc65c50c317046fae..36d7ced1389db3361f0c4db527d1f9d7a47cd341 100644 (file)
@@ -15,7 +15,7 @@ class Player {
     );
   }
 
-  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) {