当前位置:网站首页>Flutter tutorial flutter navigator 2.0 with gorouter, use go_ Router package learn about the declarative routing mechanism in fluent (tutorial includes source code)

Flutter tutorial flutter navigator 2.0 with gorouter, use go_ Router package learn about the declarative routing mechanism in fluent (tutorial includes source code)

2022-07-28 11:25:00 Knowledge fatness

Navigation is a core concept in application development . Navigation refers to allowing users to browse 、 Enter and exit the interaction of different contents in the application .

Catalog

  • What is? GoRouter?
  • Now? , What is? Navigator 2.0?
  • Navigator 2.0 The advantages of
  • How to implement the new Navigator technology ?
  • GoRouter introduction
  • Get dependencies
  • Repositories and screens
  • GoRouter The initial setting of
  • Error handling
  • Navigation
  • Sub route
  • Parameters and query parameters
  • Network history and neglect tracking

What is? GoRouter?

GoRouter Is based on Navigation 2.0 Of Flutter Declarative router for applications , Used to reduce complexity , No matter what platform the application is running on ( Move 、Web Or desktop ), Deal with deep and dynamic links and data-driven routing , At the same time, it still provides simple experience of using developers .

Now? , What is? Navigator 2.0?

Flutter Medium Navigator Widgets are an imperative routing mechanism (Navigator 1.0),Navigator 2.0 It is a standard reference for declarative navigation , It will not replace Navigator 1.0, Because they can be used together .Navigator 2.0 For the existing Navigator Widgets provide a new declarative API Design Pages. It also introduces a new router widget .

  • Now what are imperative and declarative ?
  • When we have a well functioning and simple routing mechanism , Why do you have to fight for Navigator 2.0 What about worry ?
    this
原网站

版权声明
本文为[Knowledge fatness]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/209/202207281047011275.html