title: How to put a floating widget in flutter?
body: <p>What I want to do is make a TextField stay in the same position by scrolling down the screen. I want to know if there is a way to do this?</p>
  
  <p>This is the TextField that I want to be floating:</p>
  
  <p><a href="https://i.stack.imgur.com/WdYgn.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/WdYgn.png" alt="enter image description here"></a></p>
  
  <p>This is the code, the <code>CardWidget</code> are just cards and searchInput is the textField:</p>
  
  <pre><code>class RouteListPage extends StatefulWidget {
  
    @override
    _RouteListPageState createState() =&gt; _RouteListPageState();
  }
  
  class _RouteListPageState extends State&lt;RouteListPage&gt; {
  
    TextEditingController searchController = new TextEditingController();
  
    @override
    Widget build(BuildContext context) {
      final _screenSize = MediaQuery.of(context).size;
      return Scaffold(
        body: SingleChildScrollView(
          child: Column(
            children: &lt;Widget&gt;[
              searchInput(),
              CardWidget(),
              CardWidget(),
              CardWidget(),
              CardWidget(),
              SizedBox(height: 25.0)
            ],
          ),
        ),
      );
    }
  
    Widget searchInput(){
      return Container(
        margin: EdgeInsets.symmetric(horizontal: 24, vertical: 25.0),
        padding: EdgeInsets.symmetric(horizontal: 24),
        decoration: BoxDecoration(
          color: Color(0xfff6f6f6),
          borderRadius: BorderRadius.circular(30),
          boxShadow: &lt;BoxShadow&gt;[
            BoxShadow(
              color: Colors.black45,
              offset: Offset(0.0, 2.0),
              blurRadius: 10.0,
            ),
          ],
        ),
        child: Row(
          children: &lt;Widget&gt;[
            Expanded(
              child: TextField(
                controller: searchController,
                decoration: InputDecoration(
                  hintText: "Buscar rutas",
                  hintStyle: TextStyle(fontFamily: "WorkSansSemiBold", fontSize: 16.0),
                  border: InputBorder.none
                ),
              )
            ),
            InkWell(
              onTap: () {},
              child: Container(
                child: Icon(Icons.search, color: Tema.Colors.loginGradientEnd, size: 28.0)
              )
            )
          ],
        ),
      );
    }
  
  }
  </code></pre>