I have two screens in my app 1. homepage 2. loginpage and I want to navigate from login page to homepage on a button click through routes.
the routes are define in separate file utils(folder)=>Routes.dart….but it gives the following error when I run the app..
lib/main.dart:21:9: Error: The getter ‘MyRoutes’ isn’t defined for the class ‘MyApp’.
- ‘MyApp’ is from ‘package:flutter_first_vs/main.dart’ (‘lib/main.dart’).
Try correcting the name to the name of an existing getter, or defining a getter or field named ‘MyRoutes’.
MyRoutes.homeRoute: (context) => HomePage(),
the required images are attached
the code is correct and not giving any error in IDE but when I run the app it gives the error
image is attached