bottomRangeLabel method
Implementation
Widget bottomRangeLabel(
{required double width, DateTime? target, required bool isStart}) {
return InkWell(
highlightColor: Color(0XFFF4F4F4).withOpacity(1.0),
splashColor: Colors.grey.withOpacity(0.7),
onTap: () {
setState(() {
yearValue = findValue(list: widget.years, value: target!.year);
monthValue =
findValue(list: widget.monthLabelList, value: target.month);
setCalendar();
resetBetweenControllerList();
setPreSelected();
yearDropdown.currentState!.setDefaultValue(defaultValue: yearValue);
monthDropdown.currentState!.setDefaultValue(defaultValue: monthValue);
});
},
child: AnimatedSwitcher(
duration: Duration(milliseconds: 500),
transitionBuilder: (Widget child, Animation<double> animation) {
return FadeTransition(
opacity: Tween<double>(begin: 0, end: 1).animate(
CurvedAnimation(parent: animation, curve: Curves.easeInQuart)),
child: SlideTransition(
position: Tween<Offset>(begin: Offset(0, 3), end: Offset.zero)
.animate(CurvedAnimation(
parent: animation, curve: Curves.easeInOutBack)),
child: SizeTransition(
child: child,
sizeFactor: animation,
axisAlignment: -1,
),
),
);
},
child: Text(
isStart ? startDateStr : endDateStr,
key: ValueKey<String>(isStart ? startDateStr : endDateStr),
style: TextStyle(
fontSize: width * 0.033,
color: widget.isDark ? Color(0xffffffff) : Color(0XFF666666),
fontWeight: FontWeight.bold),
),
),
);
}