title: How can select multiple items from flatlist with check box from react native elements library in react native?
body: <p>I am creating a flat list with checkbox and text,but i am going to selecting a single item it selects all the items from the list, and i want to select single or multiple or all items but not all like this, when i selecting single item it checks true to all items.
  Here i am fetching list from api.
  Here is my Code : </p>
  
  <pre><code>import React, { Component } from 'react'
  import { View,FlatList} from 'react-native'
  import { HeaderView } from '../components/Headers';
  import { color } from '../values/color';
  import TextViewClickable, { TextViewNonClickable } from     
      '../components/TextView';
  import { dimension } from '../values/dimensions';
  import Modal from 'react-native-modal';
  import { Header, Icon, CheckBox, Button } from 'react-native-
      elements';
  import { getSessionId, showMessage } from '../utils
      /GeneralFunctions';
  import { showMyLists } from '../networkRequest/API';
  import { onSuccess, onFailure } from '../networkRequest
      /AxiosRequest';
  
  export default class AllLists extends Component {
  
  constructor(props){
      super(props)
      this.state={
          lists : [],
          isChecked : false
      }
  }
  
  componentWillMount() {
      this.getAllList()
  }
  
  getAllList = () =&gt; {
    //  this.showRefreshLoader();
      getSessionId().then(sessionId =&gt; {
      showMyLists(sessionId).then(response =&gt; {
          onSuccess(response).then(successResponse =&gt; {
      //    this.hideRefreshLoader();
          this.setState({
              lists:successResponse,
          })
          })
      }).catch(error =&gt; {
         // this.hideRefreshLoader();
          onFailure(error).then(errorMessage =&gt; {
          showMessage(errorMessage);
          })
      })
      })
  }
  
  isIconCheckedOrNot = () =&gt; {
      if(this.state.isChecked){
          this.setState({isChecked:false})
      }else {
          this.setState({isChecked:true})
      }
  }
  
  _renderListItem = ({item}) =&gt; {
      return(
  
          &lt;View style=
       {{flex:1,flexDirection:'row',alignItems:'center',
      justifyContent:'flex-start'}}&gt;
              &lt;CheckBox
                  checked={this.state.isChecked}
                  onPress={() =&gt; this.isIconCheckedOrNot()}
              /&gt;
              &lt;TextViewNonClickable
                  textViewText={item.name}
                  textStyle=
      {{color:color.colorBlack,fontWeight:'700'}}
              /&gt;
          &lt;/View&gt;
      )
  }
  
  //render screen
  render() {
  
  const {modalVisibility,closeModal} = this.props;
  
  return (
      &lt;Modal
          animationIn='zoomInDown'
          animationOut='zoomOutDown'
          isVisible={modalVisibility}
          animationInTiming={300}s
          animationOutTiming={300}
          onBackButtonPress={closeModal}
          style={{margin:32}}
      &gt;
          &lt;View style={{alignItems:'flex-start', 
              flex:1,backgroundColor:color.colorWhite}}&gt;
              &lt;Header
                  placement='left'
                  leftComponent={
                      &lt;Icon name='cross' type='entypo' color='white' 
          iconStyle={{padding:16}} 
                          onPress={closeModal}/&gt;
                      }
                  centerComponent={{ text: 'My Lists', 
                      style: [{ color: 
      'white',fontWeight:'bold',fontSize:24 }] }} 
                  outerContainerStyles=
      {{alignSelf:'stretch',height:64,borderBottomWidth:0}}
                  backgroundColor={color.loginBgColor}
              /&gt;
              &lt;FlatList
                  data={this.state.lists}
                  renderItem={this._renderListItem}
                  keyExtractor={(item,index) =&gt; item+index}
                  style={{flex:1,width:dimension.screenWidth}}
                  showsVerticalScrollIndicator={false}
                  alwaysBounceVertical
              /&gt;
              &lt;Button
                  title={'Ok'}
                  containerStyle=
      {{position:'absolute',bottom:10,right:10}}
                  onPress={closeModal}
                  buttonStyle=
      {{paddingHorizontal:16,paddingVertical:8,
      backgroundColor:color.colorAccent}}
              /&gt;
  
          &lt;/View&gt;
      &lt;/Modal&gt;
      )
    }
  }
  </code></pre>