After the screen transition with Flutter, I want to read the data from Firestore on the transition destination screen and display it, but I can't find the event that ignites on its own right after the screen is created.I can fire it onPressed and read it from Firestore, so I would like you to tell me which event will ignite naturally.
flutter dart
Start with StatefulWiget:
class Youclass extensions StatefulWidget{
@override
State<StatefulWidget>createState()=>_Youclass();
}
class_Youclass extensions State<TvMain>{
@override
void initState() {
Future.delayed(Duration.zero).then((_)async{
// Load processing: Firestore, etc.
....
setState((){});
});
@override
Widget build (BuildContext context) {
// return Your Wiget
}
}
You can add the correspondence when you switch pages like this.
© 2024 OneMinuteCode. All rights reserved.