yearWidgetMaker method

Widget yearWidgetMaker(
  1. dynamic year,
  2. dynamic context
)

Implementation

Widget yearWidgetMaker(year, context) {
  return InkWell(
    onTap: (() {
      Navigator.pop(context);
      onHeaderChanged.call(year);
    }),
    child: Center(
      child: Container(
        padding: EdgeInsets.all(8),
        decoration: year == selectedYear ? selectedDecoration : null,
        child: Text(
          '$year',
          style: TextStyle(
            fontSize: 16,
            color: year == selectedYear ? Colors.white : null,
            fontFamily: yearStyle?.font,
          ),
        ),
      ),
    ),
  );
}