forked from eatvio/eatvio_app
fix: email verify + consultant registration
This commit is contained in:
@@ -33,6 +33,7 @@ class ProfileCubit extends Cubit<ProfileState> {
|
||||
);
|
||||
} catch (e) {
|
||||
emit(ProfileState.error(errorMessage: e.toString()));
|
||||
rethrow;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -93,12 +93,15 @@ class _ProfileScreenState extends State<ProfileScreen> {
|
||||
}
|
||||
return widget.author == null || widget.author!.authorIsMe ? _myProfileScreen(state) : _profileScreen(state);
|
||||
} else if (state is ProfileStateError) {
|
||||
return DataErrorWidget(
|
||||
onReload: () async {
|
||||
widget.author == null || widget.author!.authorIsMe
|
||||
? await profileCubit.getMyProfile()
|
||||
: await profileCubit.getProfileBySlug(widget.author!.authorSlug);
|
||||
},
|
||||
return Scaffold(
|
||||
appBar: AppBar(),
|
||||
body: DataErrorWidget(
|
||||
onReload: () async {
|
||||
widget.author == null || widget.author!.authorIsMe
|
||||
? await profileCubit.getMyProfile()
|
||||
: await profileCubit.getProfileBySlug(widget.author!.authorSlug);
|
||||
},
|
||||
),
|
||||
);
|
||||
} else {
|
||||
return Scaffold(
|
||||
@@ -437,12 +440,12 @@ class _ProfileScreenState extends State<ProfileScreen> {
|
||||
padding: const EdgeInsets.only(bottom: 16),
|
||||
child: Column(
|
||||
children: [
|
||||
Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 16),
|
||||
const Padding(
|
||||
padding: EdgeInsets.symmetric(horizontal: 16),
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
const Text(
|
||||
Text(
|
||||
'Дипломы\nи сертификаты',
|
||||
style: TextStyle(
|
||||
color: Color(0xFF323F4B),
|
||||
@@ -451,19 +454,19 @@ class _ProfileScreenState extends State<ProfileScreen> {
|
||||
fontWeight: FontWeight.w600,
|
||||
),
|
||||
),
|
||||
GestureDetector(
|
||||
onTap: () {
|
||||
GoRouter.of(context).pushNamed('stepperBecomeConsultantScreen', extra: state.profile.slug);
|
||||
},
|
||||
child: Text(
|
||||
widget.author == null || widget.author!.authorIsMe ? 'Редактировать' : '',
|
||||
style: const TextStyle(
|
||||
color: Color(0xFF2F80ED),
|
||||
fontSize: 16,
|
||||
fontWeight: FontWeight.w500,
|
||||
),
|
||||
),
|
||||
),
|
||||
// GestureDetector(
|
||||
// onTap: () {
|
||||
// GoRouter.of(context).pushNamed('stepperBecomeConsultantScreen', extra: state.profile.slug);
|
||||
// },
|
||||
// child: Text(
|
||||
// widget.author == null || widget.author!.authorIsMe ? 'Редактировать' : '',
|
||||
// style: const TextStyle(
|
||||
// color: Color(0xFF2F80ED),
|
||||
// fontSize: 16,
|
||||
// fontWeight: FontWeight.w500,
|
||||
// ),
|
||||
// ),
|
||||
// ),
|
||||
],
|
||||
),
|
||||
),
|
||||
@@ -538,12 +541,12 @@ class _ProfileScreenState extends State<ProfileScreen> {
|
||||
padding: const EdgeInsets.only(bottom: 16),
|
||||
child: Column(
|
||||
children: [
|
||||
Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 16),
|
||||
const Padding(
|
||||
padding: EdgeInsets.symmetric(horizontal: 16),
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
const Text(
|
||||
Text(
|
||||
'Образование',
|
||||
style: TextStyle(
|
||||
color: Color(0xFF323F4B),
|
||||
@@ -551,19 +554,19 @@ class _ProfileScreenState extends State<ProfileScreen> {
|
||||
fontWeight: FontWeight.w600,
|
||||
),
|
||||
),
|
||||
GestureDetector(
|
||||
onTap: () {
|
||||
GoRouter.of(context).pushNamed('stepperBecomeConsultantScreen', extra: state.profile.slug);
|
||||
},
|
||||
child: Text(
|
||||
widget.author == null || widget.author!.authorIsMe ? 'Редактировать' : '',
|
||||
style: const TextStyle(
|
||||
color: Color(0xFF2F80ED),
|
||||
fontSize: 16,
|
||||
fontWeight: FontWeight.w500,
|
||||
),
|
||||
),
|
||||
),
|
||||
// GestureDetector(
|
||||
// onTap: () {
|
||||
// GoRouter.of(context).pushNamed('stepperBecomeConsultantScreen', extra: state.profile.slug);
|
||||
// },
|
||||
// child: Text(
|
||||
// widget.author == null || widget.author!.authorIsMe ? 'Редактировать' : '',
|
||||
// style: const TextStyle(
|
||||
// color: Color(0xFF2F80ED),
|
||||
// fontSize: 16,
|
||||
// fontWeight: FontWeight.w500,
|
||||
// ),
|
||||
// ),
|
||||
// ),
|
||||
],
|
||||
),
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user