title: set value for switch widget inside the data table`s row in flutter
body: <p>I`m going to  put switch widget inside the data tables row, but there is  a problem, that I don't know where should I set the value for the switch widget since I am not familiar with flutter syntax </p>
  
  <pre><code>class DevicePage extends StatefulWidget {
    @override
    DevicePageState createState() {
      return new DevicePageState();
    }
  }
    class DevicePageState extends State&lt;DevicePage&gt;{
      Widget bodyData()=&gt;DataTable(
          columns:&lt;DataColumn&gt;[
            DataColumn(
              label: Text('وضعیت',style: TextStyle(color: Colors.deepPurple,fontWeight: FontWeight.bold,fontSize: 13.0),),
              numeric: false,
              onSort: (i,b){},
              tooltip: "to display first name of th e name"
            ),
            DataColumn(
                label: Text('عملکرد',style: TextStyle(color: Colors.deepPurple,fontWeight: FontWeight.bold,fontSize: 13.0),),
                numeric: false,
                onSort: (i,b){},
                tooltip: "to display Last name of th e name"
            ),
          ],
  
        rows: names.map((name)=&gt;DataRow(
          cells: [
            DataCell(
  
            Switch( value: _value, onChanged: (bool value){_onChaned(value);}),
              ),
  
            DataCell(
              new Text(name.lastName,style: TextStyle(color: Colors.blueAccent,fontWeight: FontWeight.bold,fontSize: 12.0),),
              showEditIcon: false,
              placeholder: false,
            ),
  
          ],
        ),
        ).toList()
      ) ;
  
      bool _value = false;
      int index;
      void _onChaned(bool value ){
        setState(() {
           _value=value;
        });
      }
  </code></pre>
  
  <p>and tnx for your help ;)</p>