firstDayOfWeekIndex property

  1. @override
int firstDayOfWeekIndex

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:

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


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