modular icon indicating copy to clipboard operation
modular copied to clipboard

Error navegation

Open cezar-pereira opened this issue 5 years ago • 4 comments

PROBLEM: English: I'm facing a problem with modular 4. By going to A > B > C and returning to B and again going to modular C it tries to access A/C/C. This was not a problem in modular 3. Português: Estou enfrentando um problema com rotas no modular 4, onde antes no 3 não era um problema. Ao acessar a rota /listofcars/car/checklist e voltar (pop), indo para /listofcars/car e tentar novamente acessar /checklist é retornado um erro onde diz que /listofcars/checklist/checklist não existe.

LOGS:

I/flutter (10386): AppModule started! I/flutter (10386): / I/flutter (10386): -- MobileHomePageModule INITIALIZED I/flutter (10386): / I/flutter (10386): -- MobileListOfCarsModule INITIALIZED I/flutter (10386): /listofcars/ I/flutter (10386): /listofcars/car I/flutter (10386): -- MobileChecklistModule INITIALIZED I/flutter (10386): /listofcars/checklist/ I/flutter (10386): /listofcars/car ERROR

NOTE: A is a module; B is a simple page; C is a module.

ROUTES:

ListOfCars:
     ChildRoute('/', child: (_, args) => MobileListOfCarsPage()),
     ChildRoute('/car', child: (_, args) => MobileCarDataPage(car: args.data)),
     ModuleRoute('/checklist', module: MobilechecklistModule())

PUSHNAMEDs:

Modular.to.pushNamed('/listofcars/');
Modular.to.pushNamed('./car', arguments: store.lisOfCars![index]);
_Modular.to.pushNamed('checklist', arguments: car);_

Note for 'checklist', if I use '/checklist' me the error is returned:: "Route (/checklist) not found"

ERROR IMAGE: Captura de Tela 2021-09-25 às 21 53 02

cezar-pereira avatar Sep 26 '21 01:09 cezar-pereira

Do you use relative name route?

jacobaraujo7 avatar Oct 04 '21 17:10 jacobaraujo7

same problem here. Flutter_modular 3.2.2 to 3.4.1 is ok From version 4 onwards it has a problem

Dart SDK version: 2.14.4 (stable) (Wed Oct 13 11:11:32 2021 +0200) on "macos_x64" [✓] Flutter (Channel stable, 2.5.3, on macOS 11.5.2 20G95 darwin-arm, locale pt-BR) [✓] Android toolchain - develop for Android devices (Android SDK version 31.0.0) [✓] Xcode - develop for iOS and macOS [✓] Chrome - develop for the web [✓] Android Studio (version 2020.3) [✓] VS Code (version 1.63.2) [✓] Connected device (2 available)

diogoroos avatar Jan 12 '22 13:01 diogoroos

Hello @cezar-pereira , how is everything? Does the bug persist in current versions of modular?

AlvaroVasconcelos avatar Feb 03 '22 22:02 AlvaroVasconcelos

Without additional information, we are unfortunately not sure how to resolve this issue. We are therefore reluctantly going to close this bug for now. If you find this problem please file a new issue with the same description, what happens, logs and the output of 'flutter doctor -v' and package version. All system setups can be slightly different so it's always better to open new issues and reference the related ones. Thanks for your contribution.

AlvaroVasconcelos avatar Feb 14 '22 22:02 AlvaroVasconcelos