fix: layout

This commit is contained in:
guozhigq
2024-10-23 23:00:59 +08:00
parent 99a5891d52
commit c6fcbb8566

View File

@ -75,60 +75,58 @@ class _MinePageState extends State<MinePage>
parent: BouncingScrollPhysics()), parent: BouncingScrollPhysics()),
child: Padding( child: Padding(
padding: const EdgeInsets.only(bottom: 110), padding: const EdgeInsets.only(bottom: 110),
child: Expanded( child: Column(
child: Column( children: [
children: [ Obx(() => _buildProfileSection(context, ctr.userInfo.value)),
Obx(() => _buildProfileSection(context, ctr.userInfo.value)), const SizedBox(height: 10),
const SizedBox(height: 10), FutureBuilder(
FutureBuilder( future: _futureBuilderFuture,
future: _futureBuilderFuture, builder: (context, snapshot) {
builder: (context, snapshot) { if (snapshot.connectionState == ConnectionState.done) {
if (snapshot.connectionState == ConnectionState.done) { if (snapshot.data == null) {
if (snapshot.data == null) { return const SizedBox();
return const SizedBox(); }
} if (snapshot.data['status']) {
if (snapshot.data['status']) { return Obx(
return Obx( () => _buildStatsSection(
() => _buildStatsSection(
context,
ctr.userStat.value,
),
);
} else {
return _buildStatsSection(
context, context,
ctr.userStat.value, ctr.userStat.value,
); ),
} );
} else { } else {
return _buildStatsSection( return _buildStatsSection(
context, context,
ctr.userStat.value, ctr.userStat.value,
); );
} }
}, } else {
), return _buildStatsSection(
_buildMenuSection(context), context,
Obx( ctr.userStat.value,
() => Visibility( );
visible: ctr.userLogin.value, }
child: Divider( },
height: 25, ),
color: Theme.of(context).dividerColor.withOpacity(0.1), _buildMenuSection(context),
), Obx(
() => Visibility(
visible: ctr.userLogin.value,
child: Divider(
height: 25,
color: Theme.of(context).dividerColor.withOpacity(0.1),
), ),
), ),
Obx( ),
() => ctr.userLogin.value Obx(
? _buildFavoritesSection(context) () => ctr.userLogin.value
: const SizedBox(), ? _buildFavoritesSection(context)
), : const SizedBox(),
SizedBox( ),
height: MediaQuery.of(context).padding.bottom + SizedBox(
kBottomNavigationBarHeight, height: MediaQuery.of(context).padding.bottom +
) kBottomNavigationBarHeight,
], )
), ],
), ),
), ),
), ),