]> git.cworth.org Git - lmno.games/commitdiff
Add Expanded to fix the scrollable in a scrollable problem
authorKevin Worth <kworth082@gmail.com>
Sun, 10 May 2020 20:34:41 +0000 (16:34 -0400)
committerCarl Worth <cworth@cworth.org>
Sat, 23 May 2020 13:49:00 +0000 (06:49 -0700)
Since the ListView can't be put into the Column widget, we
instead add an Expanded widget and put the ListView in there.

flutterempires/lib/main.dart

index 0685857d349cbfc925164ef09e61647a81b157ab..7bb337c1b7b2b35cf158e276443e3d73a07c670f 100644 (file)
@@ -134,8 +134,9 @@ class _MyHomePageState extends State<MyHomePage> {
                   return CircularProgressIndicator();
                 },
               ),
-              Spacer(flex: 10),
-              FutureBuilder<List<Player>>(
+              Expanded(
+                flex: 10,
+              child: FutureBuilder<List<Player>>(
                   future: allPlayers,
                   builder: (context, snapshot) {
                     if (snapshot.hasData) {
@@ -151,6 +152,7 @@ class _MyHomePageState extends State<MyHomePage> {
                     }
                     return CircularProgressIndicator();
                   }),
+              ),
             ],
           ),
         ),