Closed bimsina closed 2 years ago
Let me know if I am missing something, but when I try to move between two different types of widgets, the widgets to be rendered is swapped in the next transition.
So basically the top widget has text and the bottom doesn't.
The issue is TopWidget is rendered in the bottom column in the next transition if the item was previously a part of the top row.
Here is the code if you want to test it out yourself.
how's u fixed that?
Let me know if I am missing something, but when I try to move between two different types of widgets, the widgets to be rendered is swapped in the next transition.
Top Widget
``` Container( key: ValueKey(tile), child: LocalHero( tag: tile.text, child: GestureDetector( onTap: () { setState(() { colTiles.add(tile); rowTiles.remove(tile); }); }, child: Container( color: tile.color, height: 60, width: 60, child: Padding( padding: const EdgeInsets.all(16), child: CircleAvatar( backgroundColor: Colors.white70, foregroundColor: Colors.black54, child: Text(tile.text), ), ), ), ), ), ) ```Bottom Widget
``` Container( key: ValueKey(tile), child: LocalHero( tag: tile.text, child: GestureDetector( onTap: () { setState(() { rowTiles.add(tile); colTiles.remove(tile); }); }, child: Container( width: 80, height: 80, color: tile.color, ), ), ), ) ```So basically the top widget has text and the bottom doesn't.
The issue is TopWidget is rendered in the bottom column in the next transition if the item was previously a part of the top row.
Here is the code if you want to test it out yourself.