google / flutter.widgets

https://pub.dev/packages/flutter_widgets
BSD 3-Clause "New" or "Revised" License
1.34k stars 461 forks source link

List is rebuild when we navigate to another page using pushNamed #491

Open IResetic opened 10 months ago

IResetic commented 10 months ago

Problem description

scrollable_positioned_list: ^0.3.8 The list of custom widget that is shown using theScrollablePositionedList.builder is rebuild (in the background) the instance I navigate to another page.

Steps to reproduce

  1. Create a widget that is using ScrollablePositionedList.builder to build a list of custom widgets that each of them is having a button to navigate to another page.
  2. Click button on one of the widget to navigate to another page using pushNamed from GoRoute package.
  3. Obser that widget in the list are rebuild the instance we navigate from the widget that is used to host the list.

Expected behavior

List is not rebuild.

Actual behavior

List is rebuild while we are navigating to another page.

Environment

Android

Additional details

79121262 commented 6 months ago

我也遇到这个问题