Skip to content

Commit 26802eb

Browse files
committed
fix: hide the trailing dial button when a tile is expanded
The always-visible trailing dial button duplicated the inline Audio call action once the actions bar was expanded. It is a quick affordance for the collapsed row, so hide it (and the fallback menu button) while expanded - the inline bar already exposes those actions.
1 parent 2fd4324 commit 26802eb

2 files changed

Lines changed: 11 additions & 1 deletion

File tree

lib/widgets/call/call_tile.dart

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -289,7 +289,10 @@ class _CallTileState extends State<CallTile> {
289289
],
290290
),
291291
const SizedBox(width: 4),
292-
if (widget.gesturesEnabled)
292+
// The trailing dial/menu button is a quick affordance for the
293+
// collapsed row; when expanded the inline bar already covers
294+
// these actions, so it is hidden to avoid duplication.
295+
if (widget.gesturesEnabled && !widget.expanded)
293296
if (widget.onDialPressed != null)
294297
IconButton(
295298
onPressed: widget.onDialPressed,

test/widgets/call/call_tile_test.dart

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,13 @@ void main() {
120120
expect(dialed, isTrue);
121121
});
122122

123+
testWidgets('dial button is hidden when expanded', (tester) async {
124+
await tester.pumpWidget(buildTestable(buildTile(expanded: true, onDialPressed: () {})));
125+
await tester.pumpAndSettle();
126+
127+
expect(find.byIcon(Icons.call), findsNothing);
128+
});
129+
123130
testWidgets('dial button shows custom dialIcon when provided', (tester) async {
124131
var dialed = false;
125132
await tester.pumpWidget(buildTestable(buildTile(onDialPressed: () => dialed = true, dialIcon: Icons.videocam)));

0 commit comments

Comments
 (0)