fix: reg, verify, loaders, grey screen when like

This commit is contained in:
mso7nueh
2025-07-30 12:34:27 +03:00
parent aacbc0ce5a
commit 09a1ec0947
13 changed files with 260 additions and 144 deletions

View File

@@ -138,7 +138,7 @@ class _ProfileScreenState extends State<ProfileScreen> {
crossAxisAlignment: CrossAxisAlignment.center,
children: [
_header(state),
if (state.profile.roles.contains('consultant'))
if (state.profile.roles.contains('consultant') && state.consultantInfo != null)
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
@@ -202,10 +202,10 @@ class _ProfileScreenState extends State<ProfileScreen> {
),
_subscriptionsAndSubscribers(state),
if (state.profile.badges.isNotEmpty) Padding(padding: const EdgeInsets.only(bottom: 16), child: _badges(state)),
if (state.profile.roles.contains('consultant')) _socialLinks(state),
if (state.profile.roles.contains('consultant')) _education(state),
if (state.profile.roles.contains('consultant')) _diplomasAndCertificates(state),
if (state.profile.roles.contains('consultant')) _activePlans(state),
if (state.profile.roles.contains('consultant') && state.consultantInfo != null) _socialLinks(state),
if (state.profile.roles.contains('consultant') && state.consultantInfo != null) _education(state),
if (state.profile.roles.contains('consultant') && state.consultantInfo != null) _diplomasAndCertificates(state),
if (state.profile.roles.contains('consultant') && state.consultantInfo != null) _activePlans(state),
_blogPosts(state),
],
),
@@ -216,7 +216,9 @@ class _ProfileScreenState extends State<ProfileScreen> {
Scaffold _myProfileScreen(ProfileStateLoaded state) {
return Scaffold(
backgroundColor: Colors.grey.shade200,
appBar: AppBar(),
appBar: AppBar(
toolbarHeight: widget.author == null ? 0 : null,
),
body: SingleChildScrollView(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
@@ -644,7 +646,7 @@ class _ProfileScreenState extends State<ProfileScreen> {
}
SingleChildRenderObjectWidget _socialLinks(ProfileStateLoaded state) {
if (!state.profile.roles.contains('consultant')) {
if (!state.profile.roles.contains('consultant') && state.consultantInfo != null) {
return const SizedBox.shrink();
}
return Padding(