title: How to not resize the background image on a Stack (Flutter)
body: <p>Alternative title: How to resize just some containers at selecting textfield?</p>
  
  <p>I have a login screen that is composed of a Stack pile in the body, it has 3 containers, one with the background image, one with a logo, and after that, the container with the two textfields of the username and the login button, i want that when the user touch the textfield of the username or the password textfield, then it rezises as it would normal, but heres the problem:</p>
  
  <p>When I tried the app, the background would resize as well, and i want it and the logo to be statick, no change of size at all for those two, so i got to test the function "resizeToAvoidBottomInset : false" to not resize it, and it worked! for all, including the textfields... so now i need a way to NOT change the size of the background and the logo, but at the same time, resize the container of the textfields so when the user tap some of them, they can be visibles above the keyboard, another way it would be to make the margin of the textfields container changes to cover all the screen regardles of the images.</p>
  
  <p>Main.dart</p>
  
  <pre><code>import 'package:flutter/material.dart';
  import 'package:apes/login/login_page.dart';
  import 'package:flutter/services.dart';
  
  void main() =&gt; runApp(MyApp());
  
  class MyApp extends StatelessWidget {
    @override
    Widget build(BuildContext context) {
      SystemChrome.setPreferredOrientations([
        DeviceOrientation.portraitUp,
        DeviceOrientation.portraitDown,
      ]);
      return new MaterialApp(
        home: Home(),
        debugShowCheckedModeBanner: false,
      );
    }
  }
  
  class Home extends StatelessWidget {
    @override
    Widget build(BuildContext context) {
      return Scaffold(
  
        body: new LoginPage(),
      );
    }
  }
  </code></pre>
  
  <p>login_page.dart</p>
  
  <pre><code>import 'package:flutter/material.dart';
  
  class LoginPage extends StatefulWidget {
    @override
    _LoginPageState createState() =&gt; _LoginPageState();
  }
  
  class _LoginPageState extends State&lt;LoginPage&gt; {
  
  TextEditingController usernameEditingController = TextEditingController();
  TextEditingController passwordEditingController = TextEditingController();
  
  String msg='';
  
    @override
  
    Widget build(BuildContext context) {
      return Stack(
        alignment: AlignmentDirectional.center,
        children: &lt;Widget&gt;[
          Container( //background_image
            decoration: BoxDecoration(
              image: DecorationImage(
                image: AssetImage('assets/background/Fondo_ancho2.jpg'),
                fit: BoxFit.cover,
              )
            ),
          ),
          Container( //logo_image
            margin: new EdgeInsets.symmetric(vertical: 50, horizontal: 50),
            width: 160,
            decoration: BoxDecoration(
              image: DecorationImage(
                image: AssetImage('assets/images/Logo1.jpg'),
                fit: BoxFit.contain,
                alignment: Alignment.topCenter
              )
            ),
          ),
          Container( //textfields_box
            width: MediaQuery.of(context).size.width,
            margin: EdgeInsets.only(top: 250),
            decoration: BoxDecoration(
              borderRadius: BorderRadius.only(topRight: Radius.circular(20), topLeft: Radius.circular(20)),
              color: Colors.white,
            ),
            child: Padding(
              padding: EdgeInsets.all(25),
              child: ListView(
                children: &lt;Widget&gt;[
                  Padding(
                    padding: EdgeInsets.fromLTRB(0, 20, 0, 20),
                    child: Container(
                      color: Color(0xfff5f5f5),
                      child: TextFormField(
                        controller: usernameEditingController,
                        style: TextStyle(
                          color: Colors.black,
                          fontFamily: 'SFUIDisplay'
                        ),
                        decoration: InputDecoration(
                          border: OutlineInputBorder(),
                          labelText: 'Usuario',
                          prefixIcon: Icon(Icons.person_outline),
                          labelStyle: TextStyle(
                            fontSize: 15
                          )
                        ),
                      ),
                    ),
                  ),
                  Container(
                    color: Color(0xfff5f5f5),
                    child: TextFormField(
                      controller: passwordEditingController,
                      obscureText: true,
                      style: TextStyle(
                        color: Colors.black,
                        fontFamily: 'SFUIDisplay'
                      ),
                      decoration: InputDecoration(
                        border: OutlineInputBorder(),
                        labelText: 'Contraseña',
                        prefixIcon: Icon(Icons.lock_outline),
                        labelStyle: TextStyle(
                            fontSize: 15
                        )
                      ),
                    ),
                  ),
                  Padding(
                    padding: EdgeInsets.only(top: 20),
                    child: MaterialButton(
                      onPressed: () async {}, //Login-Button
                      child: Text('INGRESAR',
                      style: TextStyle(
                        fontSize: 15,
                        fontFamily: 'SFUIDisplay',
                        fontWeight: FontWeight.bold,
                      ),
                      ),
                      color: Color(0xffff2d55),
                      elevation: 0,
                      minWidth: 400,
                      height: 50,
                      textColor: Colors.white,
                      shape: RoundedRectangleBorder(
                        borderRadius: BorderRadius.circular(10)
                      ),
                    ),
                  ),
                ],
              ),
            ),
          ),
        ],
      );
    }
  }
  </code></pre>
  
  <p>Images:</p>
  
  <p><a href="https://imgur.com/MMsVKoU" rel="nofollow noreferrer">Normal screen</a></p>
  
  <p><a href="https://imgur.com/NAhb8YW" rel="nofollow noreferrer">Screen with keyboard</a></p>