title: Flutter longPress event functionality for selection of row(s) and/or elements
body: <p>I need to implement a long press selection on a row element of Flutter for Android and iOS. Any help please?</p>
  
  <p>My code so far:</p>
  
  <pre><code>class ListElement extends StatelessWidget {
    ListElement({this.text, this.name, this.mId, this.animationController});
  
    final String text;
    final String name;
    final String mId;
    final AnimationController animationController; 
  
    @override
    Widget build(BuildContext context) {
      return new GestureDetector(
        onTap: () {
           Navigator.of(context).push(
                    new MaterialPageRoute(builder: (BuildContext context) =&gt; new DrugProfile(drugmId))
                  );
        }, 
        onLongPress: () {
         //HERE I NEED TO SELECT MULTIPLE ROWS IF IT FIRES
        }, 
  
        child: new SizeTransition(
          sizeFactor: new CurvedAnimation(
              parent: animationController, curve: Curves.easeOut),
          axisAlignment: 0.0,
          child: new Container(
            margin: const EdgeInsets.symmetric(vertical: 10.0),
            child: new Row(
              crossAxisAlignment: CrossAxisAlignment.start,
              children: &lt;Widget&gt;[
                new Container(
                  margin: const EdgeInsets.only(right: 16.0),
                  child: new CircleAvatar(child: new Text(name[0].toUpperCase())),
                ),
                new Expanded(
                  child: new Column(
                    crossAxisAlignment: CrossAxisAlignment.start,
                    children: &lt;Widget&gt;[
                      new Text(name, style: Theme.of(context).textTheme.subhead),
                      new Container(
                        margin: const EdgeInsets.only(top: 5.0),
                        child: new Text(
                          text,
                          textAlign: TextAlign.left,
                          style: new TextStyle(
                          fontSize: 13.0,),
                        ),
                      ),
                    ],
                  ),
                ),
              ],
            ),
          )
        )
      );
    }
  }
  </code></pre>
  
  <p>Maybe I am wrong starting from the onLongPress event, but I need to do the following: If longPress on a row element then provide the ability to select many rows. And after selection then perform custom operation on the rows (this is not part of the question :) ) After selection I imagine a array of indexes that I can pass into a function for further processes. I only need help with multiple selection of elements.</p>