title: Icons as "type of category" as form input not updating the UI to show user selection
body: <p>i'm trying to add this in my form. </p>
  
  <p><a href="https://i.stack.imgur.com/3JvDD.gif" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/3JvDD.gif" alt="enter image description here"></a></p>
  
  <p>Which is adding medications, I have four types of medication: syringe, bottle, pill, or tablet. So far, I have done the row of icons wrapped with GestureDetector to see if a user picked one type, my inputVariable is being update however, the ui is not changing.. I'm unsure as to what the problem is.. Any help would be appreciated thank you! </p>
  
  <p>Here is my code: </p>
  
  <pre><code>// Code in Form
                  Padding(
                    padding: EdgeInsets.only(top: 10.0),
                    child: Row(
                      mainAxisAlignment: MainAxisAlignment.spaceEvenly,
                      children: &lt;Widget&gt;[
                        MedicineTypeColumn(
                            type: MedicineType.Bottle,
                            name: "Bottle",
                            icon: FontAwesomeIcons.prescriptionBottle,
                            isSelected: a == MedicineType.Bottle ? true : false),
                        MedicineTypeColumn(
                            type: MedicineType.Pill,
                            name: "Pill",
                            icon: FontAwesomeIcons.capsules,
                            isSelected: a == MedicineType.Pill ? true : false),
                        MedicineTypeColumn(
                            type: MedicineType.Syringe,
                            name: "Syringe",
                            icon: FontAwesomeIcons.syringe,
                            isSelected: a == MedicineType.Syringe ? true : false),
                        MedicineTypeColumn(
                            type: MedicineType.Tablet,
                            name: "Tablet",
                            icon: FontAwesomeIcons.ban,
                            isSelected: a == MedicineType.Tablet ? true : false),
                      ],
                    ),
                  ),
  
  // New Widget for MedicineTypes
  class MedicineTypeColumn extends StatefulWidget {
    final MedicineType type;
    final String name;
    final IconData icon;
    final bool isSelected;
  
    MedicineTypeColumn(
        {Key key,
        @required this.type,
        @required this.name,
        @required this.icon,
        @required this.isSelected})
        : super(key: key);
  
    @override
    _MedicineTypeColumnState createState() =&gt; _MedicineTypeColumnState();
  }
  
  class _MedicineTypeColumnState extends State&lt;MedicineTypeColumn&gt; {
    @override
    Widget build(BuildContext context) {
      List&lt;Medicine&gt; medTemp = Medicine.medList;
  
      return GestureDetector(
        onTap: () {
          setState(() {
            medTemp[0].medicineType = widget.type.toString();
  
            print(medTemp[0].medicineType);
            print(medTemp[0].medicineType.runtimeType);
          });
        },
        child: Column(
          children: &lt;Widget&gt;[
            Container(
              width: 85,
              decoration: BoxDecoration(
                borderRadius: BorderRadius.circular(10),
                color: widget.isSelected ? Colors.green : Colors.white,
              ),
              child: Center(
                child: Padding(
                  padding: EdgeInsets.only(top: 14.0),
                  child: Icon(
                    widget.icon,
                    size: 45,
                    color: widget.isSelected ? Colors.white : Color(0xFF3EB16F),
                  ),
                ),
              ),
            ),
            Padding(
              padding: EdgeInsets.only(top: 8.0),
              child: Container(
                width: 80,
                height: 30,
                decoration: BoxDecoration(
                  color:
                      widget.isSelected ? Color(0xFF3EB16F) : Colors.transparent,
                  borderRadius: BorderRadius.circular(12),
                ),
                child: Center(
                  child: Text(
                    widget.name,
                    style: TextStyle(
                      fontSize: 16,
                      color: widget.isSelected ? Colors.white : Color(0xFF3EB16F),
                      fontWeight: FontWeight.w500,
                    ),
                  ),
                ),
              ),
            )
          ],
        ),
      );
    }
  }
  </code></pre>
  
  <p>Logs to show that the inputVariable is being updated.</p>
  
  <pre><code>I/flutter ( 4614): MedicineType.Pill
  I/flutter ( 4614): String
  </code></pre>