title: The following assertion was thrown during performLayout():
body: <p>I'm new to flutter and I'm following up with this <a href="https://www.udemy.com/course/flutter-dart-the-complete-flutter-app-development-course/" rel="nofollow noreferrer">Udemy</a> course but I face this error when I run the app on Android emulater on windows machine it shows the button on the whole screen </p>
  
  <p>the app simple I'm just trying to get data from the user to store it in s file then print it in the console</p>
  
  <p><a href="https://i.stack.imgur.com/25Qo6.png" rel="nofollow noreferrer">My Result</a></p>
  
  <p><strong>Expected result</strong></p>
  
  <p><a href="https://i.stack.imgur.com/VQnZ1.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/VQnZ1.png" alt="enter image description here"></a></p>
  
  <p>My code:-</p>
  
  <p>main.dart</p>
  
  <pre><code>import 'dart:async';
  import 'dart:io';
  
  import 'package:flutter/material.dart';
  import 'package:path_provider/path_provider.dart';
  
  
  void main() async{
  
    var data = await readData();
    if(data != null){
      print(data);
    }
  
    runApp(
        MaterialApp(
          title: "IO",
          home: Home(),
        )
    );
  }
  
  class Home extends StatefulWidget {
    @override
    _HomeState createState() =&gt; _HomeState();
  }
  
  class _HomeState extends State&lt;Home&gt; {
  
    var _enterDataField = TextEditingController();
    @override
    Widget build(BuildContext context) {
      return Scaffold(
        appBar: AppBar(
          title: Text("Read/Write"),
          centerTitle: true,
          backgroundColor: Colors.greenAccent,
        ),
        body: new Container(
          padding: EdgeInsets.all(13.4),
          alignment: Alignment.topCenter,
          child: ListTile(
            title: TextField(
              controller: _enterDataField,
              decoration: InputDecoration(
                  labelText: "Input Something"
              ),
            ),
            subtitle: FlatButton(
              color: Colors.redAccent,
              onPressed: (){
                print("Flat button");
                writeData(_enterDataField.text);
              },
              child: new Column(
                children: &lt;Widget&gt;[
                  Text("Save Data"),
                  Padding(padding: EdgeInsets.all(14.5)),
                  Text("Save data goes all"),
                ],
              ),
            ),
          ),
        ),
      );
    }
  }
  
  Future&lt;String&gt; get _localPath async {
    final directory = await getApplicationDocumentsDirectory();
    return directory.path; // /home/directory/
  }
  
  Future&lt;File&gt; get _localFile async {
    final path = await _localPath;
    return File("$path/data.txt"); // /home/directory/data.txt
  }
  
  Future&lt;File&gt; writeData(String message) async {
    final file = await _localFile;
    return file.writeAsString("$message");
  }
  
  Future&lt;String&gt; readData() async{
    try{
      final file = await _localFile;
      String data = await file.readAsString();
      return data;
    }catch(e){
      return "Nothing has been saved yet!";
    }
  }
  </code></pre>
  
  <p>pubspec.yaml</p>
  
  <pre><code>version: 1.0.0+1
  
  environment:
    sdk: "&gt;=2.1.0 &lt;3.0.0"
  
  dependencies:
    flutter:
      sdk: flutter
  
    # The following adds the Cupertino Icons font to your application.
    # Use with the CupertinoIcons class for iOS style icons.
    cupertino_icons: ^0.1.2
    path_provider: ^1.1.0
  </code></pre>
  
  <p>Error during run:</p>
  
  <pre><code>Launching lib\main.dart on Android SDK built for x86 in debug mode...
  Initializing gradle...
  Resolving dependencies...
  Gradle task 'assembleDebug'...
  Built build\app\outputs\apk\debug\app-debug.apk.
  I/flutter ( 4904): Nothing has been saved yet!
  I/Choreographer( 4904): Skipped 105 frames!  The application may be doing too much work on its main thread.
  Syncing files to device Android SDK built for x86...
  D/EGL_emulation( 4904): eglMakeCurrent: 0xe7085900: ver 3 1 (tinfo 0xe70839b0)
  I/flutter ( 4904): ══╡ EXCEPTION CAUGHT BY RENDERING LIBRARY ╞═════════════════════════════════════════════════════════
  I/flutter ( 4904): The following assertion was thrown during performLayout():
  I/flutter ( 4904): not implemented
  I/flutter ( 4904): 'package:flutter/src/material/input_decorator.dart': Failed assertion: line 977 pos 12: 'false'
  I/flutter ( 4904): 
  I/flutter ( 4904): Either the assertion indicates an error in the framework itself, or we should provide substantially
  I/flutter ( 4904): more information in this error message to help you determine and fix the underlying cause.
  I/flutter ( 4904): In either case, please report this assertion by filing a bug on GitHub:
  I/flutter ( 4904):   https://github.com/flutter/flutter/issues/new?template=BUG.md
  I/flutter ( 4904): 
  I/flutter ( 4904): When the exception was thrown, this was the stack:
  I/flutter ( 4904): #2      _RenderDecoration.computeDistanceToActualBaseline (package:flutter/src/material/input_decorator.dart:977:12)
  I/flutter ( 4904): #3      RenderBox.getDistanceToActualBaseline.&lt;anonymous closure&gt; (package:flutter/src/rendering/box.dart:1672:50)
  I/flutter ( 4904): #4      __InternalLinkedHashMap&amp;_HashVMBase&amp;MapMixin&amp;_LinkedHashMapMixin.putIfAbsent (dart:collection/runtime/libcompact_hash.dart:281:23)
  I/flutter ( 4904): #5      RenderBox.getDistanceToActualBaseline (package:flutter/src/rendering/box.dart:1672:22)
  I/flutter ( 4904): #6      _RenderProxyBox&amp;RenderBox&amp;RenderObjectWithChildMixin&amp;RenderProxyBoxMixin.computeDistanceToActualBaseline (package:flutter/src/rendering/proxy_box.dart:97:20)
  I/flutter ( 4904): #7      RenderBox.getDistanceToActualBaseline.&lt;anonymous closure&gt; (package:flutter/src/rendering/box.dart:1672:50)
  I/flutter ( 4904): #8      __InternalLinkedHashMap&amp;_HashVMBase&amp;MapMixin&amp;_LinkedHashMapMixin.putIfAbsent (dart:collection/runtime/libcompact_hash.dart:281:23)
  I/flutter ( 4904): #9      RenderBox.getDistanceToActualBaseline (package:flutter/src/rendering/box.dart:1672:22)
  I/flutter ( 4904): #10     _RenderProxyBox&amp;RenderBox&amp;RenderObjectWithChildMixin&amp;RenderProxyBoxMixin.computeDistanceToActualBaseline (package:flutter/src/rendering/proxy_box.dart:97:20)
  I/flutter ( 4904): #11     RenderBox.getDistanceToActualBaseline.&lt;anonymous closure&gt; (package:flutter/src/rendering/box.dart:1672:50)
  I/flutter ( 4904): #12     __InternalLinkedHashMap&amp;_HashVMBase&amp;MapMixin&amp;_LinkedHashMapMixin.putIfAbsent (dart:collection/runtime/libcompact_hash.dart:281:23)
  I/flutter ( 4904): #13     RenderBox.getDistanceToActualBaseline (package:flutter/src/rendering/box.dart:1672:22)
  I/flutter ( 4904): #14     _RenderProxyBox&amp;RenderBox&amp;RenderObjectWithChildMixin&amp;RenderProxyBoxMixin.computeDistanceToActualBaseline (package:flutter/src/rendering/proxy_box.dart:97:20)
  I/flutter ( 4904): #15     RenderBox.getDistanceToActualBaseline.&lt;anonymous closure&gt; (package:flutter/src/rendering/box.dart:1672:50)
  I/flutter ( 4904): #16     __InternalLinkedHashMap&amp;_HashVMBase&amp;MapMixin&amp;_LinkedHashMapMixin.putIfAbsent (dart:collection/runtime/libcompact_hash.dart:281:23)
  I/flutter ( 4904): #17     RenderBox.getDistanceToActualBaseline (package:flutter/src/rendering/box.dart:1672:22)
  I/flutter ( 4904): #18     RenderBox.getDistanceToBaseline (package:flutter/src/rendering/box.dart:1655:27)
  I/flutter ( 4904): #19     _RenderListTile._boxBaseline (package:flutter/src/material/list_tile.dart:886:16)
  I/flutter ( 4904): #20     _RenderListTile.performLayout (package:flutter/src/material/list_tile.dart:945:32)
  I/flutter ( 4904): #21     RenderObject.layout (package:flutter/src/rendering/object.dart:1634:7)
  I/flutter ( 4904): #22     RenderPadding.performLayout (package:flutter/src/rendering/shifted_box.dart:199:11)
  I/flutter ( 4904): #23     RenderObject.layout (package:flutter/src/rendering/object.dart:1634:7)
  I/flutter ( 4904): #24     _RenderProxyBox&amp;RenderBox&amp;RenderObjectWithChildMixin&amp;RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:104:13)
  I/flutter ( 4904): #25     RenderObject.layout (package:flutter/src/rendering/object.dart:1634:7)
  I/flutter ( 4904): #26     _RenderProxyBox&amp;RenderBox&amp;RenderObjectWithChildMixin&amp;RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:104:13)
  I/flutter ( 4904): #27     RenderObject.layout (package:flutter/src/rendering/object.dart:1634:7)
  I/flutter ( 4904): #28     _RenderProxyBox&amp;RenderBox&amp;RenderObjectWithChildMixin&amp;RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:104:13)
  I/flutter ( 4904): #29     RenderObject.layout (package:flutter/src/rendering/object.dart:1634:7)
  I/flutter ( 4904): #30     RenderPositionedBox.performLayout (package:flutter/src/rendering/shifted_box.dart:385:13)
  I/flutter ( 4904): #31     RenderObject.layout (package:flutter/src/rendering/object.dart:1634:7)
  I/flutter ( 4904): #32     RenderPadding.performLayout (package:flutter/src/rendering/shifted_box.dart:199:11)
  I/flutter ( 4904): #33     RenderObject.layout (package:flutter/src/rendering/object.dart:1634:7)
  I/flutter ( 4904): #34     MultiChildLayoutDelegate.layoutChild (package:flutter/src/rendering/custom_layout.dart:142:11)
  I/flutter ( 4904): #35     _ScaffoldLayout.performLayout (package:flutter/src/material/scaffold.dart:339:7)
  I/flutter ( 4904): #36     MultiChildLayoutDelegate._callPerformLayout (package:flutter/src/rendering/custom_layout.dart:212:7)
  I/flutter ( 4904): #37     RenderCustomMultiChildLayoutBox.performLayout (package:flutter/src/rendering/custom_layout.dart:356:14)
  I/flutter ( 4904): #38     RenderObject.layout (package:flutter/src/rendering/object.dart:1634:7)
  I/flutter ( 4904): #39     _RenderProxyBox&amp;RenderBox&amp;RenderObjectWithChildMixin&amp;RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:104:13)
  I/flutter ( 4904): #40     RenderObject.layout (package:flutter/src/rendering/object.dart:1634:7)
  I/flutter ( 4904): #41     _RenderProxyBox&amp;RenderBox&amp;RenderObjectWithChildMixin&amp;RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:104:13)
  I/flutter ( 4904): #42     _RenderCustomClip.performLayout (package:flutter/src/rendering/proxy_box.dart:1203:11)
  I/flutter ( 4904): #43     RenderObject.layout (package:flutter/src/rendering/object.dart:1634:7)
  I/flutter ( 4904): #44     _RenderProxyBox&amp;RenderBox&amp;RenderObjectWithChildMixin&amp;RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:104:13)
  I/flutter ( 4904): #45     RenderObject.layout (package:flutter/src/rendering/object.dart:1634:7)
  I/flutter ( 4904): #46     _RenderProxyBox&amp;RenderBox&amp;RenderObjectWithChildMixin&amp;RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:104:13)
  I/flutter ( 4904): #47     RenderObject.layout (package:flutter/src/rendering/object.dart:1634:7)
  I/flutter ( 4904): #48     _RenderProxyBox&amp;RenderBox&amp;RenderObjectWithChildMixin&amp;RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:104:13)
  I/flutter ( 4904): #49     RenderObject.layout (package:flutter/src/rendering/object.dart:1634:7)
  I/flutter ( 4904): #50     _RenderProxyBox&amp;RenderBox&amp;RenderObjectWithChildMixin&amp;RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:104:13)
  I/flutter ( 4904): #51     RenderObject.layout (package:flutter/src/rendering/object.dart:1634:7)
  I/flutter ( 4904): #52     _RenderProxyBox&amp;RenderBox&amp;RenderObjectWithChildMixin&amp;RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:104:13)
  I/flutter ( 4904): #53     RenderObject.layout (package:flutter/src/rendering/object.dart:1634:7)
  I/flutter ( 4904): #54     _RenderProxyBox&amp;RenderBox&amp;RenderObjectWithChildMixin&amp;RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:104:13)
  I/flutter ( 4904): #55     RenderObject.layout (package:flutter/src/rendering/object.dart:1634:7)
  I/flutter ( 4904): #56     _RenderProxyBox&amp;RenderBox&amp;RenderObjectWithChildMixin&amp;RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:104:13)
  I/flutter ( 4904): #57     RenderObject.layout (package:flutter/src/rendering/object.dart:1634:7)
  I/flutter ( 4904): #58     _RenderProxyBox&amp;RenderBox&amp;RenderObjectWithChildMixin&amp;RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:104:13)
  I/flutter ( 4904): #59     RenderOffstage.performLayout (package:flutter/src/rendering/proxy_box.dart:2900:13)
  I/flutter ( 4904): #60     RenderObject.layout (package:flutter/src/rendering/object.dart:1634:7)
  I/flutter ( 4904): #61     RenderStack.performLayout (package:flutter/src/rendering/stack.dart:510:15)
  I/flutter ( 4904): #62     RenderObject.layout (package:flutter/src/rendering/object.dart:1634:7)
  I/flutter ( 4904): #63     __RenderTheatre&amp;RenderBox&amp;RenderObjectWithChildMixin&amp;RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:104:13)
  I/flutter ( 4904): #64     RenderObject.layout (package:flutter/src/rendering/object.dart:1634:7)
  I/flutter ( 4904): #65     _RenderProxyBox&amp;RenderBox&amp;RenderObjectWithChildMixin&amp;RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:104:13)
  I/flutter ( 4904): #66     RenderObject.layout (package:flutter/src/rendering/object.dart:1634:7)
  I/flutter ( 4904): #67     _RenderProxyBox&amp;RenderBox&amp;RenderObjectWithChildMixin&amp;RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:104:13)
  I/flutter ( 4904): #68     RenderObject.layout (package:flutter/src/rendering/object.dart:1634:7)
  I/flutter ( 4904): #69     _RenderProxyBox&amp;RenderBox&amp;RenderObjectWithChildMixin&amp;RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:104:13)
  I/flutter ( 4904): #70     RenderObject.layout (package:flutter/src/rendering/object.dart:1634:7)
  I/flutter ( 4904): #71     _RenderProxyBox&amp;RenderBox&amp;RenderObjectWithChildMixin&amp;RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:104:13)
  I/flutter ( 4904): #72     RenderObject.layout (package:flutter/src/rendering/object.dart:1634:7)
  I/flutter ( 4904): #73     _RenderProxyBox&amp;RenderBox&amp;RenderObjectWithChildMixin&amp;RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:104:13)
  I/flutter ( 4904): #74     RenderObject.layout (package:flutter/src/rendering/object.dart:1634:7)
  I/flutter ( 4904): #75     RenderView.performLayout (package:flutter/src/rendering/view.dart:147:13)
  I/flutter ( 4904): #76     RenderObject._layoutWithoutResize (package:flutter/src/rendering/object.dart:1509:7)
  I/flutter ( 4904): #77     PipelineOwner.flushLayout (package:flutter/src/rendering/object.dart:768:18)
  I/flutter ( 4904): #78     _WidgetsFlutterBinding&amp;BindingBase&amp;GestureBinding&amp;ServicesBinding&amp;SchedulerBinding&amp;PaintingBinding&amp;SemanticsBinding&amp;RendererBinding.drawFrame (package:flutter/src/rendering/binding.dart:281:19)
  I/flutter ( 4904): #79     _WidgetsFlutterBinding&amp;BindingBase&amp;GestureBinding&amp;ServicesBinding&amp;SchedulerBinding&amp;PaintingBinding&amp;SemanticsBinding&amp;RendererBinding&amp;WidgetsBinding.drawFrame (package:flutter/src/widgets/binding.dart:686:13)
  I/flutter ( 4904): #80     _WidgetsFlutterBinding&amp;BindingBase&amp;GestureBinding&amp;ServicesBinding&amp;SchedulerBinding&amp;PaintingBinding&amp;SemanticsBinding&amp;RendererBinding._handlePersistentFrameCallback (package:flutter/src/rendering/binding.dart:219:5)
  I/flutter ( 4904): #81     _WidgetsFlutterBinding&amp;BindingBase&amp;GestureBinding&amp;ServicesBinding&amp;SchedulerBinding._invokeFrameCallback (package:flutter/src/scheduler/binding.dart:990:15)
  I/flutter ( 4904): #82     _WidgetsFlutterBinding&amp;BindingBase&amp;GestureBinding&amp;ServicesBinding&amp;SchedulerBinding.handleDrawFrame (package:flutter/src/scheduler/binding.dart:930:9)
  I/flutter ( 4904): #83     _WidgetsFlutterBinding&amp;BindingBase&amp;GestureBinding&amp;ServicesBinding&amp;SchedulerBinding.scheduleWarmUpFrame.&lt;anonymous closure&gt; (package:flutter/src/scheduler/binding.dart:751:7)
  I/flutter ( 4904): #85     _Timer._runTimers (dart:isolate/runtime/libtimer_impl.dart:382:19)
  I/flutter ( 4904): #86     _Timer._handleMessage (dart:isolate/runtime/libtimer_impl.dart:416:5)
  I/flutter ( 4904): #87     _RawReceivePortImpl._handleMessage (dart:isolate/runtime/libisolate_patch.dart:171:12)
  I/flutter ( 4904): (elided 3 frames from class _AssertionError and package dart:async)
  I/flutter ( 4904): 
  I/flutter ( 4904): The following RenderObject was being processed when the exception was fired:
  I/flutter ( 4904):   _RenderListTile#c955b relayoutBoundary=up7 NEEDS-LAYOUT NEEDS-PAINT
  I/flutter ( 4904):   creator: _ListTile ← MediaQuery ← Padding ← SafeArea ← Semantics ← Listener ← _GestureSemantics ←
  I/flutter ( 4904):   RawGestureDetector ← GestureDetector ← InkWell ← ListTile ← Align ← ⋯
  I/flutter ( 4904):   parentData: offset=Offset(0.0, 0.0) (can use size)
  I/flutter ( 4904):   constraints: BoxConstraints(0.0&lt;=w&lt;=352.6, 0.0&lt;=h&lt;=668.1)
  I/flutter ( 4904):   size: MISSING
  I/flutter ( 4904): This RenderObject had the following descendants (showing up to depth 5):
  I/flutter ( 4904):   RenderSemanticsAnnotations#30cbc relayoutBoundary=up8 NEEDS-PAINT
  I/flutter ( 4904):     RenderIgnorePointer#d2ac5 relayoutBoundary=up9 NEEDS-PAINT
  I/flutter ( 4904):       RenderPointerListener#95c88 relayoutBoundary=up10 NEEDS-PAINT
  I/flutter ( 4904):         _RenderDecoration#d39f5 relayoutBoundary=up11 NEEDS-PAINT
  I/flutter ( 4904):           RenderRepaintBoundary#7e8a4 relayoutBoundary=up12 NEEDS-PAINT
  I/flutter ( 4904):           RenderTransform#6a1d0 relayoutBoundary=up12 NEEDS-PAINT
  I/flutter ( 4904):           RenderConstrainedBox#bd9be relayoutBoundary=up12 NEEDS-PAINT
  I/flutter ( 4904):           RenderCustomPaint#862dd NEEDS-PAINT
  I/flutter ( 4904):   RenderSemanticsAnnotations#103e3 relayoutBoundary=up8 NEEDS-PAINT
  I/flutter ( 4904):     _RenderInputPadding#ab3b4 relayoutBoundary=up9 NEEDS-PAINT
  I/flutter ( 4904):       RenderConstrainedBox#39a4f relayoutBoundary=up10 NEEDS-PAINT
  I/flutter ( 4904):         RenderPhysicalShape#32f8b relayoutBoundary=up11 NEEDS-PAINT
  I/flutter ( 4904):           RenderCustomPaint#5950d relayoutBoundary=up12 NEEDS-PAINT
  I/flutter ( 4904): ════════════════════════════════════════════════════════════════════════════════════════════════════
  I/flutter ( 4904): Another exception was thrown: RenderBox was not laid out: _RenderListTile#c955b relayoutBoundary=up7 NEEDS-PAINT
  I/flutter ( 4904): Another exception was thrown: RenderBox was not laid out: RenderPadding#a1895 relayoutBoundary=up6 NEEDS-PAINT
  I/flutter ( 4904): Another exception was thrown: RenderBox was not laid out: RenderSemanticsAnnotations#9585a relayoutBoundary=up5 NEEDS-PAINT
  I/flutter ( 4904): Another exception was thrown: RenderBox was not laid out: RenderPointerListener#867ef relayoutBoundary=up4 NEEDS-PAINT
  I/flutter ( 4904): Another exception was thrown: 'package:flutter/src/rendering/shifted_box.dart': Failed assertion: line 314 pos 12: 'child.hasSize': is not true.
  D/        ( 4904): HostConnection::get() New Host Connection established 0xce8870c0, tid 4923
  D/EGL_emulation( 4904): eglMakeCurrent: 0xe569c960: ver 3 1 (tinfo 0xe447f500)
  </code></pre>