When moving from page to page via getx and repeating the same page, on the second page it maintains the same state of the controller on the first page.
When the same page is repeated, I want to create the controller again so that it takes a new state other than the previous one.
The code:
class MovieDetails extends StatelessWidget {
const MovieDetails({Key? key}) : super(key: key);
@override
Widget build(BuildContext context) {
return Scaffold(
body: GetBuilder<MovieDetailsController>(
builder: (controller) => Widget(),
),
);
}
}
Navigator
Get.toNamed(AppRoutes.searchPage, arguments: {'media_type': mediaType});
Note: I do not want to make a page replacement