Created
January 27, 2020 12:59
-
-
Save ashishrawat2911/aa9914ba5557124072d1c18d94861cf7 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| getAppBar() { | |
| return AppBar( | |
| title: Text(selectedList.length < 1 | |
| ? "Multi Selection" | |
| : "${selectedList.length} item selected"), | |
| actions: <Widget>[ | |
| selectedList.length < 1 | |
| ? Container() | |
| : InkWell( | |
| onTap: () { | |
| setState(() { | |
| for (int i = 0; i < selectedList.length; i++) { | |
| itemList.remove(selectedList[i]); | |
| } | |
| selectedList = List(); | |
| }); | |
| }, | |
| child: Padding( | |
| padding: const EdgeInsets.all(8.0), | |
| child: Icon(Icons.delete), | |
| )) | |
| ], | |
| ); | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment