8. Deep Links & Web URLs: Connecting the parser to the app router

When i first run the app, I saw this warning message

**some input files use or override a deprecated api. **
note: recompile with -xlint:deprecation for details.

then i run a flutter doctor and it shows this Capture

though everything was running fine no issue until i replaced the entire return statement in the main.dart as directed in the practice. then i got this error warning
Capture

i have google everything i can to fix the error but nothing seems to be helping then i decided to try the final project. when i open the final project everything seems alright, no error warning then i decided to run the final project, after it finish compilation, installation of apk into my emulator and run the app successfully but now highlight the error in the main.dart line of code and would not let me run the app again.
Capture

What could be the reason why am getting this error message?

@kingsparadise Maybe because you have a typo on your appRouter? It might be helpful to list out the error you see?

Within AppRouter the RouterDelegate needs the type AppLink as shown below:

class AppRouter extends RouterDelegate<AppLink>
    with ChangeNotifier, PopNavigatorRouterDelegateMixin {

Hi Jomoka,
This was my guess and that was the reason why I have to compile and run the final project (final) and I got the same thing meaning its not a typo it’s either a problem with the flutter version I was using or Gradle one of them is the issue

hi mate, please make following change in your app_router.dart
from
class AppRouter extends RouterDelegate
to
class AppRouter extends RouterDelegate<AppLink>

1 Like

@kingsparadise do you have the error you are seeing? If you upload on github I could help better debug the issue.

Thanks!

Many thanks for the help