textAlign in flutter code example

Example 1: rich text flutter

RichText(    text: TextSpan(        style: TextStyle(color: Colors.black, fontSize: 36),        children: [          TextSpan(text: 'Woolha ', style: TextStyle(color: Colors.blue)),          TextSpan(text: 'dot '),          TextSpan(text: 'com', style: TextStyle(decoration: TextDecoration.underline))        ],    ),    textScaleFactor: 0.5,  )

Example 2: TextInput for flutter

TextField(
  decoration: InputDecoration(
    border: InputBorder.none,
    hintText: 'Enter a search term'
  ),
);

Example 3: how to align text in center in flutter container

Container(
        child: Align(
          alignment: Alignment.center,
          child: Text(
            'Some text here',
            style: TextStyle(

            ),
          ),
        ),
      ),

Tags:

Misc Example