Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR TYPESCRIPT

how to keep the state of my widgets after scrolling? flutter

You can use AutomaticKeepAliveClientMixin of yout class widget to prevent your items to be 
disposed when scrolled.

class _widgetState extends State<MyVideoPlayer> with AutomaticKeepAliveClientMixin { ...
//implement with
 @override
  bool get wantKeepAlive => true;
 
PREVIOUS NEXT
Tagged: #state #widgets #flutter
ADD COMMENT
Topic
Name
4+6 =