title: How to Center a Positioned() horizontally in Flutter
body: <p>I am currently building a verification code screen for my app and am using a stack with some positioned() widgets, as the verification code form should also be nicely positioned, but how do I get it to be horizontally centered?</p>
  <p>My code is as follows:</p>
  <pre><code>    @override
    Widget build(BuildContext context) {
      return Scaffold(
        body: Container(
          child: Stack(
            children: [
              Image.asset(verificationImage),
              Positioned(
                left: MediaQuery.of(context).size.width * 0.075,
                top: MediaQuery.of(context).size.height * 0.32,
                width: MediaQuery.of(context).size.width * 0.6,
                child: Text(
                  'We have send you an email with a verification code at ${generatedCode[0]}${generatedCode[1]}***',
                  style: TextStyle(
                      color: Colors.white,
                      fontWeight: FontWeight.bold,
                      fontSize: MediaQuery.of(context).size.height * 0.025),
                ),
              ),
              //Later the
              // Mail Adress
              Positioned(
                child: Form(
                  key: formKey,
                  child: CodeFields(
                    length: codeLength,
                    validator: validateCode,
                    fieldWidth: MediaQuery.of(context).size.width * 0.1,
                    fieldHeight: MediaQuery.of(context).size.width * 0.14,
                    inputDecoration: InputDecoration(
                      filled: true,
                      fillColor: Colors.grey.withOpacity(0.2),
                      enabledBorder: OutlineInputBorder(
                          borderRadius: BorderRadius.circular(24.0),
                          borderSide: BorderSide(color: Colors.transparent)),
                      border: OutlineInputBorder(
                        borderRadius: BorderRadius.circular(24.0),
                      ),
                    ),
                  ),
                ),
              ),
              SizedBox(height: MediaQuery.of(context).size.height * 0.05),
              FlatButton(
                onPressed: onButtonPressed,
                child: Text('Verify code'),
              ),
            ],
          ),
        ),
      );
    }
  </code></pre>