feat: implement FeaturedAgentItem model and update UI to sync with web CMS, and add form reset functionality to agent edit screen
This commit is contained in:
@@ -504,7 +504,23 @@ class _AgentEditProfileScreenState
|
||||
children: [
|
||||
Expanded(
|
||||
child: OutlinedButton(
|
||||
onPressed: _saving ? null : () => context.pop(),
|
||||
onPressed: _saving ? null : () {
|
||||
// Reset form to original values (reload from provider)
|
||||
setState(() {
|
||||
_formData.clear();
|
||||
_repeatableEntries.clear();
|
||||
_initialized = false;
|
||||
for (final c in _controllers) {
|
||||
c.dispose();
|
||||
}
|
||||
_controllers.clear();
|
||||
for (final c in _tagControllers.values) {
|
||||
c.dispose();
|
||||
}
|
||||
_tagControllers.clear();
|
||||
});
|
||||
// Re-initialize will happen on next build via _initializeFormData
|
||||
},
|
||||
style: OutlinedButton.styleFrom(
|
||||
side: const BorderSide(color: AppColors.primaryDark),
|
||||
shape: RoundedRectangleBorder(
|
||||
|
||||
Reference in New Issue
Block a user