firstDayOfWeekIndex property

int firstDayOfWeekIndex
override

Index of the first day of week, where 0 points to Sunday, and 6 points to Saturday.

This getter is compatible with narrowWeekdays. For example:

var localizations = MaterialLocalizations.of(context);
// The name of the first day of week for the current locale.
var firstDayOfWeek = localizations.narrowWeekdays[localizations.firstDayOfWeekIndex];

Implementation

@override
int get firstDayOfWeekIndex => (_longDateFormat.dateSymbols.FIRSTDAYOFWEEK + 1) % 7;