title: Flutter: Intentionally hide Stack items under keyboard
body: <p>I have some widgets inside of a <code>Stack</code>.</p>
  
  <p>When the keyboard appears, the widgets in the <code>Stack</code> that were explicitly Positioned at the bottom using <code>Positioned(bottom: 0)</code> widget, get shifted to the top of keyboard. </p>
  
  <p>How can I prevent this, and make some widgets retain their position, whether or not the keyboard is in the view?</p>
  
  <p>For example, I want the "Offline Mode" label to be under the keyboard, not over it.</p>
  
  <p><a href="https://i.stack.imgur.com/iOlJm.png" rel="noreferrer"><img src="https://i.stack.imgur.com/iOlJm.png" alt="enter image description here"></a></p>
  
  <p>Here is a rough sketch of what this page's widgets look like:</p>
  
  <pre><code>Scaffold(
     body: Stack(
         children: [
             LoginImage(),
             LoginForm(),
             ConnectedToInternet(),
         ],
     ),
  )
  </code></pre>
  
  <p>Here is what the <code>ConnectedToInternet</code> widget looks like-</p>
  
  <pre><code>Positioned(
    bottom: 0,
    child: Container(
      width: MediaQuery.of(context).size.width,
      color: Colors.grey[900],
      child: Padding(
        padding: const EdgeInsets.all(4.0),
        child: Center(
          child: Text(
            "Offline mode",
            style: TextStyle(color: Colors.white, fontSize: 12),
          ),
        ),
      ),
    ),
  );
  </code></pre>