style: apply dart format across project
This commit is contained in:
@@ -37,22 +37,24 @@ class AppNavigationObserver extends NavigatorObserver {
|
||||
if (newRoute != null) {
|
||||
_updateNavigationState(newRoute);
|
||||
}
|
||||
debugPrint('Navigation: Replace ${oldRoute?.settings.name} with ${newRoute?.settings.name}');
|
||||
debugPrint(
|
||||
'Navigation: Replace ${oldRoute?.settings.name} with ${newRoute?.settings.name}');
|
||||
}
|
||||
|
||||
void _updateNavigationState(Route<dynamic> route) {
|
||||
if (navigator?.context == null) return;
|
||||
|
||||
|
||||
final routeName = route.settings.name;
|
||||
if (routeName == null) return;
|
||||
|
||||
|
||||
// build 완료 후 업데이트하도록 변경
|
||||
WidgetsBinding.instance.addPostFrameCallback((_) {
|
||||
if (navigator?.context == null) return;
|
||||
|
||||
|
||||
try {
|
||||
final context = navigator!.context;
|
||||
final navigationProvider = Provider.of<NavigationProvider>(context, listen: false);
|
||||
final navigationProvider =
|
||||
Provider.of<NavigationProvider>(context, listen: false);
|
||||
navigationProvider.updateByRoute(routeName);
|
||||
} catch (e) {
|
||||
debugPrint('Failed to update navigation state: $e');
|
||||
@@ -62,18 +64,19 @@ class AppNavigationObserver extends NavigatorObserver {
|
||||
|
||||
void _handlePopWithProvider() {
|
||||
if (navigator?.context == null) return;
|
||||
|
||||
|
||||
// build 완료 후 업데이트하도록 변경
|
||||
WidgetsBinding.instance.addPostFrameCallback((_) {
|
||||
if (navigator?.context == null) return;
|
||||
|
||||
|
||||
try {
|
||||
final context = navigator!.context;
|
||||
final navigationProvider = Provider.of<NavigationProvider>(context, listen: false);
|
||||
final navigationProvider =
|
||||
Provider.of<NavigationProvider>(context, listen: false);
|
||||
navigationProvider.pop();
|
||||
} catch (e) {
|
||||
debugPrint('Failed to handle pop with provider: $e');
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user