File tree Expand file tree Collapse file tree 2 files changed +12
-1
lines changed Expand file tree Collapse file tree 2 files changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -328,7 +328,7 @@ class _NavigationDestinationBuilder extends StatelessWidget {
328328 child: InkWell (
329329 highlightColor: Colors .transparent,
330330 onTap: info.onTap,
331- borderRadius : const BorderRadius . all ( Radius . circular ( 28.0 )) ,
331+ customBorder : info.indicatorShape ?? navigationDrawerTheme.indicatorShape ?? defaults.indicatorShape ! ,
332332 child: Stack (
333333 alignment: Alignment .center,
334334 children: < Widget > [
Original file line number Diff line number Diff line change @@ -349,12 +349,16 @@ void main() {
349349 // Test default indicator color and shape.
350350 expect (_getIndicatorDecoration (tester)? .color, theme.colorScheme.secondaryContainer);
351351 expect (_getIndicatorDecoration (tester)? .shape, const StadiumBorder ());
352+ // Test that InkWell for hover, focus and pressed use default shape.
353+ expect (_getInkWell (tester)? .customBorder, const StadiumBorder ());
352354
353355 await tester.pumpWidget (buildNavigationDrawer (indicatorColor: color, indicatorShape: shape));
354356
355357 // Test custom indicator color and shape.
356358 expect (_getIndicatorDecoration (tester)? .color, color);
357359 expect (_getIndicatorDecoration (tester)? .shape, shape);
360+ // Test that InkWell for hover, focus and pressed use custom shape.
361+ expect (_getInkWell (tester)? .customBorder, shape);
358362 });
359363}
360364
@@ -376,6 +380,13 @@ Material _getMaterial(WidgetTester tester) {
376380 );
377381}
378382
383+ InkWell ? _getInkWell (WidgetTester tester) {
384+ return tester.firstWidget <InkWell >(
385+ find.descendant (
386+ of: find.byType (NavigationDrawer ), matching: find.byType (InkWell )),
387+ );
388+ }
389+
379390ShapeDecoration ? _getIndicatorDecoration (WidgetTester tester) {
380391 return tester
381392 .firstWidget <Container >(
You can’t perform that action at this time.
0 commit comments