Skip to content

Commit 163a09a

Browse files
authored
Revert "fix paint order of ink feature (flutter#59108)" (flutter#60530)
This reverts commit 1e843bb.
1 parent ed05fd7 commit 163a09a

File tree

2 files changed

+1
-49
lines changed

2 files changed

+1
-49
lines changed

packages/flutter/lib/src/material/app_bar.dart

+1-6
Original file line numberDiff line numberDiff line change
@@ -684,12 +684,7 @@ class _AppBarState extends State<AppBar> {
684684
fit: StackFit.passthrough,
685685
children: <Widget>[
686686
widget.flexibleSpace,
687-
// Creates a material widget to prevent the flexibleSpace from swallow
688-
// the ink splash effect.
689-
Material(
690-
type: MaterialType.transparency,
691-
child: appBar,
692-
),
687+
appBar,
693688
],
694689
);
695690
}

packages/flutter/test/material/app_bar_test.dart

-43
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ import 'package:flutter/rendering.dart';
1010
import 'package:flutter/services.dart';
1111
import 'package:flutter_test/flutter_test.dart';
1212

13-
import '../rendering/mock_canvas.dart';
1413
import '../widgets/semantics_tester.dart';
1514

1615
Widget buildSliverAppBarApp({
@@ -1104,48 +1103,6 @@ void main() {
11041103
expect(find.byIcon(Icons.menu), findsNothing);
11051104
});
11061105

1107-
testWidgets('AppBar ink splash draw on the correct canvas', (WidgetTester tester) async {
1108-
// This is a regression test for https://github.com/flutter/flutter/issues/58665
1109-
final Key key = UniqueKey();
1110-
await tester.pumpWidget(
1111-
MaterialApp(
1112-
home: Center(
1113-
child: AppBar(
1114-
title: const Text('Abc'),
1115-
actions: <Widget>[
1116-
IconButton(
1117-
key: key,
1118-
icon: const Icon(Icons.add_circle),
1119-
tooltip: 'First button',
1120-
onPressed: () {},
1121-
),
1122-
],
1123-
flexibleSpace: DecoratedBox(
1124-
decoration: BoxDecoration(
1125-
gradient: LinearGradient(
1126-
begin: const Alignment(0.0, -1.0),
1127-
end: const Alignment(-0.04, 1.0),
1128-
colors: <Color>[Colors.blue.shade500, Colors.blue.shade800],
1129-
),
1130-
),
1131-
),
1132-
),
1133-
),
1134-
),
1135-
);
1136-
final RenderObject painter = tester.renderObject(
1137-
find.descendant(
1138-
of: find.descendant(
1139-
of: find.byType(AppBar),
1140-
matching: find.byType(Stack),
1141-
),
1142-
matching: find.byType(Material)
1143-
)
1144-
);
1145-
await tester.tap(find.byKey(key));
1146-
expect(painter, paints..save()..translate()..save()..translate()..circle(x: 24.0, y: 28.0));
1147-
});
1148-
11491106
testWidgets('AppBar handles loose children 0', (WidgetTester tester) async {
11501107
final GlobalKey key = GlobalKey();
11511108
await tester.pumpWidget(

0 commit comments

Comments
 (0)