diff --git a/lib/ui/routes/account_settings/general_account_settings.dart b/lib/ui/routes/account_settings/general_account_settings.dart index d399e1c..313199b 100644 --- a/lib/ui/routes/account_settings/general_account_settings.dart +++ b/lib/ui/routes/account_settings/general_account_settings.dart @@ -1,3 +1,4 @@ +import 'package:comunic/helpers/database/users_database_helper.dart'; import 'package:comunic/helpers/settings_helper.dart'; import 'package:comunic/models/general_settings.dart'; import 'package:comunic/ui/widgets/async_screen_widget.dart'; @@ -36,6 +37,14 @@ class __GeneralAccountSettingsBodyState final _key = GlobalKey(); + @override + void dispose() { + // Remove current user information to force refresh of account image + UsersDatabaseHelper().delete(userID()); + + super.dispose(); + } + @override Widget build(BuildContext context) { return AsyncScreenWidget( @@ -76,6 +85,7 @@ class __GeneralAccountSettingsBodyState _settings.firstName = s; _updateSettings(); }, + checkInput: (s) => s.length >= 3, ), // Last name @@ -86,6 +96,7 @@ class __GeneralAccountSettingsBodyState _settings.lastName = s; _updateSettings(); }, + checkInput: (s) => s.length >= 3, ), ]; }