Solvedflutter Wrapping a Column with an expanded in a SingleChildScrollView throws an exception

Hi,

lets take this simple App, it should have a Textfield and a Text always at the bottom of the screen:

image

  Widget build(BuildContext context) {
    return new Scaffold(
      appBar: new AppBar(),
      body: new Column(mainAxisSize: MainAxisSize.max,
        mainAxisAlignment: MainAxisAlignment.start,
        crossAxisAlignment: CrossAxisAlignment.stretch,
        children: <Widget>[
          new Text(
            'Line 1',
          ),
          new Text(
            'Line 2',
          ),
          Expanded(

            child: Container(
              alignment: Alignment.bottomCenter,
                          child: new Text(
                'Should be at the bottom',
              ),
            ),
          ),
        ],
      ),
    );
  }

Which is a pretty common use case. Unfortunately the Textfield at the bottom won't get scrolled into view when getting focus so I wrap the Scaffold in a SingleChildScrollView which leads to this exception:

I/flutter ( 6245): ══╡ EXCEPTION CAUGHT BY RENDERING LIBRARY ╞═════════════════════════════════════════════════════════
I/flutter ( 6245): The following assertion was thrown during performLayout():
I/flutter ( 6245): RenderCustomMultiChildLayoutBox object was given an infinite size during layout.
I/flutter ( 6245): This probably means that it is a render object that tries to be as big as possible, but it was put
I/flutter ( 6245): inside another render object that allows its children to pick their own size.
I/flutter ( 6245): The nearest ancestor providing an unbounded height constraint is:
I/flutter ( 6245):   _RenderSingleChildViewport#d8e19 NEEDS-LAYOUT NEEDS-PAINT
I/flutter ( 6245):   creator: _SingleChildViewport  _ScrollableScope  IgnorePointer-[GlobalKey#f839e] ← Semantics ←
I/flutter ( 6245):   Listener  _GestureSemantics 
I/flutter ( 6245):   RawGestureDetector-[LabeledGlobalKey<RawGestureDetectorState>#1b983] ←
I/flutter ( 6245):   _ExcludableScrollSemantics-[GlobalKey#92c21] ← RepaintBoundary ← CustomPaint ← RepaintBoundary ←
I/flutter ( 6245):   NotificationListener<ScrollNotification>  
I/flutter ( 6245):   parentData: <none> (can use size)
I/flutter ( 6245):   constraints: BoxConstraints(w=411.4, h=683.4)
I/flutter ( 6245):   layer: OffsetLayer#3a690
I/flutter ( 6245):   size: Size(411.4, 683.4)
I/flutter ( 6245): The constraints that applied to the RenderCustomMultiChildLayoutBox were:
I/flutter ( 6245):   BoxConstraints(w=411.4, 0.0<=h<=Infinity)
I/flutter ( 6245): The exact size it was given was:
I/flutter ( 6245):   Size(411.4, Infinity)
I/flutter ( 6245): See https://flutter.io/layout/ for more information.
I/flutter ( 6245):
I/flutter ( 6245): When the exception was thrown, this was the stack:
I/flutter ( 6245): #0      RenderBox.debugAssertDoesMeetConstraints.<anonymous closure> (package:flutter/src/rendering/box.dart:1713:9)
I/flutter ( 6245): #1      RenderBox.debugAssertDoesMeetConstraints (package:flutter/src/rendering/box.dart:1787:6)
I/flutter ( 6245): #2      RenderBox.size=.<anonymous closure> (package:flutter/src/rendering/box.dart:1507:17)
I/flutter ( 6245): #3      RenderBox.size= (package:flutter/src/rendering/box.dart:1507:65)
I/flutter ( 6245): #4      RenderCustomMultiChildLayoutBox.performLayout (package:flutter/src/rendering/custom_layout.dart:354:5)
I/flutter ( 6245): #5      RenderObject.layout (package:flutter/src/rendering/object.dart:1576:7)
I/flutter ( 6245): #6      _RenderProxyBox&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:109:13)
I/flutter ( 6245): #7      RenderObject.layout (package:flutter/src/rendering/object.dart:1576:7)
I/flutter ( 6245): #8      _RenderProxyBox&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:109:13)
I/flutter ( 6245): #9      _RenderCustomClip.performLayout (package:flutter/src/rendering/proxy_box.dart:1143:11)
I/flutter ( 6245): #10     RenderObject.layout (package:flutter/src/rendering/object.dart:1576:7)
I/flutter ( 6245): #11     _RenderSingleChildViewport.performLayout (package:flutter/src/widgets/single_child_scroll_view.dart:479:13)
I/flutter ( 6245): #12     RenderObject.layout (package:flutter/src/rendering/object.dart:1576:7)
I/flutter ( 6245): #13     _RenderProxyBox&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:109:13)
I/flutter ( 6245): #14     RenderObject.layout (package:flutter/src/rendering/object.dart:1576:7)
I/flutter ( 6245): #15     _RenderProxyBox&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:109:13)
I/flutter ( 6245): #16     RenderObject.layout (package:flutter/src/rendering/object.dart:1576:7)
I/flutter ( 6245): #17     _RenderProxyBox&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:109:13)
I/flutter ( 6245): #18     RenderObject.layout (package:flutter/src/rendering/object.dart:1576:7)
I/flutter ( 6245): #19     _RenderProxyBox&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:109:13)
I/flutter ( 6245): #20     RenderObject.layout (package:flutter/src/rendering/object.dart:1576:7)
I/flutter ( 6245): #21     _RenderProxyBox&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:109:13)
I/flutter ( 6245): #22     RenderObject.layout (package:flutter/src/rendering/object.dart:1576:7)
I/flutter ( 6245): #23     _RenderProxyBox&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:109:13)
I/flutter ( 6245): #24     RenderObject.layout (package:flutter/src/rendering/object.dart:1576:7)
I/flutter ( 6245): #25     _RenderProxyBox&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:109:13)
I/flutter ( 6245): #26     RenderObject.layout (package:flutter/src/rendering/object.dart:1576:7)
I/flutter ( 6245): #27     _RenderProxyBox&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:109:13)
I/flutter ( 6245): #28     RenderObject.layout (package:flutter/src/rendering/object.dart:1576:7)
I/flutter ( 6245): #29     _RenderSingleChildViewport.performLayout (package:flutter/src/widgets/single_child_scroll_view.dart:479:13)
I/flutter ( 6245): #30     RenderObject.layout (package:flutter/src/rendering/object.dart:1576:7)
I/flutter ( 6245): #31     _RenderProxyBox&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:109:13)
I/flutter ( 6245): #32     RenderObject.layout (package:flutter/src/rendering/object.dart:1576:7)
I/flutter ( 6245): #33     _RenderProxyBox&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:109:13)
I/flutter ( 6245): #34     RenderObject.layout (package:flutter/src/rendering/object.dart:1576:7)
I/flutter ( 6245): #35     _RenderProxyBox&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:109:13)
I/flutter ( 6245): #36     RenderObject.layout (package:flutter/src/rendering/object.dart:1576:7)
I/flutter ( 6245): #37     _RenderProxyBox&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:109:13)
I/flutter ( 6245): #38     RenderObject.layout (package:flutter/src/rendering/object.dart:1576:7)
I/flutter ( 6245): #39     _RenderProxyBox&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:109:13)
I/flutter ( 6245): #40     RenderObject.layout (package:flutter/src/rendering/object.dart:1576:7)
I/flutter ( 6245): #41     _RenderProxyBox&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:109:13)
I/flutter ( 6245): #42     RenderObject.layout (package:flutter/src/rendering/object.dart:1576:7)
I/flutter ( 6245): #43     _RenderProxyBox&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:109:13)
I/flutter ( 6245): #44     RenderObject.layout (package:flutter/src/rendering/object.dart:1576:7)
I/flutter ( 6245): #45     _RenderProxyBox&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:109:13)
I/flutter ( 6245): #46     RenderObject.layout (package:flutter/src/rendering/object.dart:1576:7)
I/flutter ( 6245): #47     _RenderProxyBox&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:109:13)
I/flutter ( 6245): #48     RenderObject.layout (package:flutter/src/rendering/object.dart:1576:7)
I/flutter ( 6245): #49     _RenderProxyBox&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:109:13)
I/flutter ( 6245): #50     RenderObject.layout (package:flutter/src/rendering/object.dart:1576:7)
I/flutter ( 6245): #51     _RenderProxyBox&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:109:13)
I/flutter ( 6245): #52     RenderObject.layout (package:flutter/src/rendering/object.dart:1576:7)
I/flutter ( 6245): #53     _RenderProxyBox&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:109:13)
I/flutter ( 6245): #54     RenderObject.layout (package:flutter/src/rendering/object.dart:1576:7)
I/flutter ( 6245): #55     _RenderProxyBox&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:109:13)
I/flutter ( 6245): #56     RenderObject.layout (package:flutter/src/rendering/object.dart:1576:7)
I/flutter ( 6245): #57     _RenderProxyBox&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:109:13)
I/flutter ( 6245): #58     RenderObject.layout (package:flutter/src/rendering/object.dart:1576:7)
I/flutter ( 6245): #59     _RenderProxyBox&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:109:13)
I/flutter ( 6245): #60     RenderObject.layout (package:flutter/src/rendering/object.dart:1576:7)
I/flutter ( 6245): #61     _RenderProxyBox&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:109:13)
I/flutter ( 6245): #62     RenderOffstage.performLayout (package:flutter/src/rendering/proxy_box.dart:2831:13)
I/flutter ( 6245): #63     RenderObject.layout (package:flutter/src/rendering/object.dart:1576:7)
I/flutter ( 6245): #64     RenderStack.performLayout (package:flutter/src/rendering/stack.dart:520:15)
I/flutter ( 6245): #65     RenderObject.layout (package:flutter/src/rendering/object.dart:1576:7)
I/flutter ( 6245): #66     __RenderTheatre&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:109:13)
I/flutter ( 6245): #67     RenderObject.layout (package:flutter/src/rendering/object.dart:1576:7)
I/flutter ( 6245): #68     _RenderProxyBox&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:109:13)
I/flutter ( 6245): #69     RenderObject.layout (package:flutter/src/rendering/object.dart:1576:7)
I/flutter ( 6245): #70     _RenderProxyBox&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:109:13)
I/flutter ( 6245): #71     RenderObject.layout (package:flutter/src/rendering/object.dart:1576:7)
I/flutter ( 6245): #72     _RenderProxyBox&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:109:13)
I/flutter ( 6245): #73     RenderObject.layout (package:flutter/src/rendering/object.dart:1576:7)
I/flutter ( 6245): #74     _RenderProxyBox&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:109:13)
I/flutter ( 6245): #75     RenderObject.layout (package:flutter/src/rendering/object.dart:1576:7)
I/flutter ( 6245): #76     _RenderProxyBox&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:109:13)
I/flutter ( 6245): #77     RenderObject.layout (package:flutter/src/rendering/object.dart:1576:7)
I/flutter ( 6245): #78     RenderView.performLayout (package:flutter/src/rendering/view.dart:125:13)
I/flutter ( 6245): #79     RenderObject._layoutWithoutResize (package:flutter/src/rendering/object.dart:1451:7)
I/flutter ( 6245): #80     PipelineOwner.flushLayout (package:flutter/src/rendering/object.dart:710:18)
I/flutter ( 6245): #81     _WidgetsFlutterBinding&BindingBase&GestureBinding&ServicesBinding&SchedulerBinding&PaintingBinding&RendererBinding.drawFrame (package:flutter/src/rendering/binding.dart:270:19)
I/flutter ( 6245): #82     _WidgetsFlutterBinding&BindingBase&GestureBinding&ServicesBinding&SchedulerBinding&PaintingBinding&RendererBinding&WidgetsBinding.drawFrame (package:flutter/src/widgets/binding.dart:627:13)
I/flutter ( 6245): #83     _WidgetsFlutterBinding&BindingBase&GestureBinding&ServicesBinding&SchedulerBinding&PaintingBinding&RendererBinding._handlePersistentFrameCallback (package:flutter/src/rendering/binding.dart:208:5)
I/flutter ( 6245): #84     _WidgetsFlutterBinding&BindingBase&GestureBinding&ServicesBinding&SchedulerBinding._invokeFrameCallback (package:flutter/src/scheduler/binding.dart:990:15)
I/flutter ( 6245): #85     _WidgetsFlutterBinding&BindingBase&GestureBinding&ServicesBinding&SchedulerBinding.handleDrawFrame (package:flutter/src/scheduler/binding.dart:930:9)
I/flutter ( 6245): #86     _WidgetsFlutterBinding&BindingBase&GestureBinding&ServicesBinding&SchedulerBinding.scheduleWarmUpFrame.<anonymous closure> (package:flutter/src/scheduler/binding.dart:751:7)
I/flutter ( 6245): #88     _Timer._runTimers (dart:isolate/runtime/libtimer_impl.dart:382:19)
I/flutter ( 6245): #89     _Timer._handleMessage (dart:isolate/runtime/libtimer_impl.dart:416:5)
I/flutter ( 6245): #90     _RawReceivePortImpl._handleMessage (dart:isolate/runtime/libisolate_patch.dart:165:12)
I/flutter ( 6245): (elided one frame from package dart:async)
I/flutter ( 6245):
I/flutter ( 6245): The following RenderObject was being processed when the exception was fired:
I/flutter ( 6245):   RenderCustomMultiChildLayoutBox#1d542 relayoutBoundary=up12 NEEDS-LAYOUT NEEDS-PAINT
I/flutter ( 6245):   creator: CustomMultiChildLayout  AnimatedBuilder  DefaultTextStyle  AnimatedDefaultTextStyle 
I/flutter ( 6245):   _InkFeatures-[GlobalKey#a15e8 ink renderer] ← NotificationListener<LayoutChangedNotification> ←
I/flutter ( 6245):   PhysicalModel  AnimatedPhysicalModel  Material  PrimaryScrollController  _ScaffoldScope 
I/flutter ( 6245):   Scaffold  
I/flutter ( 6245):   parentData: <none> (can use size)
I/flutter ( 6245):   constraints: BoxConstraints(w=411.4, 0.0<=h<=Infinity)
I/flutter ( 6245):   size: Size(411.4, Infinity)
I/flutter ( 6245): This RenderObject had the following descendants (showing up to depth 5):
I/flutter ( 6245):   RenderFlex#d05ae NEEDS-LAYOUT NEEDS-PAINT
I/flutter ( 6245):     RenderParagraph#be72d NEEDS-LAYOUT NEEDS-PAINT
I/flutter ( 6245):     RenderParagraph#707ac NEEDS-LAYOUT NEEDS-PAINT
I/flutter ( 6245):     RenderSemanticsAnnotations#04c80 NEEDS-LAYOUT NEEDS-PAINT
Reloaded 0 of 391 libraries in 391ms.
I/flutter ( 6245):       RenderIgnorePointer#2bbea NEEDS-LAYOUT NEEDS-PAINT
I/flutter ( 6245):         RenderPointerListener#01e0d NEEDS-LAYOUT NEEDS-PAINT
I/flutter ( 6245):           _RenderDecoration#7a351 NEEDS-LAYOUT NEEDS-PAINT
I/flutter ( 6245):     RenderPositionedBox#faaa5 NEEDS-LAYOUT NEEDS-PAINT
I/flutter ( 6245):       RenderFlex#46117 NEEDS-LAYOUT NEEDS-PAINT
I/flutter ( 6245):         RenderSemanticsAnnotations#3fc96 NEEDS-LAYOUT NEEDS-PAINT
I/flutter ( 6245):           RenderIgnorePointer#8523d NEEDS-LAYOUT NEEDS-PAINT
I/flutter ( 6245):         RenderParagraph#43155 NEEDS-LAYOUT NEEDS-PAINT
I/flutter ( 6245):   RenderConstrainedBox#160a1 NEEDS-LAYOUT NEEDS-PAINT
I/flutter ( 6245):     RenderSemanticsAnnotations#7b97b NEEDS-LAYOUT NEEDS-PAINT
I/flutter ( 6245):       RenderPhysicalModel#c472f NEEDS-LAYOUT NEEDS-PAINT
I/flutter ( 6245):         _RenderInkFeatures#902a3 NEEDS-LAYOUT NEEDS-PAINT
I/flutter ( 6245):           RenderPositionedBox#87b65 NEEDS-LAYOUT NEEDS-PAINT
I/flutter ( 6245):   RenderStack#4e7f8 NEEDS-LAYOUT NEEDS-PAINT
I/flutter ( 6245):     RenderTransform#0443a NEEDS-LAYOUT NEEDS-PAINT
I/flutter ( 6245):       RenderTransform#92ca9 NEEDS-LAYOUT NEEDS-PAINT
I/flutter ( 6245): ════════════════════════════════════════════════════════════════════════════════════════════════════
I/flutter ( 6245): Another exception was thrown: _RenderInkFeatures object was given an infinite size during layout.
I/flutter ( 6245): Another exception was thrown: RenderPhysicalModel object was given an infinite size during layout.
I/flutter ( 6245): Another exception was thrown: _RenderSingleChildViewport object was given an infinite size during layout.
I/flutter ( 6245): Another exception was thrown: RenderIgnorePointer object was given an infinite size during layout.
I/flutter ( 6245): Another exception was thrown: RenderSemanticsAnnotations object was given an infinite size during layout.
I/flutter ( 6245): Another exception was thrown: RenderPointerListener object was given an infinite size during layout.
I/flutter ( 6245): Another exception was thrown: RenderSemanticsGestureHandler object was given an infinite size during layout.
I/flutter ( 6245): Another exception was thrown: _RenderExcludableScrollSemantics object was given an infinite size during layout.
I/flutter ( 6245): Another exception was thrown: RenderRepaintBoundary object was given an infinite size during layout.
I/flutter ( 6245): Another exception was thrown: RenderCustomPaint object was given an infinite size during layout.
I/flutter ( 6245): Another exception was thrown: RenderRepaintBoundary object was given an infinite size during layout.
D/EGL_emulation( 6245): eglMakeCurrent: 0xa51053c0: ver 3 1 (tinfo 0xa51032d0)
Lost connection to device.
Exited (sigterm)

Moving the SingleChildScrollView inside the Scaffold's body doesn't work either:

Launching lib\main.dart on Android SDK built for x86 in debug mode...
Built build\app\outputs\apk\debug\app-debug.apk.
D/EGL_emulation( 5210): eglMakeCurrent: 0xa301bbc0: ver 3 1 (tinfo 0xa0f9b970)
E/eglCodecCommon( 5210): glUtilsParamSize: unknow param 0x000082da
E/eglCodecCommon( 5210): glUtilsParamSize: unknow param 0x000082da
I/Choreographer( 5210): Skipped 36 frames!  The application may be doing too much work on its main thread.
D/EGL_emulation( 5210): eglMakeCurrent: 0xa7785360: ver 3 1 (tinfo 0xa77832c0)
I/flutter ( 5210): ══╡ EXCEPTION CAUGHT BY RENDERING LIBRARY ╞═════════════════════════════════════════════════════════
I/flutter ( 5210): The following assertion was thrown during performLayout():
I/flutter ( 5210): RenderCustomMultiChildLayoutBox object was given an infinite size during layout.
I/flutter ( 5210): This probably means that it is a render object that tries to be as big as possible, but it was put
I/flutter ( 5210): inside another render object that allows its children to pick their own size.
I/flutter ( 5210): The nearest ancestor providing an unbounded height constraint is:
I/flutter ( 5210):   _RenderSingleChildViewport#89ed7 NEEDS-LAYOUT NEEDS-PAINT
I/flutter ( 5210):   creator: _SingleChildViewport  _ScrollableScope  IgnorePointer-[GlobalKey#fde50] ← Semantics ←
I/flutter ( 5210):   Listener  _GestureSemantics 
I/flutter ( 5210):   RawGestureDetector-[LabeledGlobalKey<RawGestureDetectorState>#c830f] ←
I/flutter ( 5210):   _ExcludableScrollSemantics-[GlobalKey#cf513] ← RepaintBoundary ← CustomPaint ← RepaintBoundary ←
I/flutter ( 5210):   NotificationListener<ScrollNotification>  
I/flutter ( 5210):   parentData: <none> (can use size)
I/flutter ( 5210):   constraints: BoxConstraints(w=411.4, h=683.4)
I/flutter ( 5210):   size: MISSING
I/flutter ( 5210): The constraints that applied to the RenderCustomMultiChildLayoutBox were:
I/flutter ( 5210):   BoxConstraints(w=411.4, 0.0<=h<=Infinity)
I/flutter ( 5210): The exact size it was given was:
I/flutter ( 5210):   Size(411.4, Infinity)
I/flutter ( 5210): See https://flutter.io/layout/ for more information.
I/flutter ( 5210):
I/flutter ( 5210): When the exception was thrown, this was the stack:
I/flutter ( 5210): #0      RenderBox.debugAssertDoesMeetConstraints.<anonymous closure> (package:flutter/src/rendering/box.dart:1713:9)
I/flutter ( 5210): #1      RenderBox.debugAssertDoesMeetConstraints (package:flutter/src/rendering/box.dart:1787:6)
I/flutter ( 5210): #2      RenderBox.size=.<anonymous closure> (package:flutter/src/rendering/box.dart:1507:17)
I/flutter ( 5210): #3      RenderBox.size= (package:flutter/src/rendering/box.dart:1507:65)
I/flutter ( 5210): #4      RenderCustomMultiChildLayoutBox.performLayout (package:flutter/src/rendering/custom_layout.dart:354:5)
I/flutter ( 5210): #5      RenderObject.layout (package:flutter/src/rendering/object.dart:1576:7)
I/flutter ( 5210): #6      _RenderProxyBox&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:109:13)
I/flutter ( 5210): #7      RenderObject.layout (package:flutter/src/rendering/object.dart:1576:7)
I/flutter ( 5210): #8      _RenderProxyBox&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:109:13)
I/flutter ( 5210): #9      _RenderCustomClip.performLayout (package:flutter/src/rendering/proxy_box.dart:1143:11)
I/flutter ( 5210): #10     RenderObject.layout (package:flutter/src/rendering/object.dart:1576:7)
I/flutter ( 5210): #11     _RenderSingleChildViewport.performLayout (package:flutter/src/widgets/single_child_scroll_view.dart:479:13)
I/flutter ( 5210): #12     RenderObject.layout (package:flutter/src/rendering/object.dart:1576:7)
I/flutter ( 5210): #13     _RenderProxyBox&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:109:13)
I/flutter ( 5210): #14     RenderObject.layout (package:flutter/src/rendering/object.dart:1576:7)
I/flutter ( 5210): #15     _RenderProxyBox&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:109:13)
I/flutter ( 5210): #16     RenderObject.layout (package:flutter/src/rendering/object.dart:1576:7)
I/flutter ( 5210): #17     _RenderProxyBox&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:109:13)
I/flutter ( 5210): #18     RenderObject.layout (package:flutter/src/rendering/object.dart:1576:7)
I/flutter ( 5210): #19     _RenderProxyBox&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:109:13)
I/flutter ( 5210): #20     RenderObject.layout (package:flutter/src/rendering/object.dart:1576:7)
I/flutter ( 5210): #21     _RenderProxyBox&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:109:13)
I/flutter ( 5210): #22     RenderObject.layout (package:flutter/src/rendering/object.dart:1576:7)
I/flutter ( 5210): #23     _RenderProxyBox&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:109:13)
I/flutter ( 5210): #24     RenderObject.layout (package:flutter/src/rendering/object.dart:1576:7)
I/flutter ( 5210): #25     _RenderProxyBox&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:109:13)
I/flutter ( 5210): #26     RenderObject.layout (package:flutter/src/rendering/object.dart:1576:7)
I/flutter ( 5210): #27     _RenderProxyBox&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:109:13)
I/flutter ( 5210): #28     RenderObject.layout (package:flutter/src/rendering/object.dart:1576:7)
I/flutter ( 5210): #29     _RenderProxyBox&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:109:13)
I/flutter ( 5210): #30     RenderObject.layout (package:flutter/src/rendering/object.dart:1576:7)
I/flutter ( 5210): #31     _RenderProxyBox&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:109:13)
I/flutter ( 5210): #32     RenderObject.layout (package:flutter/src/rendering/object.dart:1576:7)
I/flutter ( 5210): #33     _RenderProxyBox&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:109:13)
I/flutter ( 5210): #34     RenderObject.layout (package:flutter/src/rendering/object.dart:1576:7)
I/flutter ( 5210): #35     _RenderProxyBox&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:109:13)
I/flutter ( 5210): #36     RenderObject.layout (package:flutter/src/rendering/object.dart:1576:7)
I/flutter ( 5210): #37     _RenderProxyBox&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:109:13)
I/flutter ( 5210): #38     RenderObject.layout (package:flutter/src/rendering/object.dart:1576:7)
I/flutter ( 5210): #39     _RenderProxyBox&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:109:13)
I/flutter ( 5210): #40     RenderObject.layout (package:flutter/src/rendering/object.dart:1576:7)
I/flutter ( 5210): #41     _RenderProxyBox&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:109:13)
I/flutter ( 5210): #42     RenderObject.layout (package:flutter/src/rendering/object.dart:1576:7)
I/flutter ( 5210): #43     _RenderProxyBox&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:109:13)
I/flutter ( 5210): #44     RenderOffstage.performLayout (package:flutter/src/rendering/proxy_box.dart:2831:13)
I/flutter ( 5210): #45     RenderObject.layout (package:flutter/src/rendering/object.dart:1576:7)
I/flutter ( 5210): #46     RenderStack.performLayout (package:flutter/src/rendering/stack.dart:520:15)
I/flutter ( 5210): #47     RenderObject.layout (package:flutter/src/rendering/object.dart:1576:7)
I/flutter ( 5210): #48     __RenderTheatre&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:109:13)
I/flutter ( 5210): #49     RenderObject.layout (package:flutter/src/rendering/object.dart:1576:7)
I/flutter ( 5210): #50     _RenderProxyBox&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:109:13)
I/flutter ( 5210): #51     RenderObject.layout (package:flutter/src/rendering/object.dart:1576:7)
I/flutter ( 5210): #52     _RenderProxyBox&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:109:13)
I/flutter ( 5210): #53     RenderObject.layout (package:flutter/src/rendering/object.dart:1576:7)
I/flutter ( 5210): #54     _RenderProxyBox&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:109:13)
I/flutter ( 5210): #55     RenderObject.layout (package:flutter/src/rendering/object.dart:1576:7)
I/flutter ( 5210): #56     _RenderProxyBox&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:109:13)
I/flutter ( 5210): #57     RenderObject.layout (package:flutter/src/rendering/object.dart:1576:7)
I/flutter ( 5210): #58     _RenderProxyBox&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:109:13)
I/flutter ( 5210): #59     RenderObject.layout (package:flutter/src/rendering/object.dart:1576:7)
I/flutter ( 5210): #60     RenderView.performLayout (package:flutter/src/rendering/view.dart:125:13)
I/flutter ( 5210): #61     RenderObject._layoutWithoutResize (package:flutter/src/rendering/object.dart:1451:7)
I/flutter ( 5210): #62     PipelineOwner.flushLayout (package:flutter/src/rendering/object.dart:710:18)
I/flutter ( 5210): #63     _WidgetsFlutterBinding&BindingBase&GestureBinding&ServicesBinding&SchedulerBinding&PaintingBinding&RendererBinding.drawFrame (package:flutter/src/rendering/binding.dart:270:19)
I/flutter ( 5210): #64     _WidgetsFlutterBinding&BindingBase&GestureBinding&ServicesBinding&SchedulerBinding&PaintingBinding&RendererBinding&WidgetsBinding.drawFrame (package:flutter/src/widgets/binding.dart:627:13)
I/flutter ( 5210): #65     _WidgetsFlutterBinding&BindingBase&GestureBinding&ServicesBinding&SchedulerBinding&PaintingBinding&RendererBinding._handlePersistentFrameCallback (package:flutter/src/rendering/binding.dart:208:5)
I/flutter ( 5210): #66     _WidgetsFlutterBinding&BindingBase&GestureBinding&ServicesBinding&SchedulerBinding._invokeFrameCallback (package:flutter/src/scheduler/binding.dart:990:15)
I/flutter ( 5210): #67     _WidgetsFlutterBinding&BindingBase&GestureBinding&ServicesBinding&SchedulerBinding.handleDrawFrame (package:flutter/src/scheduler/binding.dart:930:9)
I/flutter ( 5210): #68     _WidgetsFlutterBinding&BindingBase&GestureBinding&ServicesBinding&SchedulerBinding.scheduleWarmUpFrame.<anonymous closure> (package:flutter/src/scheduler/binding.dart:751:7)
I/flutter ( 5210): #70     _Timer._runTimers (dart:isolate/runtime/libtimer_impl.dart:382:19)
I/flutter ( 5210): #71     _Timer._handleMessage (dart:isolate/runtime/libtimer_impl.dart:416:5)
I/flutter ( 5210): #72     _RawReceivePortImpl._handleMessage (dart:isolate/runtime/libisolate_patch.dart:165:12)
I/flutter ( 5210): (elided one frame from package dart:async)
I/flutter ( 5210):
I/flutter ( 5210): The following RenderObject was being processed when the exception was fired:
I/flutter ( 5210):   RenderCustomMultiChildLayoutBox#eb8b9 relayoutBoundary=up3 NEEDS-LAYOUT NEEDS-PAINT
I/flutter ( 5210):   creator: CustomMultiChildLayout  AnimatedBuilder  DefaultTextStyle  AnimatedDefaultTextStyle 
I/flutter ( 5210):   _InkFeatures-[GlobalKey#3eaee ink renderer] ← NotificationListener<LayoutChangedNotification> ←
I/flutter ( 5210):   PhysicalModel  AnimatedPhysicalModel  Material  PrimaryScrollController  _ScaffoldScope 
I/flutter ( 5210):   Scaffold  
I/flutter ( 5210):   parentData: <none> (can use size)
I/flutter ( 5210):   constraints: BoxConstraints(w=411.4, 0.0<=h<=Infinity)
I/flutter ( 5210):   size: Size(411.4, Infinity)
I/flutter ( 5210): This RenderObject had the following descendants (showing up to depth 5):
I/flutter ( 5210):   RenderRepaintBoundary#62484 NEEDS-LAYOUT NEEDS-PAINT
I/flutter ( 5210):     RenderCustomPaint#ee167 NEEDS-LAYOUT NEEDS-PAINT
I/flutter ( 5210):       RenderRepaintBoundary#44385 NEEDS-LAYOUT NEEDS-PAINT
I/flutter ( 5210):         _RenderExcludableScrollSemantics#ef2e6 NEEDS-LAYOUT NEEDS-PAINT
I/flutter ( 5210):           RenderSemanticsGestureHandler#bc5d6 NEEDS-LAYOUT NEEDS-PAINT
I/flutter ( 5210):   RenderConstrainedBox#39c3a NEEDS-LAYOUT NEEDS-PAINT
I/flutter ( 5210):     RenderSemanticsAnnotations#1c8b4 NEEDS-LAYOUT NEEDS-PAINT
I/flutter ( 5210):       RenderPhysicalModel#f70a8 NEEDS-LAYOUT NEEDS-PAINT
I/flutter ( 5210):         _RenderInkFeatures#c0f45 NEEDS-LAYOUT NEEDS-PAINT
I/flutter ( 5210):           RenderPositionedBox#8924a NEEDS-LAYOUT NEEDS-PAINT
I/flutter ( 5210):   RenderStack#a0002 NEEDS-LAYOUT NEEDS-PAINT
I/flutter ( 5210):     RenderTransform#ca415 NEEDS-LAYOUT NEEDS-PAINT
I/flutter ( 5210):       RenderTransform#c49ab NEEDS-LAYOUT NEEDS-PAINT
I/flutter ( 5210): ════════════════════════════════════════════════════════════════════════════════════════════════════
I/flutter ( 5210): Another exception was thrown: _RenderInkFeatures object was given an infinite size during layout.
I/flutter ( 5210): Another exception was thrown: RenderPhysicalModel object was given an infinite size during layout.
I/flutter ( 5210): Another exception was thrown: RenderBox was not laid out: RenderRepaintBoundary#62484 NEEDS-LAYOUT NEEDS-PAINT
D/        ( 5210): HostConnection::get() New Host Connection established 0xa77888c0, tid 5232
D/EGL_emulation( 5210): eglMakeCurrent: 0xa301bbc0: ver 3 1 (tinfo 0xa7783210)

I know that there is a workaround explained here https://docs.flutter.io/flutter/widgets/SingleChildScrollView-class.html but for such a standard requirement of using Expanded inside a Column that must be able to scroll up when the keyboard appears there should be a better solution. @Hixie wrote that Scaffold would take care of this but obviously doesn't.

Please see also #18558 which shows another limitation of the workaround.

The sample app is here https://github.com/escamoteur/column_in_scrollable_repro

30 Answers

✔️Accepted Answer

It can be done this way:

class Home extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
        appBar: AppBar(
          title: Text('AppBar'),
        ),
        body: LayoutBuilder(builder: (context, constraints) {
          return SingleChildScrollView(
              child: ConstrainedBox(
                  constraints: BoxConstraints(minWidth: constraints.maxWidth, minHeight: constraints.maxHeight),
                  child: IntrinsicHeight(
                    child: Column(
                        mainAxisSize: MainAxisSize.max,
                        children: [
                          Text('header'),
                          Expanded(
                            child: Container(
                              color: Colors.green,
                              child: Text('body'),
                            ),
                          ),
                          Text('footer'),
                        ]
                    ),
                  )
              )
          );
        })
    );
  }
}

Other Answers:

One workaround I tries was to have an Expanded widget with an empty container. Then whatever you want to add to bottom, add it after the expanded container.

@override
  Widget build(BuildContext context) {
    return new Scaffold(
      appBar: new AppBar(),
      body: new Column(
        mainAxisSize: MainAxisSize.max,
        mainAxisAlignment: MainAxisAlignment.start,
        crossAxisAlignment: CrossAxisAlignment.stretch,
        children: <Widget>[
          new Text(
            'Line 1',
          ),
          new Text(
            'Line 2',
          ),
          new TextField(),
          Expanded(child: new Container(),),
          Column(
            children: <Widget>[
              new TextField(),
              new Text(
                'Should be at the bottom',
              ),
            ],
          )

        ],
      ),
    );
  }

Does this help?

You must make Container height equals to double.maxInfinite
child: Container( height: double.maxFinite, child: .....

Working fine for me in master branch 2.1.0-30.

fwiw, here's a re-usable null safe version of this:

class ScrollableColumn extends StatelessWidget {
  const ScrollableColumn(
      {Key? key,
      required this.children,
      this.crossAxisAlignment = CrossAxisAlignment.center,
      this.textDirection,
      this.mainAxisAlignment = MainAxisAlignment.start,
      this.mainAxisSize = MainAxisSize.max,
      this.verticalDirection = VerticalDirection.down,
      this.textBaseline})
      : super(key: key);
  final List<Widget> children;
  final CrossAxisAlignment crossAxisAlignment;
  final TextDirection? textDirection;
  final MainAxisAlignment mainAxisAlignment;
  final MainAxisSize mainAxisSize;
  final VerticalDirection verticalDirection;
  final TextBaseline? textBaseline;
  @override
  Widget build(BuildContext context) {
    return LayoutBuilder(builder: (_, constraints) {
      return SingleChildScrollView(
        child: ConstrainedBox(
          // Constrained box stops the column from getting too small, forcing it to be at least as tall as it's parent
          constraints: BoxConstraints(minWidth: constraints.maxWidth, minHeight: constraints.maxHeight),
          // Intrinsic height stops the column from expanding forever when it's height becomes unbounded
          // It will always use the full height of the parent, or the natural size of the children, whichever is greater.
          child: IntrinsicHeight(
            child: Column(
              children: children,
              crossAxisAlignment: crossAxisAlignment,
              textDirection: textDirection,
              mainAxisAlignment: mainAxisAlignment,
              mainAxisSize: mainAxisSize,
              verticalDirection: verticalDirection,
              textBaseline: textBaseline,
            ),
          ),
        ),
      );
    });
  }
}

Usage:

Widget build(BuildContext context){

  Widget _box(String name) =>
        Container(color: RandomColor().randomColor(), child: Text(name, style: TextStyle(fontSize: 128)));
        
  return ScrollableColumn(
    children: [
      Expanded(child: _box("Content1")),
      Expanded(child: _box("Content2")),
      Expanded(child: _box("Content3")),
    ],
  )
}
Scz2u5yuet.mp4

The recent refactor of SliverFillRemaining (#35810) should be able to provide a solution here as well.

I've re-worked the workaround above to illustrate:

sfr2

import 'package:flutter/material.dart';
import 'package:flutter/rendering.dart';

void main() => runApp(MyApp());

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(home: Home());
  }
}

class Home extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text('AppBar'),
      ),
      body: SafeArea(
        child: CustomScrollView(
          slivers: <Widget>[
            SliverToBoxAdapter(
              child: TextField(),
            ),
            SliverFillRemaining(
              hasScrollBody: false,
              child: IntrinsicHeight(
                child: Column(
                  mainAxisSize: MainAxisSize.max,
                  children: <Widget>[
                    Expanded(
                      child: Padding(
                        padding: const EdgeInsets.only(top: 8.0),
                        child: Container(
                          color: Colors.green,
                          child: Text('body'),
                        ),
                      ),
                    ),
                    Padding(
                      padding: const EdgeInsets.all(8.0),
                      child: RaisedButton(
                        child: Text('Bottom'),
                        onPressed: () {},
                      ),
                    ),
                  ],
                ),
              ),
            ),
          ],
        ),
      ),
    );
  }
}

There is another use case in #38641 that shows another SliverFillRemaining layout.

Issues #38640 and #35753 refer to improving documentation around this widget and others that use flexible spacing/sizing and scrolling views.

Related Issues:

459
flutter Multiple commands produce '/build/ios/Debug-iphonesimulator/Runner.app/Frameworks/Flutter.framework
I was able to fix it by opening the Runner workspace project in Xcode 10 Then navigate to File ...
449
flutter App Store iOS submission fails: The bundle Runner.app/Frameworks/App.framework does not support the minimum OS Version specified in the Info.plist
After doing a flutter clean changing MinimumOSVersion (inside /ios/Flutter/AppframeworkInfo.plist) t...
418
flutter 'com.android.support:appcompat-v7' has different version for the compile (26.1.0) and runtime (27.0.1) classpath
is like this i receive an error when i run flutter run My gradle.build file is: flutter doctor: ...
409
flutter Why does my text not wrap?
You have to wrap Column in a flexible Without flexible the column's width is not constrained to the ...
383
flutter Unexpected top padding in ListView put inside scaffold with no appBar
Yeah this is intentional If you put a widget before the ListView you should wrap the ListView with a...
315
flutter Missing xcode dependency: Python module "six"
try python2.x -m pip install six by @humblerookie's suggest or brew reinstall python@2 pip install s...
285
flutter flutter messaging: set the notification icon
Hey guys I fought with this for the better part of a day For some strange reason there are no tutori...
281
flutter Issue with cloud_firestore - Cannot fit requested classes in a single dex file.
As a workaround you can try enabling mutlidex for Android App by following Enable multidex for apps ...
265
flutter D8: Program type already present: io.flutter.BuildConfig
@smrucv I received the same error but after flutter clean and flutter packages get everything works ...
250
238
flutter Introduction of characters package causes crash on flutter run for preexisting Flutter applications
In my case I resolved the issue with flutter clean After e0ed12c I get this error when building: @ju...
221
flutter Making Network http error SocketException: Failed host lookup
@hoc081098 Double-check / make sure you have <uses-permission android:name=android.permission.INTERN...
216
flutter Support inlining Android/iOS views
iOS view embedding support has landed on master This is still just a preview There are multiple open...
207
flutter ✗ Android license status unknown.
Hi everyone Steps to Reproduce Please tell us what you were doing and what went wrong If you are run...
185
flutter idevice_id cannot run on catalina
When you're developing on Catalina Steps to Reproduce Run flutter doctor on macOS Catalina I get the...
181
flutter type 'List<dynamic>' is not a subtype of type 'List<String>'
The problem is your fromMap constructor is reading from a Map<String dynamic> ...
178
flutter TextField is hidden by keyboard inside of a Modal Bottom Sheet
This may not work for all situations but I have a modalBottomSheet that contains only a TextField ...
160
flutter Dismissing keyboard programatically
This is a better way as it also clears the focus: FocusScope.of(context).requestFocus(new FocusNode(...
157
flutter How to solve: Android license status unknown and also Android sdkmanager tool not found? Tried everything(as i think)
The answer is here Uncheck Hide Obsolete Packages and you'll see Android SDK Tools (Obsolete) 26.1.1...
156
flutter MissingPluginException: No implementation found for method
@mravn-google Yeah turned out I had to quit the flutter run process and start it up again Just a ful...
156
flutter firebase_auth: ^0.8.0+1 crashes on Android
Here i put this in file: android/gradle.properties: and changed targetSdkVersion to 28 and it worked...
153
flutter Android sdkmanager tool not found (C:...\Local\Android\sdk\tools\bin\sdkmanager)
This worked for me: open Android Studio's SDK Manager go to the Android SDK tab under SDK Tools ...
149
flutter 1.22.2 - Flutter plugin not installed; this adds Flutter specific functionality.
Hey @bhanuka96 try this line of code How do I fix this android plugin error? This error is being com...
139
flutter [ios][release] GeneratedPluginRegistrant.m Module not found
I may have found the answer from this comment: #21989 (comment) Seems like by opening up the project...
137
flutter [App.framework] Linked and embedded framework 'App.framework' was built for iOS/iOS Simulator
Does rm -rf ios/Flutter/App.framework get you unstuck? SOLUTION @jmagman has written an article on h...
134
flutter Bad state: Future already completed
I had the same issue.. The problem was the same that @soaresgabriel said but I was not navigating di...
129
flutter Execution failed for task ':app:compileFlutterBuildDebug' Issue
Hi @Ramihtet your logs show a different flutter version; could you please run flutter channel stable...
124
flutter Unable to load Asset - wrong indentation in pubspec.yaml
Is your assets key underneath a flutter: key as well? https://flutter.io/assets-and-images/ ...
124
flutter Flutter 1.12.13+hotfix.5: Flutter Run: The shrinker may have failed to optimize the Java bytecode.
The plugin seems to work correctly after adding minifyEnabled true as shown above in app-level build...
121
flutter Create iOS IPA from command line
This is what I ended up using as a complete release script ready for uploading to the Play Store/App...
118
flutter FutureBuilder rebuilds unnecessarily when we long press on FAB button or appBar UI.
Hello I believe the problem here is that didUpdateWidget of the FutureBuilder state is being called ...
112
flutter LinearGradient stops/colors properties as named parameters fail
Ah nice I'm on master but also had to flutter clean and then restart VS Code and now it has gone awa...
109
flutter gradle initializing taking forever
MacOS Android Studio 3.0.1 Try to install gradle manually (https://services.gradle.org/distributions...
102
flutter invalid text selection: TextSelection with TextEditingController
Can also confirm clearing text in single textfield throws exactly same exception FocusScope.of(conte...
102
flutter Bad state: Unexpected diagnostics:
Was able to fixed After add this in pubspec.yaml the error gone Thanks #62996 and #62240 ...
98
flutter [cloud_firestore 0.12.6] CloudFirestorePlugin.m:6:9: fatal error: 'UserAgent.h' file not found
I tried this • flutter clean • Clean Build Folder from Xcode • delete Podfile.lock But this didn't w...
95
flutter How to run on iOS simulator?
Make sure you have run sudo xcode-select --switch /Applications/Xcode.app/Contents/Developer sudo xc...
92
flutter flutter run failed due to 'Permission denied' when replacing signature of 'Flutter.framework'
After investigating i think the root cause was the xcode_backend.sh will mark the files under Flutte...
91
flutter [firebase_crashlytics] Gradle build failed
@TheVinhLuong Had the same issue your workaround worked thanks! @livingstonex If you've followed ins...
91
flutter "Minimum supported Gradle version is 5.4.1. Current version is 4.10.2."
Ran across this problem myself If anyone comes across this from google Steps to Reproduce Not much i...
91
flutter Analyzer 0.39.15 seems to break build_runner or json_serializable
For anyone searching here you can set the override for now inside your pubspec.yaml: As explained in...
89
flutter Execution failed for task ':firebase_auth:compileDebugJavaWithJavac'.
This is what helped me: Go to android/app/build.gradle file and change compileSdkVersion and targetS...
88
flutter flutter doctor returns [Unhandled exception: Exception: idevice_id returned an error]
running sudo pkill usbmuxd worked for me on Mac OSX I ran the flutter doctor there were some brew in...
88
flutter "-bash: webdev: command not found"
This worked for me: I am trying to get the web flutter running Updated the bash_profile with export ...
86
flutter [Error: Could not resolve the package 'characters' in 'package:characters/characters.dart'.] after enabling web
Hi @gamepro110 new project follow steps on this link for the SETUP only trying to build for android ...
85
flutter type 'Color' is not a subtype of type 'MaterialColor' of 'primarySwatch' where Color is from dart:ui
Looks like this is working as intended: primarySwatch takes a ColorSwatch [which MaterialColor exten...
83
flutter TextFormField Android "Failed assertion: 'initialValue == null || controller == null': is not true." Despite controller being null in debug.
I just had this problem For anyone else coming along check if you have passed both initialValue and ...
82
flutter AAPT: error: resource android:attr/fontVariationSettings not found after Flutter Upgrade
Setting compileSdkVersion 28 in app/build.gradle fixed the issue for me. My flutter application used...