Files
buzz/mobile/lib/features/settings/theme_picker_page.dart
klopez4212 f0eb5575ff fix(mobile): polish photo carousels and video viewer controls (#8079)
## Summary
- Keep neighboring carousel photos visible, add page-change haptics, and
reuse appearance-style dots with native iOS glass and grouped actions.
- Refine full-screen video controls with fading transport, cycling
speeds, pinch-to-zoom, and double-tap reset before swipe-to-dismiss.

### Related issue
N/A. Checked recent open PRs; repository issue search was unavailable.

### Testing
- Mobile analysis/format checks, file-size guards, and full Flutter
suite passed (2,680 tests; 4 skipped).
- Built, installed, and manually verified on the connected iPhone.
- `just ci` was attempted but blocked fetching a Rust dependency because
this Mac could not connect to GitHub.

---------

Signed-off-by: kenny lopez <klopez4212@gmail.com>
Signed-off-by: klopez4212 <klopez4212@gmail.com>
2026-10-04 17:17:46 +01:00

66 lines
2.2 KiB
Dart

import 'dart:async';
import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:flutter_hooks/flutter_hooks.dart';
import 'package:hooks_riverpod/hooks_riverpod.dart';
import 'package:lucide_icons_flutter/lucide_icons.dart';
import '../../shared/community/community_icon_provider.dart';
import '../../shared/community/community_provider.dart';
import '../../shared/theme/theme.dart';
import '../../shared/widgets/avatar_image.dart';
import '../../shared/widgets/frosted_app_bar.dart';
import '../../shared/widgets/frosted_scaffold.dart';
import '../../shared/widgets/ios_glass_navigation_action.dart';
import '../../shared/widgets/ios_glass_navigation_button.dart';
import '../../shared/widgets/page_indicator.dart';
import 'theme_option_sheets.dart';
part 'theme_picker_page/theme_home_preview.dart';
part 'theme_picker_page/theme_preview_sheet.dart';
List<ThemeColors> _themeEntriesForMode(ThemeMode mode) {
final groups = themeGroups();
return switch (mode) {
ThemeMode.system => groups.paired,
ThemeMode.light => groups.light,
ThemeMode.dark => groups.dark,
};
}
String _themeLabelFor(ThemeColors theme, ThemeMode mode) =>
mode == ThemeMode.system ? pairedThemeLabel(theme.name) : theme.displayName;
ThemeColors _displayedThemeFor(
ThemeColors theme,
ThemeMode mode,
Brightness platformBrightness,
) {
if (mode != ThemeMode.system || platformBrightness == Brightness.light) {
return theme;
}
return findTheme(themePairFor(theme.name) ?? '') ?? theme;
}
bool _themeEntryIsSelected(
ThemeColors entry,
ThemeMode mode,
String selectedScheme,
) {
final active = effectiveTheme(selectedScheme, mode);
if (active == null) return false;
if (mode != ThemeMode.system) return active.name == entry.name;
return active.name == entry.name || themePairFor(entry.name) == active.name;
}
/// Direct, swipeable theme preview. Theme, accent, and appearance changes stay
/// as a draft until Set is pressed.
class ThemePickerPage extends StatelessWidget {
const ThemePickerPage({super.key});
@override
Widget build(BuildContext context) => const _ThemePreviewExperience();
}