flutter check if scrollcontroller is attached code example
Example: ScrollController not attached to any scroll views
flutter - ScrollController not attached to any scroll views
-------------------------
@override
void initState() {
super.initState();
WidgetsBinding.instance.addPostFrameCallback((_){
//code will run when widget rendering complete
});
}