Alright, so I tried what you said, now I could use a Text widget as the feedback. Now I tried to do something a bit more complex, specifically, use the ListItem as the feedback item.
I tried this:
@override
Widget build(BuildContext context) {
return new Scaffold(
appBar: new AppBar(title: new Text('Shopping List')),
body: new MaterialList(
type: MaterialListType.oneLineWithAvatar,
children: config.products.map((Product product) {
var rowItem = new ShoppingListItem(
product: product,
inCart: _shoppingCart.contains(product),
onCartChanged: _handleCartChanged);
return new Draggable(
child: new Material(child: rowItem),
feedback: rowItem);
})));
}
}
But I get the error you mentioned before : I need to use a Material widget as the wrapper. I couldn't get it to work using a new Material(child: rowItem) or I even tried something a little facy, wrapping it into a new Opacity(..., content: rowItem) but that didn't work either.
I believe the error I was getting was something about the widget I was using doesn't specify a finite width constraint. I figured I could wrap the rowItem in a Dialog and it worked. However it wasn't pretty. What kind of Wrapper can I use, that would wrap the child widget and give it a width constraint?
Thanks.