Strengthen active chat marker and fade identity tint across selection
This commit is contained in:
@@ -69,6 +69,7 @@ class AppListRow extends StatelessWidget {
|
||||
this.selectionControl,
|
||||
this.tapKey,
|
||||
this.selected = false,
|
||||
this.selectedFill,
|
||||
this.emphasized = false,
|
||||
this.divider = true,
|
||||
this.compactWidth = kAppListRowCompactWidth,
|
||||
@@ -82,6 +83,9 @@ class AppListRow extends StatelessWidget {
|
||||
/// marks the open row, so the two never read as one another.
|
||||
final Color? accent;
|
||||
|
||||
/// Optional feature-specific selection surface, retaining selection semantics.
|
||||
final Color? selectedFill;
|
||||
|
||||
/// Retain identity tint while a feature supplies its own visibility marker.
|
||||
final bool showAccentBorder;
|
||||
|
||||
@@ -179,12 +183,13 @@ class AppListRow extends StatelessWidget {
|
||||
onLongPress: onLongPress,
|
||||
selected: selected,
|
||||
tint: tint,
|
||||
selectedFill: selectedFill,
|
||||
child: content,
|
||||
)
|
||||
: Material(
|
||||
key: appListRowSurfaceKey,
|
||||
color: selected
|
||||
? selectedColor(context, cupertino: false)
|
||||
? selectedFill ?? selectedColor(context, cupertino: false)
|
||||
: tint ?? Colors.transparent,
|
||||
child: InkWell(
|
||||
key: tapKey,
|
||||
@@ -395,11 +400,13 @@ class _CupertinoRowSurface extends StatefulWidget {
|
||||
required this.selected,
|
||||
this.onLongPress,
|
||||
this.tint,
|
||||
this.selectedFill,
|
||||
required this.child,
|
||||
});
|
||||
|
||||
/// The unselected row's tint, transparent when null.
|
||||
final Color? tint;
|
||||
final Color? selectedFill;
|
||||
|
||||
final Key? tapKey;
|
||||
final VoidCallback? onTap;
|
||||
@@ -423,7 +430,8 @@ class _CupertinoRowSurfaceState extends State<_CupertinoRowSurface> {
|
||||
final color = _pressed
|
||||
? CupertinoColors.systemGrey4.resolveFrom(context)
|
||||
: widget.selected
|
||||
? AppListRow.selectedColor(context, cupertino: true)
|
||||
? widget.selectedFill ??
|
||||
AppListRow.selectedColor(context, cupertino: true)
|
||||
: widget.tint ?? const Color(0x00000000);
|
||||
final enabled = widget.onTap != null;
|
||||
return GestureDetector(
|
||||
|
||||
Reference in New Issue
Block a user