defaultBuildWeekHead function

Widget defaultBuildWeekHead(
  1. BuildContext context,
  2. int week, {
  3. CalendarLocaleType localeType = CalendarLocaleType.zh,
})

默认构建星期标题

Implementation

Widget defaultBuildWeekHead(BuildContext context, int week,
    {CalendarLocaleType localeType = CalendarLocaleType.zh}) {
  switch (week) {
    case 1:
      return Text(i18nObjInLocal(localeType)['weekShort'][week],
          style: TextStyle(fontSize: 16, color: Color(0xd9000000)));
    case 2:
      return Text(i18nObjInLocal(localeType)['weekShort'][week],
          style: TextStyle(fontSize: 16, color: Color(0xd9000000)));
    case 3:
      return Text(i18nObjInLocal(localeType)['weekShort'][week],
          style: TextStyle(fontSize: 16, color: Color(0xd9000000)));
    case 4:
      return Text(i18nObjInLocal(localeType)['weekShort'][week],
          style: TextStyle(fontSize: 16, color: Color(0xd9000000)));
    case 5:
      return Text(i18nObjInLocal(localeType)['weekShort'][week],
          style: TextStyle(fontSize: 16, color: Color(0xd9000000)));
    case 6:
      return Text(i18nObjInLocal(localeType)['weekShort'][week],
          style: TextStyle(fontSize: 16, color: Color(0xffFF4081)));
    case 0:
      return Text(i18nObjInLocal(localeType)['weekShort'][week],
          style: TextStyle(fontSize: 16, color: Color(0xffFF4081)));
  }
  return Container();
}