From 163a09a535f7ab3381dd37bc6f9025bbe000025b Mon Sep 17 00:00:00 2001 From: chunhtai <47866232+chunhtai@users.noreply.github.com> Date: Mon, 29 Jun 2020 10:19:43 -0700 Subject: [PATCH] Revert "fix paint order of ink feature (#59108)" (#60530) This reverts commit 1e843bb6bac47e692ee02be1f997c45adcdc9b18. --- .../flutter/lib/src/material/app_bar.dart | 7 +-- .../flutter/test/material/app_bar_test.dart | 43 ------------------- 2 files changed, 1 insertion(+), 49 deletions(-) diff --git a/packages/flutter/lib/src/material/app_bar.dart b/packages/flutter/lib/src/material/app_bar.dart index 9ef68098e5..c548f0b16f 100644 --- a/packages/flutter/lib/src/material/app_bar.dart +++ b/packages/flutter/lib/src/material/app_bar.dart @@ -684,12 +684,7 @@ class _AppBarState extends State { fit: StackFit.passthrough, children: [ widget.flexibleSpace, - // Creates a material widget to prevent the flexibleSpace from swallow - // the ink splash effect. - Material( - type: MaterialType.transparency, - child: appBar, - ), + appBar, ], ); } diff --git a/packages/flutter/test/material/app_bar_test.dart b/packages/flutter/test/material/app_bar_test.dart index 15471df92e..f153a6a185 100644 --- a/packages/flutter/test/material/app_bar_test.dart +++ b/packages/flutter/test/material/app_bar_test.dart @@ -10,7 +10,6 @@ import 'package:flutter/rendering.dart'; import 'package:flutter/services.dart'; import 'package:flutter_test/flutter_test.dart'; -import '../rendering/mock_canvas.dart'; import '../widgets/semantics_tester.dart'; Widget buildSliverAppBarApp({ @@ -1104,48 +1103,6 @@ void main() { expect(find.byIcon(Icons.menu), findsNothing); }); - testWidgets('AppBar ink splash draw on the correct canvas', (WidgetTester tester) async { - // This is a regression test for https://github.com/flutter/flutter/issues/58665 - final Key key = UniqueKey(); - await tester.pumpWidget( - MaterialApp( - home: Center( - child: AppBar( - title: const Text('Abc'), - actions: [ - IconButton( - key: key, - icon: const Icon(Icons.add_circle), - tooltip: 'First button', - onPressed: () {}, - ), - ], - flexibleSpace: DecoratedBox( - decoration: BoxDecoration( - gradient: LinearGradient( - begin: const Alignment(0.0, -1.0), - end: const Alignment(-0.04, 1.0), - colors: [Colors.blue.shade500, Colors.blue.shade800], - ), - ), - ), - ), - ), - ), - ); - final RenderObject painter = tester.renderObject( - find.descendant( - of: find.descendant( - of: find.byType(AppBar), - matching: find.byType(Stack), - ), - matching: find.byType(Material) - ) - ); - await tester.tap(find.byKey(key)); - expect(painter, paints..save()..translate()..save()..translate()..circle(x: 24.0, y: 28.0)); - }); - testWidgets('AppBar handles loose children 0', (WidgetTester tester) async { final GlobalKey key = GlobalKey(); await tester.pumpWidget(