mirror of
https://github.com/SyncrowIOT/syncrow-app.git
synced 2025-08-25 20:19:39 +00:00
profile page fix bugs
This commit is contained in:
@ -157,6 +157,7 @@ class ProfileBloc extends Bloc<ProfileEvent, ProfileState> {
|
||||
void _fetchRegion(RegionInitialEvent event, Emitter<ProfileState> emit) async {
|
||||
try {
|
||||
emit(LoadingInitialState());
|
||||
|
||||
regionList = await ProfileApi.fetchRegion();
|
||||
emit(RegionsLoadedState(regions: regionList!));
|
||||
} catch (e) {
|
||||
@ -249,7 +250,7 @@ class ProfileBloc extends Bloc<ProfileEvent, ProfileState> {
|
||||
}
|
||||
final parts = withoutExtraSpaces.split(' ');
|
||||
if (parts.length < 2) return 'Full name must contain first and last names';
|
||||
if (parts.length > 2) return 'Full name can at most contain 3 parts';
|
||||
if (parts.length > 2) return 'Full name can at most contain 2 parts';
|
||||
if (parts.any((part) => part.length < 2 || part.length > 30)) {
|
||||
return 'Full name parts must be between 2 and 30 characters long';
|
||||
}
|
||||
|
Reference in New Issue
Block a user