Skip to content

Instantly share code, notes, and snippets.

@ashishrawat2911
Created January 27, 2020 12:59
Show Gist options
  • Select an option

  • Save ashishrawat2911/aa9914ba5557124072d1c18d94861cf7 to your computer and use it in GitHub Desktop.

Select an option

Save ashishrawat2911/aa9914ba5557124072d1c18d94861cf7 to your computer and use it in GitHub Desktop.
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