Could not find a generator for route

Because Of instantiated two MaterialApp widgets. You need to remove the one in MyApp class and may change it to Scaffold

Example:

class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return new Scaffold(
// ...                    
                return new ListTile(
                  onTap: () {                                         
                    Navigator.pushNamed(context, "/listadecompras");
                  },
// ...
}

THE PROBLEM IS YOUR CODE IS – the route is trying to resolve for the nearest MaterialApp which has no route definition. That said you should use only one MaterialApp as the root of your widget tree.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)