Could not find a generator for route

后端 未结 8 1383
谎友^
谎友^ 2021-01-07 17:03

I´m newbie to flutter and reveice one exception about route and paginator in Flutter.

EXCEPTION CAUGHT BY GESTURE
The following assertion was thrown while ha         


        
8条回答
  •  失恋的感觉
    2021-01-07 17:33

    You have instantiated two MaterialApp widget. You need to remove the one in MyApp class.

    For push

    Navigator.of(context).pushNamed('/screen1')
    

    For Pop: "popAndPushNamed"

    Navigator.of(context).popAndPushNamed('/screen4');
    

提交回复
热议问题