mirror of
https://github.com/block/buzz.git
synced 2026-10-28 13:01:10 +00:00
## Summary Preview buzz-app's Tabler icon style in the mobile app, replacing app-drawn Lucide glyphs across channels, messages, activity, search, and settings. A shared `BuzzIcons` mapping uses the bundled Tabler 3.46.0 outline font, matching buzz-app's version, with its MIT license and source documented. Native UIKit controls retain SF Symbols. The former 300/500 navigation glyphs use Tabler's standard outline; existing selection colors and labels remain. ### Related issue No matching Tabler mobile migration issue or PR found. Related native iOS controls: #8055. ### Testing - Pre-push mobile analysis, formatting, file-size checks, and the full mobile test suite passed. - 194 focused widget tests passed, including channels, home, search, settings, and message content. - Light and dark community-settings renders inspected. - Signed iPhone Release build succeeded; installed and launched as Buzz Tabler on a physical iPhone. - Full `just ci` attempted; stopped during Rust clippy compilation because the Mac ran low on disk space. Full repository validation is not claimed. Signed-off-by: kenny lopez <klopez4212@gmail.com>
66 lines
2.2 KiB
Dart
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:buzz/shared/theme/buzz_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();
|
|
}
|