Skip to content

Commit

Permalink
fix: set navigation item highlight shape to rectangle
Browse files Browse the repository at this point in the history
test: edited test to pass after merge
  • Loading branch information
DE7924 committed Nov 13, 2024
1 parent 7bcad7c commit a1e3d67
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions lib/src/components/navigation bar/navigation_bar.dart
Original file line number Diff line number Diff line change
Expand Up @@ -265,6 +265,7 @@ class NavigationItem extends ZetaStatelessWidget {
borderRadius: context.rounded ? Zeta.of(context).radius.rounded : Zeta.of(context).radius.none,
onTap: onTap,
hoverColor: colors.surfaceHover,
highlightShape: BoxShape.rectangle,
child: Semantics(
button: true,
excludeSemantics: true,
Expand Down
5 changes: 3 additions & 2 deletions test/src/components/navigation_bar/navigation_bar_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -370,9 +370,10 @@ void main() {

await tester.pumpAndSettle();

final inkwell = tester.widget<InkWell>(find.descendant(of: itemFinder, matching: find.byType(InkWell)).first);
final inkResponse =
tester.widget<InkResponse>(find.descendant(of: itemFinder, matching: find.byType(InkResponse)).first);

expect(inkwell.hoverColor, Zeta.of(context).colors.surfaceHover);
expect(inkResponse.hoverColor, Zeta.of(context).colors.surfaceHover);
});
});

Expand Down

0 comments on commit a1e3d67

Please sign in to comment.