mirror of
https://github.com/block/buzz.git
synced 2026-10-27 04:30:52 +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>
83 lines
2.3 KiB
Dart
83 lines
2.3 KiB
Dart
import 'package:flutter/material.dart';
|
|
import 'package:hooks_riverpod/hooks_riverpod.dart';
|
|
import 'package:buzz/shared/theme/buzz_icons.dart';
|
|
|
|
import '../../shared/theme/theme.dart';
|
|
import '../../shared/widgets/frosted_app_bar.dart';
|
|
import '../../shared/widgets/frosted_scaffold.dart';
|
|
|
|
/// Accent colors as a list of rows, matching the theme picker's shape. The
|
|
/// swatches used to live inline on the settings page as a wrap of tappable
|
|
/// circles; a row per color keeps the settings page to plain rows and gives each
|
|
/// accent a readable name.
|
|
class AccentPickerPage extends ConsumerWidget {
|
|
const AccentPickerPage({super.key});
|
|
|
|
@override
|
|
Widget build(BuildContext context, WidgetRef ref) {
|
|
final selected =
|
|
accentIndexForWireValue(ref.watch(communityThemeProvider).accent) ??
|
|
defaultAccentIndex;
|
|
final colorScheme = context.colors;
|
|
|
|
return FrostedScaffold(
|
|
useUtilitySurfaceTheme: true,
|
|
appBar: const FrostedAppBar(
|
|
centerTitle: true,
|
|
nativeLargeTitle: true,
|
|
title: Text('Accent Color'),
|
|
),
|
|
body: ListView(
|
|
padding: EdgeInsets.only(
|
|
top: frostedAppBarHeight(context, nativeLargeTitle: true),
|
|
bottom: Grid.xs,
|
|
),
|
|
children: [
|
|
for (var i = 0; i < accentColors.length; i++)
|
|
_AccentRow(
|
|
color: accentColorForScheme(colorScheme, i),
|
|
label: accentColors[i].name,
|
|
selected: selected == i,
|
|
onTap: () =>
|
|
ref.read(communityThemeProvider.notifier).setAccent(i),
|
|
),
|
|
],
|
|
),
|
|
);
|
|
}
|
|
}
|
|
|
|
class _AccentRow extends StatelessWidget {
|
|
const _AccentRow({
|
|
required this.color,
|
|
required this.label,
|
|
required this.selected,
|
|
required this.onTap,
|
|
});
|
|
|
|
final Color color;
|
|
final String label;
|
|
final bool selected;
|
|
final VoidCallback onTap;
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return ListTile(
|
|
leading: Container(
|
|
width: 28,
|
|
height: 28,
|
|
decoration: BoxDecoration(
|
|
color: color,
|
|
shape: BoxShape.circle,
|
|
border: Border.all(color: context.colors.outlineVariant),
|
|
),
|
|
),
|
|
title: Text(label),
|
|
trailing: selected
|
|
? Icon(BuzzIcons.check, size: 18, color: context.colors.primary)
|
|
: null,
|
|
onTap: onTap,
|
|
);
|
|
}
|
|
}
|