⏪ Remove the two column in the explore
This commit is contained in:
@@ -310,10 +310,6 @@ final routerProvider = Provider<GoRouter>((ref) {
|
||||
},
|
||||
routes: [
|
||||
// Explore tab
|
||||
ShellRoute(
|
||||
builder:
|
||||
(context, state, child) => ExploreShellScreen(child: child),
|
||||
routes: [
|
||||
GoRoute(
|
||||
name: 'explore',
|
||||
path: '/',
|
||||
@@ -345,8 +341,6 @@ final routerProvider = Provider<GoRouter>((ref) {
|
||||
path: '/discovery/realms',
|
||||
builder: (context, state) => const DiscoveryRealmsScreen(),
|
||||
),
|
||||
],
|
||||
),
|
||||
|
||||
// Chat tab
|
||||
ShellRoute(
|
||||
|
@@ -17,6 +17,7 @@ class DiscoveryRealmsScreen extends HookConsumerWidget {
|
||||
final currentQuery = useState<String?>(null);
|
||||
|
||||
return AppScaffold(
|
||||
noBackground: false,
|
||||
appBar: AppBar(title: Text('discoverRealms'.tr())),
|
||||
body: Stack(
|
||||
children: [
|
||||
|
@@ -27,42 +27,11 @@ import 'package:styled_widget/styled_widget.dart';
|
||||
|
||||
part 'explore.g.dart';
|
||||
|
||||
class ExploreShellScreen extends HookConsumerWidget {
|
||||
final Widget child;
|
||||
const ExploreShellScreen({super.key, required this.child});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context, WidgetRef ref) {
|
||||
final isWide = MediaQuery.of(context).size.width > 640;
|
||||
|
||||
if (isWide) {
|
||||
return AppBackground(
|
||||
isRoot: true,
|
||||
child: Row(
|
||||
children: [
|
||||
Flexible(flex: 2, child: ExploreScreen(isAside: true)),
|
||||
VerticalDivider(width: 1),
|
||||
Flexible(flex: 3, child: child),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
return AppBackground(isRoot: true, child: child);
|
||||
}
|
||||
}
|
||||
|
||||
class ExploreScreen extends HookConsumerWidget {
|
||||
final bool isAside;
|
||||
const ExploreScreen({super.key, this.isAside = false});
|
||||
const ExploreScreen({super.key});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context, WidgetRef ref) {
|
||||
final isWide = isWideScreen(context);
|
||||
if (isWide && !isAside) {
|
||||
return const EmptyPageHolder();
|
||||
}
|
||||
|
||||
final tabController = useTabController(initialLength: 3);
|
||||
final currentFilter = useState<String?>(null);
|
||||
|
||||
@@ -90,7 +59,7 @@ class ExploreScreen extends HookConsumerWidget {
|
||||
);
|
||||
|
||||
return AppScaffold(
|
||||
extendBody: false, // Prevent conflicts with tabs navigation
|
||||
noBackground: false,
|
||||
appBar: AppBar(
|
||||
toolbarHeight: 0,
|
||||
bottom: PreferredSize(
|
||||
|
@@ -57,6 +57,7 @@ class PostDetailScreen extends HookConsumerWidget {
|
||||
final isWide = isWideScreen(context);
|
||||
|
||||
return AppScaffold(
|
||||
noBackground: false,
|
||||
appBar: AppBar(title: const Text('Post')),
|
||||
body: postState.when(
|
||||
data: (post) {
|
||||
|
@@ -109,6 +109,7 @@ class _PostSearchScreenState extends ConsumerState<PostSearchScreen> {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return AppScaffold(
|
||||
noBackground: false,
|
||||
appBar: AppBar(
|
||||
title: TextField(
|
||||
controller: _searchController,
|
||||
|
@@ -124,6 +124,7 @@ class PublisherProfileScreen extends HookConsumerWidget {
|
||||
return publisher.when(
|
||||
data:
|
||||
(data) => AppScaffold(
|
||||
noBackground: false,
|
||||
body: CustomScrollView(
|
||||
slivers: [
|
||||
SliverAppBar(
|
||||
|
Reference in New Issue
Block a user