diff --git a/app/lib/core/bases/widgets/layout/bottom_navbar.dart b/app/lib/core/bases/widgets/layout/bottom_navbar.dart index ee7f4f4..64c3121 100644 --- a/app/lib/core/bases/widgets/layout/bottom_navbar.dart +++ b/app/lib/core/bases/widgets/layout/bottom_navbar.dart @@ -1,6 +1,7 @@ import 'dart:ui'; import 'package:flutter/material.dart'; import 'package:font_awesome_flutter/font_awesome_flutter.dart'; +import 'package:go_router/go_router.dart'; class BottomNavBar extends StatefulWidget { const BottomNavBar({ @@ -20,10 +21,10 @@ class _BottomNavBarState extends State { void _onTap(int index, BuildContext context) { switch (index) { case 0: - Navigator.popUntil(context, ModalRoute.withName('/main')); + context.go('/main'); break; case 1: - Navigator.pushNamed(context, '/setting'); + context.go('/setting'); break; } } diff --git a/app/lib/features/main/presentation/pages/home_page.dart b/app/lib/features/main/presentation/pages/home_page.dart index 8f77f5f..cfedf01 100644 --- a/app/lib/features/main/presentation/pages/home_page.dart +++ b/app/lib/features/main/presentation/pages/home_page.dart @@ -114,7 +114,9 @@ class _HomePageState extends State { ), floatingActionButtonLocation: FloatingActionButtonLocation.centerDocked, floatingActionButton: FloatingActionButton( - onPressed: () {}, + onPressed: () { + context.go('/quiz_registration'); + }, child: const FaIcon(FontAwesomeIcons.graduationCap), ), bottomNavigationBar: const BottomNavBar(