onPageCalled method

  1. @override
GetPage<T>? onPageCalled(
  1. GetPage<T>? page
)

This function will be called when this Page is called you can use it to change something about the page or give it new page {@tool snippet}

GetPage onPageCalled(GetPage page) {
  final authService = Get.find<AuthService>();
  return page.copyWith(title: 'Welcome ${authService.UserName}');
}

{@end-tool}

Implementation

@override
GetPage<T>? onPageCalled(GetPage<T>? page) => page;