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 {
328
328
child: InkWell (
329
329
highlightColor: Colors .transparent,
330
330
onTap: info.onTap,
331
- borderRadius : const BorderRadius . all ( Radius . circular ( 28.0 )) ,
331
+ customBorder : info.indicatorShape ?? navigationDrawerTheme.indicatorShape ?? defaults.indicatorShape ! ,
332
332
child: Stack (
333
333
alignment: Alignment .center,
334
334
children: < Widget > [
Original file line number Diff line number Diff line change @@ -349,12 +349,16 @@ void main() {
349
349
// Test default indicator color and shape.
350
350
expect (_getIndicatorDecoration (tester)? .color, theme.colorScheme.secondaryContainer);
351
351
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 ());
352
354
353
355
await tester.pumpWidget (buildNavigationDrawer (indicatorColor: color, indicatorShape: shape));
354
356
355
357
// Test custom indicator color and shape.
356
358
expect (_getIndicatorDecoration (tester)? .color, color);
357
359
expect (_getIndicatorDecoration (tester)? .shape, shape);
360
+ // Test that InkWell for hover, focus and pressed use custom shape.
361
+ expect (_getInkWell (tester)? .customBorder, shape);
358
362
});
359
363
}
360
364
@@ -376,6 +380,13 @@ Material _getMaterial(WidgetTester tester) {
376
380
);
377
381
}
378
382
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
+
379
390
ShapeDecoration ? _getIndicatorDecoration (WidgetTester tester) {
380
391
return tester
381
392
.firstWidget <Container >(
You can’t perform that action at this time.
0 commit comments