Flutter Dynamic Links not reset after calling getInitialLink()

  1. Summary of my problem
  • Details about my goal
    Need to get a parameter from Firebase Dynamic Links but value is not being reset after restarting app
  • Expected Results
    From my understanding dynamiclink value should be reset after calling getInitialLink
  • Actual Results
    The dynamic link is cached
  • Error Messages (if any)

So to keep thinks simple i have a button which calls the dynamic link. After which it sends me to new dart screen. Everytime i go back to the screen with the button or when i hot restart the app the dynamic link is called again (even tho i didnt start the app using a dynamic link) Its only cleared from memory when i kill the app and restart it.

I am using one of the newest versions firebase_dynamic_links: ^2.0.9
What am i doing wrong here?

  >                  TextButton(
> 
> 
>                         child: Text("Inschrijven", style: TextStyle(color: Colors.deepOrangeAccent),
>                             textAlign: TextAlign.right),
>                         onPressed: () async{
> 
>                       
> 
>                           final PendingDynamicLinkData? data =
>                           await FirebaseDynamicLinks.instance.getInitialLink();
>                           final Uri? deepLink = data?.link;
> 
>                           if (deepLink != null && deepLink.queryParameters != null) {
> 
>                             String? groupid =  deepLink.queryParameters["groupid"];
> 
>                             Navigator.pushAndRemoveUntil(
>                             context,
>                             MaterialPageRoute(
>                             builder: (context) => Register(groupid: groupid)
>                             ),
>                             ModalRoute.withName("/Register")
>                             );
> 
>                                                   }
>                             FirebaseDynamicLinks.instance.onLink(
>                             onSuccess: (PendingDynamicLinkData? dynamicLink) async {
>                             final Uri? deepLink = dynamicLink?.link;
> 
>                             if (deepLink != null &&
>                                 deepLink.queryParameters != null) {
>                               String? groupid = deepLink
>                                   .queryParameters["groupid"];
>                               Navigator.pushAndRemoveUntil(
>                                   context,
>                                   MaterialPageRoute(
>                                       builder: (context) =>
>                                           Register(groupid: groupid)
>                                   ),
>                                   ModalRoute.withName("/Register")
>                               );
>                             }
>                           });
> 
> 
> 
>                         },
>                       ),