title: How to horizontally center a Text in flutter?
body: <p>I’m trying to horizontally center a text. Please check the below code.</p>
  <pre><code>import 'package:flutter/material.dart';
  
  class LoginPage extends StatelessWidget {
    @override
    Widget build(BuildContext context) {
      // TODO: implement build
      return Container(
          color: Colors.black,
          child: Row(
            children: &lt;Widget&gt;[
              Column(
                children: &lt;Widget&gt;[_buildTitle()],
              ),
            ],
          ));
    }
  
    Widget _buildTitle() {
      return 
      Center(child: Container(
        margin: EdgeInsets.only(top: 100),
        child: Column(
          
          children: &lt;Widget&gt;[
            Text(
              &quot;something.xyz&quot;,
              style: TextStyle(color: Colors.white, fontWeight: FontWeight.bold, fontSize: 25,),
              textAlign: TextAlign.center,
            ),
          ],
        ),
      ),);
      
    }
  }
  </code></pre>
  <p>This did not center horizontally, instead gave the following output. The margins etc is fine.</p>
  <p><a href="https://i.stack.imgur.com/95vTlm.png" rel="noreferrer"><img src="https://i.stack.imgur.com/95vTlm.png" alt="enter image description here" /></a></p>
  <p>How can I fix this?</p>