Refactor: Change profile tab cancel actions to reset form state instead of navigating, and adjust agent availability UI.

This commit is contained in:
pradeepkumar
2026-03-15 22:40:24 +05:30
parent f6263b833c
commit aaed88d51d
5 changed files with 30 additions and 18 deletions

View File

@@ -1,6 +1,5 @@
import 'package:flutter/material.dart';
import 'package:flutter_riverpod/flutter_riverpod.dart';
import 'package:go_router/go_router.dart';
import 'package:real_estate_mobile/core/constants/app_colors.dart';
import 'package:real_estate_mobile/features/profile/presentation/providers/profile_provider.dart';
import 'package:real_estate_mobile/features/profile/presentation/widgets/profile_shared_widgets.dart';
@@ -144,7 +143,10 @@ class _NotificationsTabState extends ConsumerState<NotificationsTab> {
const SizedBox(height: 40),
ProfileActionButtons(
onSave: _saveNotificationSettings,
onCancel: () => context.go('/home'),
onCancel: () {
_notificationsLoaded = false;
_loadNotificationPreferences();
},
isSaving: _isSavingNotifications,
),
],