textAlign property

TextAlign textAlign
final

How the text should be aligned horizontally in SfCalendar header view.

Defaults to TextAlign.start.

See also:

Widget build(BuildContext context) {
 return Container(
 child: SfCalendar(
     view: CalendarView.week,
     headerStyle: CalendarHeaderStyle(
         textStyle: TextStyle(color: Colors.red, fontSize: 20),
         textAlign: TextAlign.center,
         backgroundColor: Colors.blue),
   ),
 );
}

Implementation

final TextAlign textAlign;