Initial changes to routing system
This commit is contained in:
parent
91c8cb9760
commit
74b536b366
@ -77,7 +77,7 @@ class AppLogic {
|
||||
|
||||
// Load initial view (replace empty initial view which is covered by a native splash screen)
|
||||
bool showIntro = settingsLogic.hasCompletedOnboarding.value == false;
|
||||
if (showIntro) {
|
||||
if (showIntro || true) {
|
||||
appRouter.go(ScreenPaths.intro);
|
||||
} else {
|
||||
appRouter.go(ScreenPaths.home);
|
||||
|
@ -38,7 +38,15 @@ final appRouter = GoRouter(
|
||||
},
|
||||
routes: [
|
||||
AppRoute(ScreenPaths.splash, (_) => Container(color: $styles.colors.greyStrong)), // This will be hidden
|
||||
AppRoute(ScreenPaths.home, (_) => HomeScreen()),
|
||||
AppRoute(ScreenPaths.home, (_) => HomeScreen(), routes: [
|
||||
AppRoute('wonder/:type', (s) {
|
||||
int tab = int.tryParse(s.queryParams['t'] ?? '') ?? 0;
|
||||
return WonderDetailsScreen(
|
||||
type: _parseWonderType(s.params['type']),
|
||||
initialTabIndex: tab,
|
||||
);
|
||||
}, useFade: true),
|
||||
]),
|
||||
AppRoute(ScreenPaths.intro, (_) => IntroScreen()),
|
||||
AppRoute('/wonder/:type', (s) {
|
||||
int tab = int.tryParse(s.queryParams['t'] ?? '') ?? 0;
|
||||
|
@ -104,7 +104,7 @@ class _HomeScreenState extends State<HomeScreen> with SingleTickerProviderStateM
|
||||
|
||||
void _showDetailsPage() async {
|
||||
_swipeOverride = _swipeController.swipeAmt.value;
|
||||
context.push(ScreenPaths.wonderDetails(currentWonder.type));
|
||||
context.go('${ScreenPaths.home}${ScreenPaths.wonderDetails(currentWonder.type)}');
|
||||
await Future.delayed(100.ms);
|
||||
_swipeOverride = null;
|
||||
_fadeInOnNextBuild = true;
|
||||
|
Loading…
x
Reference in New Issue
Block a user