title: How to create a wrap with ChoiceChip with custom labels in Flutter
body: <p>I'm learning <strong>flutter</strong> but there are some things that I cannot find anywhere. </p>
  
  <p>For example, I want to make a <strong>group of ChoiceChips</strong>, similar to the picture</p>
  
  <p><a href="https://i.stack.imgur.com/hNy2B.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/hNy2B.png" alt="enter image description here"></a></p>
  
  <p>but I don't know how to put <strong>custom labels</strong> in this kind of chips.</p>
  
  <p>How can I make it possible?</p>
  
  <pre><code> import 'package:flutter/material.dart';
  
   class MyThreeOptions extends StatefulWidget {
    @override
     _MyThreeOptionsState createState() =&gt; _MyThreeOptionsState();
  }
  
    class _MyThreeOptionsState extends State&lt;MyThreeOptions&gt; {
    int _value = 0;
  
    // ----What I want to appear----//
    /*void v (int index){
     switch (index){
     case 0: Text('Phones');
     break;
  
     case 1: Text('Computers');
     break;
  
     case 2: Text('Accessories');
     break;
     }}*/
  
    @override
    Widget build(BuildContext context) {
    return Wrap(
    alignment: WrapAlignment.center,
    spacing: 12.0,
    children: List&lt;Widget&gt;.generate(
    3,
        (int index) {
        return ChoiceChip(
         pressElevation: 0.0,
         selectedColor: Colors.blue,
         backgroundColor: Colors.grey[100],
         label: Text("item $index"),
         selected: _value == index,
         onSelected: (bool selected) {
          setState(() {
            _value = selected ? index : null;
          });
        },
      );
    },
   ).toList(),
   );}
  }
  </code></pre>