Dragoș Tiselice e1ebc41a14 Material fixes (#5293)
* Added return value to a onNotification callback.

The LayoutChangedNotification callback was missing a return value.
This commit changes it to return true and stop notification from
bubbling up the tree.

* Changed _RenderInkFeatures to use fresh clip box.

Since it wasn't using the most current value of the RenderBox's
size, _RenderInkFeatures was rendering splashes incorrectly when
the underlying Material size was animating. This commit changes
the clip reference to use the size of the Renderbox instead of
the size method in order to get the newest value.
2016-08-08 16:56:09 -07:00

25 lines
643 B
Dart

// Copyright 2016 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import 'package:flutter/material.dart';
import 'package:flutter_test/flutter_test.dart';
class NotifyMaterial extends StatelessWidget {
@override
Widget build(BuildContext context) {
new LayoutChangedNotification().dispatch(context);
return new Container();
}
}
void main() {
testWidgets('LayoutChangedNotificaion test', (WidgetTester tester) async {
await tester.pumpWidget(
new Material(
child: new NotifyMaterial()
)
);
});
}