by @kodeazy
flutter how to align text at the center both horizontally and vertically?
In this blog we will discuss on how to align text at the center both horizontally and vertically
In flutter we have a widget Center
which helps us to align the text both horizontally and vertically.
Below is the syntax
child: Text("Text Position Example")
Below is the example program to aligin text at the center
import 'package:flutter/material.dart';
void main() {
runApp(MaterialApp(home: Center(child: Text("Text Position Example"),)));
}