♻️ Turn the file screen into a tab
This commit is contained in:
@@ -395,11 +395,6 @@ final routerProvider = Provider<GoRouter>((ref) {
|
|||||||
path: '/account/wallet',
|
path: '/account/wallet',
|
||||||
builder: (context, state) => const WalletScreen(),
|
builder: (context, state) => const WalletScreen(),
|
||||||
),
|
),
|
||||||
GoRoute(
|
|
||||||
name: 'files',
|
|
||||||
path: '/account/files',
|
|
||||||
builder: (context, state) => const FileListScreen(),
|
|
||||||
),
|
|
||||||
GoRoute(
|
GoRoute(
|
||||||
name: 'relationships',
|
name: 'relationships',
|
||||||
path: '/account/relationships',
|
path: '/account/relationships',
|
||||||
@@ -444,6 +439,14 @@ final routerProvider = Provider<GoRouter>((ref) {
|
|||||||
return AccountProfileScreen(name: name);
|
return AccountProfileScreen(name: name);
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
|
|
||||||
|
// Files tab
|
||||||
|
GoRoute(
|
||||||
|
name: 'files',
|
||||||
|
path: '/files',
|
||||||
|
builder: (context, state) => const FileListScreen(),
|
||||||
|
),
|
||||||
|
|
||||||
// Creator hub tab
|
// Creator hub tab
|
||||||
GoRoute(
|
GoRoute(
|
||||||
name: 'creatorHub',
|
name: 'creatorHub',
|
||||||
|
|||||||
@@ -375,6 +375,16 @@ class AccountScreen extends HookConsumerWidget {
|
|||||||
);
|
);
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
|
ListTile(
|
||||||
|
minTileHeight: 48,
|
||||||
|
leading: const Icon(Symbols.files),
|
||||||
|
trailing: const Icon(Symbols.chevron_right),
|
||||||
|
contentPadding: EdgeInsets.symmetric(horizontal: 24),
|
||||||
|
title: Text('files').tr(),
|
||||||
|
onTap: () {
|
||||||
|
context.goNamed('files');
|
||||||
|
},
|
||||||
|
),
|
||||||
ListTile(
|
ListTile(
|
||||||
minTileHeight: 48,
|
minTileHeight: 48,
|
||||||
leading: const Icon(Symbols.wallet),
|
leading: const Icon(Symbols.wallet),
|
||||||
@@ -385,16 +395,6 @@ class AccountScreen extends HookConsumerWidget {
|
|||||||
context.pushNamed('wallet');
|
context.pushNamed('wallet');
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
ListTile(
|
|
||||||
minTileHeight: 48,
|
|
||||||
leading: const Icon(Symbols.files),
|
|
||||||
trailing: const Icon(Symbols.chevron_right),
|
|
||||||
contentPadding: EdgeInsets.symmetric(horizontal: 24),
|
|
||||||
title: Text('files').tr(),
|
|
||||||
onTap: () {
|
|
||||||
context.pushNamed('files');
|
|
||||||
},
|
|
||||||
),
|
|
||||||
ListTile(
|
ListTile(
|
||||||
minTileHeight: 48,
|
minTileHeight: 48,
|
||||||
leading: const Icon(Symbols.people),
|
leading: const Icon(Symbols.people),
|
||||||
|
|||||||
@@ -19,7 +19,6 @@ import 'package:island/widgets/check_in.dart';
|
|||||||
import 'package:island/widgets/navigation/fab_menu.dart';
|
import 'package:island/widgets/navigation/fab_menu.dart';
|
||||||
import 'package:island/widgets/post/post_featured.dart';
|
import 'package:island/widgets/post/post_featured.dart';
|
||||||
import 'package:island/widgets/post/post_item.dart';
|
import 'package:island/widgets/post/post_item.dart';
|
||||||
import 'package:island/widgets/post/compose_card.dart';
|
|
||||||
import 'package:material_symbols_icons/symbols.dart';
|
import 'package:material_symbols_icons/symbols.dart';
|
||||||
import 'package:riverpod_annotation/riverpod_annotation.dart';
|
import 'package:riverpod_annotation/riverpod_annotation.dart';
|
||||||
import 'package:riverpod_paging_utils/riverpod_paging_utils.dart';
|
import 'package:riverpod_paging_utils/riverpod_paging_utils.dart';
|
||||||
@@ -341,7 +340,6 @@ class ExploreScreen extends HookConsumerWidget {
|
|||||||
margin: EdgeInsets.zero,
|
margin: EdgeInsets.zero,
|
||||||
),
|
),
|
||||||
PostFeaturedList(),
|
PostFeaturedList(),
|
||||||
const PostComposeCard(),
|
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|||||||
@@ -5,8 +5,10 @@ import 'package:flutter/material.dart';
|
|||||||
import 'package:flutter_hooks/flutter_hooks.dart';
|
import 'package:flutter_hooks/flutter_hooks.dart';
|
||||||
import 'package:hooks_riverpod/hooks_riverpod.dart';
|
import 'package:hooks_riverpod/hooks_riverpod.dart';
|
||||||
import 'package:go_router/go_router.dart';
|
import 'package:go_router/go_router.dart';
|
||||||
|
import 'package:island/pods/userinfo.dart';
|
||||||
import 'package:island/screens/notification.dart';
|
import 'package:island/screens/notification.dart';
|
||||||
import 'package:island/services/responsive.dart';
|
import 'package:island/services/responsive.dart';
|
||||||
|
import 'package:island/widgets/content/cloud_files.dart';
|
||||||
import 'package:island/widgets/navigation/conditional_bottom_nav.dart';
|
import 'package:island/widgets/navigation/conditional_bottom_nav.dart';
|
||||||
import 'package:island/widgets/navigation/fab_menu.dart';
|
import 'package:island/widgets/navigation/fab_menu.dart';
|
||||||
import 'package:material_symbols_icons/symbols.dart';
|
import 'package:material_symbols_icons/symbols.dart';
|
||||||
@@ -21,6 +23,7 @@ const kTabRoutes = [
|
|||||||
'/chat',
|
'/chat',
|
||||||
'/realms',
|
'/realms',
|
||||||
'/account',
|
'/account',
|
||||||
|
'/files',
|
||||||
'/creators',
|
'/creators',
|
||||||
'/developers',
|
'/developers',
|
||||||
];
|
];
|
||||||
@@ -82,15 +85,20 @@ class TabsScreen extends HookConsumerWidget {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
if (wideScreen)
|
if (wideScreen)
|
||||||
NavigationDestination(
|
...([
|
||||||
label: 'creatorHub'.tr(),
|
NavigationDestination(
|
||||||
icon: const Icon(Symbols.design_services_rounded),
|
label: 'files'.tr(),
|
||||||
),
|
icon: const Icon(Symbols.folder_rounded),
|
||||||
if (wideScreen)
|
),
|
||||||
NavigationDestination(
|
NavigationDestination(
|
||||||
label: 'developerHub'.tr(),
|
label: 'creatorHub'.tr(),
|
||||||
icon: const Icon(Symbols.data_object_rounded),
|
icon: const Icon(Symbols.design_services_rounded),
|
||||||
),
|
),
|
||||||
|
NavigationDestination(
|
||||||
|
label: 'developerHub'.tr(),
|
||||||
|
icon: const Icon(Symbols.data_object_rounded),
|
||||||
|
),
|
||||||
|
]),
|
||||||
];
|
];
|
||||||
|
|
||||||
int getCurrentIndex() {
|
int getCurrentIndex() {
|
||||||
|
|||||||
Reference in New Issue
Block a user