Language:

Search

Center Text in Container Flutter

  • Share this:
post-title
post-title

Solution 1:

      Container(
        child: Text(
          "Center Text",
          textAlign: TextAlign.center,
        ),
      ),

Solution 2:

Container(
        child: Align(
          alignment: Alignment.center,
          child: Text(
            'Center Text',
          ),
        ),
      ),
Ammar Javed

Ammar Javed

Still Learning | Still Searching | Still Exploring | The secret of your success is determined by your daily agenda.