How to save bool value using shared preferences
问题 So I created a categories section in my app where you can select multiple categories by clicking on the container. The container you select changes colour. What I want to do is save the choices selected using shared preferences and display it again whenever user wants to see his selected categories. return GestureDetector( onTap: () { setState(() { if (isSelected == false) { isSelected = !isSelected; color = widget.color; print('Coming here'); } else { isSelected = false; color = Colors.white