Files
noo/lib/widgets/app_tab_view_builder.dart
T
ayushyaandClaude Sonnet 5 b1400e399f
Build APK / build (push) Successful in 5m18s
Add in-app copy/move, background downloads, and a Favorites tab
- WebDAV MOVE/COPY-backed copy/move for files and folders, with a
  destination picker (independent nav state so it doesn't disturb the
  Files tab's browsing position) and a conflict-resolution sheet
  (overwrite all / keep both / decide per item).
- Downloads now use the same foreground-service + notification approach
  as uploads, surviving app closure.
- Favorites is now its own tab (account-wide, via a WebDAV SEARCH query)
  instead of a Files-tab filter toggle, which couldn't represent
  favorited items outside the currently browsed folder correctly.
- Share sheet restyled to match the app's design language, plus a
  "share file directly" action via the OS share sheet; details sheet
  tab icons resized to match the bottom nav.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-18 16:20:56 -04:00

32 lines
1.2 KiB
Dart

import 'package:flutter/material.dart';
import '../models/app_tab.dart';
import '../views/activity_view.dart';
import '../views/favorites_view.dart';
import '../views/files_view.dart';
import '../views/photos_view.dart';
import '../views/recent_view.dart';
import '../views/shares_view.dart';
import '../views/trash_view.dart';
/// Builds the view widget for a given [AppTab]. Shared by the main shell
/// (for visible tabs) and the "more tabs" dropdown (for launching a tab
/// that's currently hidden from the bottom nav bar).
Widget buildAppTabView(AppTab tab, ScrollController controller) {
switch (tab) {
case AppTab.files:
return FilesView(scrollController: controller);
case AppTab.photos:
return PhotosView(scrollController: controller);
case AppTab.favorites:
return FavoritesView(scrollController: controller);
case AppTab.activity:
return ActivityView(scrollController: controller);
case AppTab.trash:
return TrashView(scrollController: controller);
case AppTab.shares:
return SharesView(scrollController: controller);
case AppTab.recent:
return RecentView(scrollController: controller);
}
}