✨ Creator's post list
This commit is contained in:
@ -263,6 +263,13 @@ class CreatorHubScreen extends HookConsumerWidget {
|
||||
contentPadding: EdgeInsets.symmetric(
|
||||
horizontal: 24,
|
||||
),
|
||||
onTap: () {
|
||||
context.router.push(
|
||||
CreatorPostListRoute(
|
||||
pubName: currentPublisher.value!.name,
|
||||
),
|
||||
);
|
||||
},
|
||||
),
|
||||
Divider(height: 1).padding(vertical: 8),
|
||||
ListTile(
|
||||
|
27
lib/screens/creators/posts/list.dart
Normal file
27
lib/screens/creators/posts/list.dart
Normal file
@ -0,0 +1,27 @@
|
||||
import 'package:auto_route/auto_route.dart';
|
||||
import 'package:easy_localization/easy_localization.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:hooks_riverpod/hooks_riverpod.dart';
|
||||
import 'package:island/widgets/app_scaffold.dart';
|
||||
import 'package:island/widgets/post/post_list.dart';
|
||||
|
||||
@RoutePage()
|
||||
class CreatorPostListScreen extends HookConsumerWidget {
|
||||
final String pubName;
|
||||
const CreatorPostListScreen({
|
||||
super.key,
|
||||
@PathParam('name') required this.pubName,
|
||||
});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context, WidgetRef ref) {
|
||||
return AppScaffold(
|
||||
appBar: AppBar(title: Text('posts').tr()),
|
||||
body: CustomScrollView(
|
||||
slivers: [
|
||||
SliverPostList(pubName: pubName, itemType: PostItemType.creator),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user