-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #21 from hoangph271/20-changing-any-state-causes-t…
…he-app-to-switch-back-to-index-page 20 changing any state causes the app to switch back to index page
- Loading branch information
Showing
8 changed files
with
78 additions
and
68 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,16 @@ | ||
import 'package:go_router/go_router.dart'; | ||
import 'package:sane_gallery/src/gifs/gifs_controller.dart'; | ||
import 'package:sane_gallery/src/gifs/gifs_view.dart'; | ||
import 'package:sane_gallery/src/magic_toolbox/magic_toolbox.dart'; | ||
import 'package:sane_gallery/src/settings/settings_controller.dart'; | ||
|
||
routerConfig( | ||
SettingsController settingsController, | ||
GifsController gifsController, | ||
) { | ||
final router = GoRouter( | ||
routes: [ | ||
GoRoute( | ||
path: GifsView.pathName, | ||
builder: (context, state) => GifsView( | ||
settingsController: settingsController, | ||
gifsController: gifsController, | ||
), | ||
), | ||
GoRoute( | ||
path: MagicToolbox.pathName, | ||
builder: (context, state) => const MagicToolbox(), | ||
), | ||
], | ||
); | ||
|
||
return router; | ||
} | ||
final saneRouter = GoRouter( | ||
routes: [ | ||
GoRoute( | ||
path: GifsView.pathName, | ||
builder: (context, state) => const GifsView(), | ||
), | ||
GoRoute( | ||
path: MagicToolbox.pathName, | ||
builder: (context, state) => const MagicToolbox(), | ||
), | ||
], | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters