mirror of
https://gitlab.com/comunic/comunicmobile
synced 2024-11-22 12:59:21 +00:00
Can update user name
This commit is contained in:
parent
2109c71dd6
commit
6ba89b6bd1
@ -1,3 +1,4 @@
|
|||||||
|
import 'package:comunic/helpers/database/users_database_helper.dart';
|
||||||
import 'package:comunic/helpers/settings_helper.dart';
|
import 'package:comunic/helpers/settings_helper.dart';
|
||||||
import 'package:comunic/models/general_settings.dart';
|
import 'package:comunic/models/general_settings.dart';
|
||||||
import 'package:comunic/ui/widgets/async_screen_widget.dart';
|
import 'package:comunic/ui/widgets/async_screen_widget.dart';
|
||||||
@ -36,6 +37,14 @@ class __GeneralAccountSettingsBodyState
|
|||||||
|
|
||||||
final _key = GlobalKey<AsyncScreenWidgetState>();
|
final _key = GlobalKey<AsyncScreenWidgetState>();
|
||||||
|
|
||||||
|
@override
|
||||||
|
void dispose() {
|
||||||
|
// Remove current user information to force refresh of account image
|
||||||
|
UsersDatabaseHelper().delete(userID());
|
||||||
|
|
||||||
|
super.dispose();
|
||||||
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return AsyncScreenWidget(
|
return AsyncScreenWidget(
|
||||||
@ -76,6 +85,7 @@ class __GeneralAccountSettingsBodyState
|
|||||||
_settings.firstName = s;
|
_settings.firstName = s;
|
||||||
_updateSettings();
|
_updateSettings();
|
||||||
},
|
},
|
||||||
|
checkInput: (s) => s.length >= 3,
|
||||||
),
|
),
|
||||||
|
|
||||||
// Last name
|
// Last name
|
||||||
@ -86,6 +96,7 @@ class __GeneralAccountSettingsBodyState
|
|||||||
_settings.lastName = s;
|
_settings.lastName = s;
|
||||||
_updateSettings();
|
_updateSettings();
|
||||||
},
|
},
|
||||||
|
checkInput: (s) => s.length >= 3,
|
||||||
),
|
),
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user