💄 Use bottom modal sheet instead of popover

 Show strike on user profile page
This commit is contained in:
2025-04-02 00:51:46 +08:00
parent cf34a285b4
commit d5cf2478d8
5 changed files with 234 additions and 203 deletions

View File

@ -15,6 +15,7 @@ import 'package:surface/providers/experience.dart';
import 'package:surface/providers/relationship.dart';
import 'package:surface/providers/sn_network.dart';
import 'package:surface/screens/abuse_report.dart';
import 'package:surface/screens/account/punishments.dart';
import 'package:surface/types/account.dart';
import 'package:surface/types/check_in.dart';
import 'package:surface/types/post.dart';
@ -457,7 +458,7 @@ class _UserScreenState extends State<UserScreen>
],
).padding(right: 8),
if (_account!.profile!.description.isNotEmpty)
const Gap(12)
const Gap(4)
else
const Gap(8),
if (_account!.profile!.description.isNotEmpty)
@ -503,14 +504,15 @@ class _UserScreenState extends State<UserScreen>
],
).padding(vertical: 8, horizontal: 12),
),
const Gap(8),
Wrap(
spacing: 4,
runSpacing: 4,
children: _account!.badges
.map((ele) => AccountBadge(badge: ele))
.toList(),
).padding(horizontal: 8),
if (_account!.badges.isNotEmpty) const Gap(8),
if (_account!.badges.isNotEmpty)
Wrap(
spacing: 4,
runSpacing: 4,
children: _account!.badges
.map((ele) => AccountBadge(badge: ele))
.toList(),
).padding(horizontal: 8),
const Gap(8),
Column(
children: [
@ -619,6 +621,17 @@ class _UserScreenState extends State<UserScreen>
],
).padding(all: 16),
),
if (_account?.punishments.isNotEmpty ?? false)
SliverToBoxAdapter(child: const Divider()),
if (_account?.punishments.isNotEmpty ?? false)
SliverToBoxAdapter(
child: Column(
children: [
for (final ele in _account!.punishments)
PunishmentInfoCard(ele: ele),
],
),
),
if (_account?.profile?.links.isNotEmpty ?? false)
SliverToBoxAdapter(child: const Divider()),
if (_account?.profile?.links.isNotEmpty ?? false)