Skip to content

Instantly share code, notes, and snippets.

@hydroweaver
Created January 6, 2020 14:34
Show Gist options
  • Save hydroweaver/572e7de6126d93b2bf55d326f2f41f9f to your computer and use it in GitHub Desktop.
Save hydroweaver/572e7de6126d93b2bf55d326f2f41f9f to your computer and use it in GitHub Desktop.
onReorder: (OldIndex, NewIndex){
setState(() {
if(OldIndex < NewIndex){
NewIndex -= 1;
}
var getReplacedWidget = items.removeAt(OldIndex);
items.insert(NewIndex, getReplacedWidget);
});
},
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment