Skip to content

Commit

Permalink
fix setting go_router
Browse files Browse the repository at this point in the history
  • Loading branch information
jwson-automation committed Jul 25, 2024
1 parent 1e8838c commit 78f459e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
4 changes: 2 additions & 2 deletions lib/router/RouterProvider.dart
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,13 @@ final routerProvider = Provider<GoRouter>((ref) {
),
GoRoute(
path: '/SignUpScreen',
name : SignUpScreen.name,
name: SignUpScreen.name,
builder: (context, state) =>
ResponsiveLayoutBuilder(context, const SignUpScreen()),
),
GoRoute(
path: '/SettingsScreen',
name : SettingScreen.name,
name: SettingScreen.name,
builder: (context, state) =>
ResponsiveLayoutBuilder(context, const SettingScreen()),
)
Expand Down
6 changes: 2 additions & 4 deletions lib/screens/mypage/MyPageScreen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import 'package:firebase_auth/firebase_auth.dart';
import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';
import 'package:flutter_riverpod/flutter_riverpod.dart';
import 'package:go_router/go_router.dart';
import 'package:image_picker/image_picker.dart';

import '../../providers/camera/FirebaseStoreServiceProvider.dart';
Expand Down Expand Up @@ -135,9 +136,7 @@ class MyPageScreen extends ConsumerWidget {
const CustomDividerWidget(),
GestureDetector(
onTap: () {
Navigator.push(context, MaterialPageRoute(builder: (context) {
return const SettingScreen();
}));
context.goNamed(SettingScreen.name);
},
child: const ListTile(
leading: Icon(Icons.notifications),
Expand Down Expand Up @@ -324,4 +323,3 @@ Widget _uploadProfileImageButtons(FirestoreService firestoreService,
icon: const Icon(Icons.settings),
);
}

0 comments on commit 78f459e

Please sign in to comment.