How to use deferredLoading for speeding up web #1694
-
Hi, I am trying to use deferred loading to speed up my webapp which takes ages to load due to lots of pages. When I add
I don't know what to do from here. I guess I need to rewrite imports like Could anyone help please? Honestly there is not much on the Internet or in the docs about this particular topic. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
@olegyablokov Just remove the part directive from your router file and re run the generator, you might need to fix some imports after |
Beta Was this translation helpful? Give feedback.
Oh I see! After removing the part directive I need to import the generated file like a normal file:
import 'package:myapp/internal/app_router.gr.dart';
. Also I was importing all my pages in theapp_router.dart
which is unnecessary.Maybe it's just me but I think it would be a good idea to add this info to README.
Thank you very much!