textAlign property
How the text should be aligned horizontally in SfCalendar header view.
Defaults to TextAlign.start
.
See also:
- Knowledge base: How to style a header
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;