page title keeps changing between current and previous page flutter web

Viewed 200

I'm having a weird issue changing page titles when using getx routing and navigation.

Screenshot of the page title issue:

enter image description here

im using this code to change page title :

void setPageTitle(String title, BuildContext context) {
      SystemChrome.setApplicationSwitcherDescription(ApplicationSwitcherDescription(
      label: title,
      primaryColor: Theme.of(context).primaryColor.value, // This line is required
    ));
}

and it only happens when im using :

Get.toNamed(pageRoute);

this issue doesn't appear when im using :

Get.OffAllNamed(pageRoute);
0 Answers
Related