awaittester.pump(constDuration(milliseconds:750));// 3.75s // last frame of animation, material banner removed from build, new material banner put in its place
expect(find.text('banner1'),findsNothing);
expect(find.text('banner2'),findsOneWidget);
awaittester.pump();// begin animation
expect(find.text('banner1'),findsNothing);
expect(find.text('banner2'),findsOneWidget);
awaittester.pump(constDuration(milliseconds:750));// 4.50s // animation last frame
expect(actionsTopRight.dx+8,bannerTopRight.dx);// actions OverflowBar is padded by 8
});
// Regression test for https://github.com/flutter/flutter/issues/39574
testWidgets('Single action laid out beside content but aligned to the trailing edge - RTL',(WidgetTestertester)async{
awaittester.pumpWidget(
MaterialApp(
home:Directionality(
textDirection:TextDirection.rtl,
textDirection:TextDirection.rtl,
child:MaterialBanner(
content:constText('Content'),
actions:<Widget>[
...
...
@@ -145,6 +533,46 @@ void main() {
expect(actionsTopLeft.dx-8,bannerTopLeft.dx);// actions OverflowBar is padded by 8
});
testWidgets('Single action laid out beside content but aligned to the trailing edge when presented by ScaffoldMessenger - RTL',(WidgetTestertester)async{