Publisher profile basis

This commit is contained in:
2025-05-14 00:49:54 +08:00
parent 610b924daf
commit 70f58259de
8 changed files with 632 additions and 158 deletions

View File

@ -31,7 +31,7 @@ class AccountProfileScreen extends HookConsumerWidget {
@override
Widget build(BuildContext context, WidgetRef ref) {
final accountAsync = ref.watch(accountProvider(name));
final account = ref.watch(accountProvider(name));
final iconShadow = Shadow(
color: Colors.black54,
@ -39,7 +39,7 @@ class AccountProfileScreen extends HookConsumerWidget {
offset: Offset(1.0, 1.0),
);
return accountAsync.when(
return account.when(
data:
(data) => AppScaffold(
body: CustomScrollView(
@ -110,17 +110,16 @@ class AccountProfileScreen extends HookConsumerWidget {
SliverToBoxAdapter(
child: const Divider(height: 1).padding(bottom: 24),
),
SliverToBoxAdapter(
child: Column(
crossAxisAlignment: CrossAxisAlignment.stretch,
children: [
Text('bio').tr().bold(),
if (data.profile.bio != null &&
data.profile.bio!.isNotEmpty)
if (data.profile.bio != null && data.profile.bio!.isNotEmpty)
SliverToBoxAdapter(
child: Column(
crossAxisAlignment: CrossAxisAlignment.stretch,
children: [
Text('bio').tr().bold(),
Text(data.profile.bio!),
],
).padding(horizontal: 24),
),
],
).padding(horizontal: 24),
),
],
),
),