menuItem method
Implementation
Widget menuItem(T key, E value) {
if (widget.blockKeyList.contains(key)) {
return GestureDetector(
onTap: () {},
child: Container(
color: MyColors.xFFFFFFFF,
width: double.infinity,
height: 40,
padding: const EdgeInsets.symmetric(horizontal: 16),
alignment: Alignment.centerLeft,
child: ClueText(
value.toString(),
style: MyTextStyle.size14.w500.xFFA3A3A3,
),
),
);
} else {
return InkWell(
onTap: () {
setState(() {
selectedData = key;
});
_tooltipController.hide();
widget.onChanged(key);
},
child: Ink(
color: MyColors.xFFFFFFFF,
child: Container(
width: double.infinity,
height: 40,
padding: const EdgeInsets.symmetric(horizontal: 16),
alignment: Alignment.centerLeft,
child: ClueText(
value.toString(),
style: key == selectedData ? MyTextStyle.size14.w500.xFF8299FF : MyTextStyle.size14.w500.xFF000000,
),
),
),
);
}
}