Build APK / build (push) Successful in 5m20s
Consolidates duplicated GET/PUT/notification-channel logic across DownloadService/ShareUploadService/SyncEngine into shared Kotlin helpers, gives upload/download real batch queueing instead of dropping a second concurrent batch, and dedupes repeated Dart channel-argument boilerplate. Replaces the 2300+ line ServerProvider god object with ten focused ChangeNotifiers (SessionController, SettingsController, FilesController, PhotosController, FavoritesController, TrashController, SharesController, RecentController, SyncStatusController, PickController) plus ItemOperations, a plain coordinator for cross-domain item mutations - fixing the coupling where device-sync status, per-tab data, and global UI prefs all lived in one object. Updates every view/widget call site accordingly and refreshes the architecture/server/standards/styling docs to match. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
52 lines
1.5 KiB
Dart
52 lines
1.5 KiB
Dart
import 'package:flutter/material.dart';
|
|
import 'package:material_symbols_icons/symbols.dart';
|
|
|
|
/// Every destination the bottom nav bar can show. Order here is only the
|
|
/// fallback default — actual order/visibility/default-tab are user
|
|
/// configurable and persisted in `SettingsController`.
|
|
enum AppTab { files, photos, favorites, activity, trash, shares, recent }
|
|
|
|
/// At most this many tabs may be visible in the bottom nav bar at once —
|
|
/// the rest are reachable through the "more" dropdown instead.
|
|
const int maxVisibleTabs = 5;
|
|
|
|
extension AppTabInfo on AppTab {
|
|
String get label {
|
|
switch (this) {
|
|
case AppTab.files:
|
|
return 'Files';
|
|
case AppTab.photos:
|
|
return 'Photos';
|
|
case AppTab.favorites:
|
|
return 'Favorites';
|
|
case AppTab.activity:
|
|
return 'Activity';
|
|
case AppTab.trash:
|
|
return 'Trash';
|
|
case AppTab.shares:
|
|
return 'Shares';
|
|
case AppTab.recent:
|
|
return 'Recent';
|
|
}
|
|
}
|
|
|
|
IconData get icon {
|
|
switch (this) {
|
|
case AppTab.files:
|
|
return Icons.folder_rounded;
|
|
case AppTab.photos:
|
|
return Icons.photo_library_rounded;
|
|
case AppTab.favorites:
|
|
return Icons.favorite_rounded;
|
|
case AppTab.activity:
|
|
return Icons.electric_bolt_rounded;
|
|
case AppTab.trash:
|
|
return Icons.delete_outline_rounded;
|
|
case AppTab.shares:
|
|
return Icons.groups_rounded;
|
|
case AppTab.recent:
|
|
return Symbols.search_activity_rounded;
|
|
}
|
|
}
|
|
}
|