Refactor: Change profile tab cancel actions to reset form state instead of navigating, and adjust agent availability UI.
This commit is contained in:
@@ -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/auth/presentation/providers/auth_provider.dart';
|
||||
import 'package:real_estate_mobile/features/profile/presentation/providers/profile_provider.dart';
|
||||
@@ -150,7 +149,10 @@ class _PrivacyTabState extends ConsumerState<PrivacyTab> {
|
||||
const SizedBox(height: 20),
|
||||
ProfileActionButtons(
|
||||
onSave: _savePrivacyPreferences,
|
||||
onCancel: () => context.go('/home'),
|
||||
onCancel: () {
|
||||
_privacyLoaded = false;
|
||||
_loadPrivacyPreferences();
|
||||
},
|
||||
isSaving: _isSavingPrivacy),
|
||||
const SizedBox(height: 24),
|
||||
ProfileSectionCard(
|
||||
|
||||
Reference in New Issue
Block a user