Files
buzz/mobile/lib/shared/widgets/app_list_inset.dart
klopez4212 b05940850b Align mobile action sheets with chat settings (#9961)
## Summary

Match grouped mobile action rows to chat settings with aligned icons,
dividers, and consistent typography. Dim the native iOS chat header when
message or image actions open. Hide Reply and Mark unread in the
long-press menu on your own messages.

### Related work

#9939 covers conversation titles and chat typography.

### Testing

The preview was tested on iPhone Air. All pre-push checks passed,
including 6,317 mobile tests and 27 crypto tests.

---------

Signed-off-by: kenny lopez <klopez4212@gmail.com>
Signed-off-by: Tom Brow <tomb@block.xyz>
Co-authored-by: Terp <5856f6900e8e0a4e0ea1f4f8d2ee33e4753d2119bc122f94ecafc660b46c0511@buzz.block.builderlab.xyz>
Co-authored-by: Tom Brow <tomb@block.xyz>
2026-11-30 17:49:32 +00:00

56 lines
1.6 KiB
Dart

import 'package:flutter/material.dart';
import '../theme/theme.dart';
/// The horizontal padding list rows use, allowing grouped containers to replace
/// the page-level inset without changing each row.
class AppListInset extends InheritedWidget {
const AppListInset({
super.key,
required this.horizontal,
this.iconColumnWidth,
this.sheetActions = false,
required super.child,
});
final bool sheetActions;
final double horizontal;
static TextStyle? titleStyleOf(BuildContext context) =>
context
.dependOnInheritedWidgetOfExactType<AppListInset>()
?.sheetActions ==
true
? sheetActionTextStyle.copyWith(color: context.colors.onSurface)
: context.textTheme.bodyLarge;
final double? iconColumnWidth;
static double? iconWidthOf(BuildContext context) => context
.dependOnInheritedWidgetOfExactType<AppListInset>()
?.iconColumnWidth;
static double of(BuildContext context) =>
context.dependOnInheritedWidgetOfExactType<AppListInset>()?.horizontal ??
Grid.gutter;
@override
bool updateShouldNotify(AppListInset oldWidget) =>
oldWidget.sheetActions != sheetActions ||
oldWidget.horizontal != horizontal ||
oldWidget.iconColumnWidth != iconColumnWidth;
}
/// Centers an action glyph in the same column as a channel settings row.
class AppListRowIcon extends StatelessWidget {
const AppListRowIcon(this.icon, {super.key, this.color});
final IconData icon;
final Color? color;
@override
Widget build(BuildContext context) => SizedBox(
width: AppListInset.iconWidthOf(context),
child: Icon(icon, size: 22, color: color),
);
}