Unverified Commit be06151e authored by Kostia Sokolovskyi's avatar Kostia Sokolovskyi Committed by GitHub

Cover some test/widgets tests with leak tracking (#133767)

parent 414bff14
...@@ -4,11 +4,12 @@ ...@@ -4,11 +4,12 @@
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter_test/flutter_test.dart'; import 'package:flutter_test/flutter_test.dart';
import 'package:leak_tracker_flutter_testing/leak_tracker_flutter_testing.dart';
import 'semantics_tester.dart'; import 'semantics_tester.dart';
void main() { void main() {
testWidgets('AbsorbPointers do not block siblings', (WidgetTester tester) async { testWidgetsWithLeakTracking('AbsorbPointers do not block siblings', (WidgetTester tester) async {
bool tapped = false; bool tapped = false;
await tester.pumpWidget( await tester.pumpWidget(
Column( Column(
...@@ -29,7 +30,7 @@ void main() { ...@@ -29,7 +30,7 @@ void main() {
}); });
group('AbsorbPointer semantics', () { group('AbsorbPointer semantics', () {
testWidgets('does not change semantics when not absorbing', (WidgetTester tester) async { testWidgetsWithLeakTracking('does not change semantics when not absorbing', (WidgetTester tester) async {
final UniqueKey key = UniqueKey(); final UniqueKey key = UniqueKey();
await tester.pumpWidget( await tester.pumpWidget(
MaterialApp( MaterialApp(
...@@ -56,7 +57,7 @@ void main() { ...@@ -56,7 +57,7 @@ void main() {
); );
}); });
testWidgets('drops semantics when its ignoreSemantics is true', (WidgetTester tester) async { testWidgetsWithLeakTracking('drops semantics when its ignoreSemantics is true', (WidgetTester tester) async {
final SemanticsTester semantics = SemanticsTester(tester); final SemanticsTester semantics = SemanticsTester(tester);
final UniqueKey key = UniqueKey(); final UniqueKey key = UniqueKey();
await tester.pumpWidget( await tester.pumpWidget(
...@@ -75,7 +76,7 @@ void main() { ...@@ -75,7 +76,7 @@ void main() {
semantics.dispose(); semantics.dispose();
}); });
testWidgets('ignores user interactions', (WidgetTester tester) async { testWidgetsWithLeakTracking('ignores user interactions', (WidgetTester tester) async {
final UniqueKey key = UniqueKey(); final UniqueKey key = UniqueKey();
await tester.pumpWidget( await tester.pumpWidget(
MaterialApp( MaterialApp(
......
...@@ -4,9 +4,10 @@ ...@@ -4,9 +4,10 @@
import 'package:flutter/widgets.dart'; import 'package:flutter/widgets.dart';
import 'package:flutter_test/flutter_test.dart'; import 'package:flutter_test/flutter_test.dart';
import 'package:leak_tracker_flutter_testing/leak_tracker_flutter_testing.dart';
void main() { void main() {
testWidgets('Align smoke test', (WidgetTester tester) async { testWidgetsWithLeakTracking('Align smoke test', (WidgetTester tester) async {
await tester.pumpWidget( await tester.pumpWidget(
Align( Align(
alignment: const Alignment(0.50, 0.50), alignment: const Alignment(0.50, 0.50),
...@@ -38,7 +39,7 @@ void main() { ...@@ -38,7 +39,7 @@ void main() {
); );
}); });
testWidgets('Align control test (LTR)', (WidgetTester tester) async { testWidgetsWithLeakTracking('Align control test (LTR)', (WidgetTester tester) async {
await tester.pumpWidget(const Directionality( await tester.pumpWidget(const Directionality(
textDirection: TextDirection.ltr, textDirection: TextDirection.ltr,
child: Align( child: Align(
...@@ -62,7 +63,7 @@ void main() { ...@@ -62,7 +63,7 @@ void main() {
expect(tester.getBottomRight(find.byType(SizedBox)).dx, 100.0); expect(tester.getBottomRight(find.byType(SizedBox)).dx, 100.0);
}); });
testWidgets('Align control test (RTL)', (WidgetTester tester) async { testWidgetsWithLeakTracking('Align control test (RTL)', (WidgetTester tester) async {
await tester.pumpWidget(const Directionality( await tester.pumpWidget(const Directionality(
textDirection: TextDirection.rtl, textDirection: TextDirection.rtl,
child: Align( child: Align(
...@@ -86,7 +87,7 @@ void main() { ...@@ -86,7 +87,7 @@ void main() {
expect(tester.getBottomRight(find.byType(SizedBox)).dx, 100.0); expect(tester.getBottomRight(find.byType(SizedBox)).dx, 100.0);
}); });
testWidgets('Shrink wraps in finite space', (WidgetTester tester) async { testWidgetsWithLeakTracking('Shrink wraps in finite space', (WidgetTester tester) async {
final GlobalKey alignKey = GlobalKey(); final GlobalKey alignKey = GlobalKey();
await tester.pumpWidget( await tester.pumpWidget(
SingleChildScrollView( SingleChildScrollView(
...@@ -105,7 +106,7 @@ void main() { ...@@ -105,7 +106,7 @@ void main() {
expect(size.height, equals(10.0)); expect(size.height, equals(10.0));
}); });
testWidgets('Align widthFactor', (WidgetTester tester) async { testWidgetsWithLeakTracking('Align widthFactor', (WidgetTester tester) async {
await tester.pumpWidget( await tester.pumpWidget(
const Directionality( const Directionality(
textDirection: TextDirection.ltr, textDirection: TextDirection.ltr,
...@@ -128,7 +129,7 @@ void main() { ...@@ -128,7 +129,7 @@ void main() {
expect(box.size.width, equals(50.0)); expect(box.size.width, equals(50.0));
}); });
testWidgets('Align heightFactor', (WidgetTester tester) async { testWidgetsWithLeakTracking('Align heightFactor', (WidgetTester tester) async {
await tester.pumpWidget( await tester.pumpWidget(
const Directionality( const Directionality(
textDirection: TextDirection.ltr, textDirection: TextDirection.ltr,
......
...@@ -4,9 +4,10 @@ ...@@ -4,9 +4,10 @@
import 'package:flutter/widgets.dart'; import 'package:flutter/widgets.dart';
import 'package:flutter_test/flutter_test.dart'; import 'package:flutter_test/flutter_test.dart';
import 'package:leak_tracker_flutter_testing/leak_tracker_flutter_testing.dart';
void main() { void main() {
testWidgets('AnimatedAlign.debugFillProperties', (WidgetTester tester) async { testWidgetsWithLeakTracking('AnimatedAlign.debugFillProperties', (WidgetTester tester) async {
const AnimatedAlign box = AnimatedAlign( const AnimatedAlign box = AnimatedAlign(
alignment: Alignment.topCenter, alignment: Alignment.topCenter,
curve: Curves.ease, curve: Curves.ease,
...@@ -15,7 +16,7 @@ void main() { ...@@ -15,7 +16,7 @@ void main() {
expect(box, hasOneLineDescription); expect(box, hasOneLineDescription);
}); });
testWidgets('AnimatedAlign alignment visual-to-directional animation', (WidgetTester tester) async { testWidgetsWithLeakTracking('AnimatedAlign alignment visual-to-directional animation', (WidgetTester tester) async {
final Key target = UniqueKey(); final Key target = UniqueKey();
await tester.pumpWidget( await tester.pumpWidget(
...@@ -57,7 +58,7 @@ void main() { ...@@ -57,7 +58,7 @@ void main() {
expect(tester.getTopRight(find.byKey(target)), const Offset(800.0, 400.0)); expect(tester.getTopRight(find.byKey(target)), const Offset(800.0, 400.0));
}); });
testWidgets('AnimatedAlign widthFactor', (WidgetTester tester) async { testWidgetsWithLeakTracking('AnimatedAlign widthFactor', (WidgetTester tester) async {
await tester.pumpWidget( await tester.pumpWidget(
const Directionality( const Directionality(
textDirection: TextDirection.ltr, textDirection: TextDirection.ltr,
...@@ -82,7 +83,7 @@ void main() { ...@@ -82,7 +83,7 @@ void main() {
expect(box.size.width, equals(50.0)); expect(box.size.width, equals(50.0));
}); });
testWidgets('AnimatedAlign heightFactor', (WidgetTester tester) async { testWidgetsWithLeakTracking('AnimatedAlign heightFactor', (WidgetTester tester) async {
await tester.pumpWidget( await tester.pumpWidget(
const Directionality( const Directionality(
textDirection: TextDirection.ltr, textDirection: TextDirection.ltr,
...@@ -106,7 +107,7 @@ void main() { ...@@ -106,7 +107,7 @@ void main() {
expect(box.size.height, equals( 50.0)); expect(box.size.height, equals( 50.0));
}); });
testWidgets('AnimatedAlign null height factor', (WidgetTester tester) async { testWidgetsWithLeakTracking('AnimatedAlign null height factor', (WidgetTester tester) async {
await tester.pumpWidget( await tester.pumpWidget(
const Directionality( const Directionality(
textDirection: TextDirection.ltr, textDirection: TextDirection.ltr,
...@@ -130,7 +131,7 @@ void main() { ...@@ -130,7 +131,7 @@ void main() {
expect(box.size, equals(const Size(100.0, 100))); expect(box.size, equals(const Size(100.0, 100)));
}); });
testWidgets('AnimatedAlign null widthFactor', (WidgetTester tester) async { testWidgetsWithLeakTracking('AnimatedAlign null widthFactor', (WidgetTester tester) async {
await tester.pumpWidget( await tester.pumpWidget(
const Directionality( const Directionality(
textDirection: TextDirection.ltr, textDirection: TextDirection.ltr,
......
...@@ -5,9 +5,10 @@ ...@@ -5,9 +5,10 @@
import 'package:flutter/rendering.dart'; import 'package:flutter/rendering.dart';
import 'package:flutter/widgets.dart'; import 'package:flutter/widgets.dart';
import 'package:flutter_test/flutter_test.dart'; import 'package:flutter_test/flutter_test.dart';
import 'package:leak_tracker_flutter_testing/leak_tracker_flutter_testing.dart';
void main() { void main() {
testWidgets('AnimatedContainer.debugFillProperties', (WidgetTester tester) async { testWidgetsWithLeakTracking('AnimatedContainer.debugFillProperties', (WidgetTester tester) async {
final AnimatedContainer container = AnimatedContainer( final AnimatedContainer container = AnimatedContainer(
constraints: const BoxConstraints.tightFor(width: 17.0, height: 23.0), constraints: const BoxConstraints.tightFor(width: 17.0, height: 23.0),
decoration: const BoxDecoration(color: Color(0xFF00FF00)), decoration: const BoxDecoration(color: Color(0xFF00FF00)),
...@@ -24,7 +25,7 @@ void main() { ...@@ -24,7 +25,7 @@ void main() {
expect(container, hasOneLineDescription); expect(container, hasOneLineDescription);
}); });
testWidgets('AnimatedContainer control test', (WidgetTester tester) async { testWidgetsWithLeakTracking('AnimatedContainer control test', (WidgetTester tester) async {
final GlobalKey key = GlobalKey(); final GlobalKey key = GlobalKey();
const BoxDecoration decorationA = BoxDecoration( const BoxDecoration decorationA = BoxDecoration(
...@@ -102,7 +103,7 @@ void main() { ...@@ -102,7 +103,7 @@ void main() {
); );
}); });
testWidgets('AnimatedContainer overanimate test', (WidgetTester tester) async { testWidgetsWithLeakTracking('AnimatedContainer overanimate test', (WidgetTester tester) async {
await tester.pumpWidget( await tester.pumpWidget(
AnimatedContainer( AnimatedContainer(
duration: const Duration(milliseconds: 200), duration: const Duration(milliseconds: 200),
...@@ -139,7 +140,7 @@ void main() { ...@@ -139,7 +140,7 @@ void main() {
expect(tester.binding.transientCallbackCount, 0); expect(tester.binding.transientCallbackCount, 0);
}); });
testWidgets('AnimatedContainer padding visual-to-directional animation', (WidgetTester tester) async { testWidgetsWithLeakTracking('AnimatedContainer padding visual-to-directional animation', (WidgetTester tester) async {
final Key target = UniqueKey(); final Key target = UniqueKey();
await tester.pumpWidget( await tester.pumpWidget(
...@@ -181,7 +182,7 @@ void main() { ...@@ -181,7 +182,7 @@ void main() {
expect(tester.getTopRight(find.byKey(target)), const Offset(700.0, 0.0)); expect(tester.getTopRight(find.byKey(target)), const Offset(700.0, 0.0));
}); });
testWidgets('AnimatedContainer alignment visual-to-directional animation', (WidgetTester tester) async { testWidgetsWithLeakTracking('AnimatedContainer alignment visual-to-directional animation', (WidgetTester tester) async {
final Key target = UniqueKey(); final Key target = UniqueKey();
await tester.pumpWidget( await tester.pumpWidget(
...@@ -223,7 +224,7 @@ void main() { ...@@ -223,7 +224,7 @@ void main() {
expect(tester.getTopRight(find.byKey(target)), const Offset(800.0, 400.0)); expect(tester.getTopRight(find.byKey(target)), const Offset(800.0, 400.0));
}); });
testWidgets('Animation rerun', (WidgetTester tester) async { testWidgetsWithLeakTracking('Animation rerun', (WidgetTester tester) async {
await tester.pumpWidget( await tester.pumpWidget(
Center( Center(
child: AnimatedContainer( child: AnimatedContainer(
...@@ -291,7 +292,7 @@ void main() { ...@@ -291,7 +292,7 @@ void main() {
expect(text.size.height, equals(100.0)); expect(text.size.height, equals(100.0));
}); });
testWidgets('AnimatedContainer sets transformAlignment', (WidgetTester tester) async { testWidgetsWithLeakTracking('AnimatedContainer sets transformAlignment', (WidgetTester tester) async {
final Key target = UniqueKey(); final Key target = UniqueKey();
await tester.pumpWidget( await tester.pumpWidget(
...@@ -339,7 +340,7 @@ void main() { ...@@ -339,7 +340,7 @@ void main() {
expect(tester.getTopLeft(find.byKey(target)), const Offset(400.0, 300.0)); expect(tester.getTopLeft(find.byKey(target)), const Offset(400.0, 300.0));
}); });
testWidgets('AnimatedContainer sets clipBehavior', (WidgetTester tester) async { testWidgetsWithLeakTracking('AnimatedContainer sets clipBehavior', (WidgetTester tester) async {
await tester.pumpWidget( await tester.pumpWidget(
AnimatedContainer( AnimatedContainer(
decoration: const BoxDecoration( decoration: const BoxDecoration(
......
...@@ -5,9 +5,10 @@ ...@@ -5,9 +5,10 @@
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter/scheduler.dart'; import 'package:flutter/scheduler.dart';
import 'package:flutter_test/flutter_test.dart'; import 'package:flutter_test/flutter_test.dart';
import 'package:leak_tracker_flutter_testing/leak_tracker_flutter_testing.dart';
void main() { void main() {
testWidgets('AnimatedCrossFade test', (WidgetTester tester) async { testWidgetsWithLeakTracking('AnimatedCrossFade test', (WidgetTester tester) async {
await tester.pumpWidget( await tester.pumpWidget(
const Directionality( const Directionality(
textDirection: TextDirection.ltr, textDirection: TextDirection.ltr,
...@@ -61,7 +62,7 @@ void main() { ...@@ -61,7 +62,7 @@ void main() {
expect(box.size.height, equals(150.0)); expect(box.size.height, equals(150.0));
}); });
testWidgets('AnimatedCrossFade test showSecond', (WidgetTester tester) async { testWidgetsWithLeakTracking('AnimatedCrossFade test showSecond', (WidgetTester tester) async {
await tester.pumpWidget( await tester.pumpWidget(
const Directionality( const Directionality(
textDirection: TextDirection.ltr, textDirection: TextDirection.ltr,
...@@ -88,7 +89,7 @@ void main() { ...@@ -88,7 +89,7 @@ void main() {
expect(box.size.height, equals(200.0)); expect(box.size.height, equals(200.0));
}); });
testWidgets('AnimatedCrossFade alignment (VISUAL)', (WidgetTester tester) async { testWidgetsWithLeakTracking('AnimatedCrossFade alignment (VISUAL)', (WidgetTester tester) async {
final Key firstKey = UniqueKey(); final Key firstKey = UniqueKey();
final Key secondKey = UniqueKey(); final Key secondKey = UniqueKey();
...@@ -146,7 +147,7 @@ void main() { ...@@ -146,7 +147,7 @@ void main() {
expect(box2.localToGlobal(Offset.zero), const Offset(275.0, 175.0)); expect(box2.localToGlobal(Offset.zero), const Offset(275.0, 175.0));
}); });
testWidgets('AnimatedCrossFade alignment (LTR)', (WidgetTester tester) async { testWidgetsWithLeakTracking('AnimatedCrossFade alignment (LTR)', (WidgetTester tester) async {
final Key firstKey = UniqueKey(); final Key firstKey = UniqueKey();
final Key secondKey = UniqueKey(); final Key secondKey = UniqueKey();
...@@ -204,7 +205,7 @@ void main() { ...@@ -204,7 +205,7 @@ void main() {
expect(box2.localToGlobal(Offset.zero), const Offset(275.0, 175.0)); expect(box2.localToGlobal(Offset.zero), const Offset(275.0, 175.0));
}); });
testWidgets('AnimatedCrossFade alignment (RTL)', (WidgetTester tester) async { testWidgetsWithLeakTracking('AnimatedCrossFade alignment (RTL)', (WidgetTester tester) async {
final Key firstKey = UniqueKey(); final Key firstKey = UniqueKey();
final Key secondKey = UniqueKey(); final Key secondKey = UniqueKey();
...@@ -274,7 +275,7 @@ void main() { ...@@ -274,7 +275,7 @@ void main() {
); );
} }
testWidgets('AnimatedCrossFade preserves widget state', (WidgetTester tester) async { testWidgetsWithLeakTracking('AnimatedCrossFade preserves widget state', (WidgetTester tester) async {
await tester.pumpWidget(crossFadeWithWatcher()); await tester.pumpWidget(crossFadeWithWatcher());
_TickerWatchingWidgetState findState() => tester.state(find.byType(_TickerWatchingWidget)); _TickerWatchingWidgetState findState() => tester.state(find.byType(_TickerWatchingWidget));
...@@ -287,7 +288,7 @@ void main() { ...@@ -287,7 +288,7 @@ void main() {
} }
}); });
testWidgets('AnimatedCrossFade switches off TickerMode and semantics on faded out widget', (WidgetTester tester) async { testWidgetsWithLeakTracking('AnimatedCrossFade switches off TickerMode and semantics on faded out widget', (WidgetTester tester) async {
ExcludeSemantics findSemantics() { ExcludeSemantics findSemantics() {
return tester.widget(find.descendant( return tester.widget(find.descendant(
of: find.byKey(const ValueKey<CrossFadeState>(CrossFadeState.showFirst)), of: find.byKey(const ValueKey<CrossFadeState>(CrossFadeState.showFirst)),
...@@ -317,7 +318,7 @@ void main() { ...@@ -317,7 +318,7 @@ void main() {
expect(findSemantics().excluding, true); expect(findSemantics().excluding, true);
}); });
testWidgets('AnimatedCrossFade.layoutBuilder', (WidgetTester tester) async { testWidgetsWithLeakTracking('AnimatedCrossFade.layoutBuilder', (WidgetTester tester) async {
await tester.pumpWidget( await tester.pumpWidget(
const Directionality( const Directionality(
textDirection: TextDirection.ltr, textDirection: TextDirection.ltr,
...@@ -361,7 +362,7 @@ void main() { ...@@ -361,7 +362,7 @@ void main() {
expect(find.text('AAA'), findsNothing); expect(find.text('AAA'), findsNothing);
}); });
testWidgets('AnimatedCrossFade test focus', (WidgetTester tester) async { testWidgetsWithLeakTracking('AnimatedCrossFade test focus', (WidgetTester tester) async {
await tester.pumpWidget( await tester.pumpWidget(
Directionality( Directionality(
textDirection: TextDirection.ltr, textDirection: TextDirection.ltr,
...@@ -385,7 +386,7 @@ void main() { ...@@ -385,7 +386,7 @@ void main() {
expect(hiddenNode.hasPrimaryFocus, isFalse); expect(hiddenNode.hasPrimaryFocus, isFalse);
}); });
testWidgets('AnimatedCrossFade bottom child can have focus', (WidgetTester tester) async { testWidgetsWithLeakTracking('AnimatedCrossFade bottom child can have focus', (WidgetTester tester) async {
await tester.pumpWidget( await tester.pumpWidget(
Directionality( Directionality(
textDirection: TextDirection.ltr, textDirection: TextDirection.ltr,
...@@ -410,7 +411,7 @@ void main() { ...@@ -410,7 +411,7 @@ void main() {
expect(hiddenNode.hasPrimaryFocus, isTrue); expect(hiddenNode.hasPrimaryFocus, isTrue);
}); });
testWidgets('AnimatedCrossFade second child do not receive touch events', testWidgetsWithLeakTracking('AnimatedCrossFade second child do not receive touch events',
(WidgetTester tester) async { (WidgetTester tester) async {
int numberOfTouchEventNoticed = 0; int numberOfTouchEventNoticed = 0;
......
...@@ -5,10 +5,11 @@ ...@@ -5,10 +5,11 @@
import 'package:flutter/src/foundation/diagnostics.dart'; import 'package:flutter/src/foundation/diagnostics.dart';
import 'package:flutter/widgets.dart'; import 'package:flutter/widgets.dart';
import 'package:flutter_test/flutter_test.dart'; import 'package:flutter_test/flutter_test.dart';
import 'package:leak_tracker_flutter_testing/leak_tracker_flutter_testing.dart';
void main() { void main() {
// Regression test for https://github.com/flutter/flutter/issues/100451 // Regression test for https://github.com/flutter/flutter/issues/100451
testWidgets('SliverAnimatedGrid.builder respects findChildIndexCallback', (WidgetTester tester) async { testWidgetsWithLeakTracking('SliverAnimatedGrid.builder respects findChildIndexCallback', (WidgetTester tester) async {
bool finderCalled = false; bool finderCalled = false;
int itemCount = 7; int itemCount = 7;
late StateSetter stateSetter; late StateSetter stateSetter;
...@@ -50,7 +51,7 @@ void main() { ...@@ -50,7 +51,7 @@ void main() {
expect(finderCalled, true); expect(finderCalled, true);
}); });
testWidgets('AnimatedGrid', (WidgetTester tester) async { testWidgetsWithLeakTracking('AnimatedGrid', (WidgetTester tester) async {
Widget builder(BuildContext context, int index, Animation<double> animation) { Widget builder(BuildContext context, int index, Animation<double> animation) {
return SizedBox( return SizedBox(
height: 100.0, height: 100.0,
...@@ -132,7 +133,7 @@ void main() { ...@@ -132,7 +133,7 @@ void main() {
}); });
group('SliverAnimatedGrid', () { group('SliverAnimatedGrid', () {
testWidgets('initialItemCount', (WidgetTester tester) async { testWidgetsWithLeakTracking('initialItemCount', (WidgetTester tester) async {
final Map<int, Animation<double>> animations = <int, Animation<double>>{}; final Map<int, Animation<double>> animations = <int, Animation<double>>{};
await tester.pumpWidget( await tester.pumpWidget(
...@@ -170,7 +171,7 @@ void main() { ...@@ -170,7 +171,7 @@ void main() {
expect(animations[1]!.value, 1.0); expect(animations[1]!.value, 1.0);
}); });
testWidgets('insert', (WidgetTester tester) async { testWidgetsWithLeakTracking('insert', (WidgetTester tester) async {
final GlobalKey<SliverAnimatedGridState> listKey = GlobalKey<SliverAnimatedGridState>(); final GlobalKey<SliverAnimatedGridState> listKey = GlobalKey<SliverAnimatedGridState>();
await tester.pumpWidget( await tester.pumpWidget(
...@@ -250,7 +251,7 @@ void main() { ...@@ -250,7 +251,7 @@ void main() {
expect(itemRight(2), 300.0); expect(itemRight(2), 300.0);
}); });
testWidgets('insertAll', (WidgetTester tester) async { testWidgetsWithLeakTracking('insertAll', (WidgetTester tester) async {
final GlobalKey<SliverAnimatedGridState> listKey = GlobalKey<SliverAnimatedGridState>(); final GlobalKey<SliverAnimatedGridState> listKey = GlobalKey<SliverAnimatedGridState>();
await tester.pumpWidget( await tester.pumpWidget(
...@@ -306,7 +307,7 @@ void main() { ...@@ -306,7 +307,7 @@ void main() {
expect(itemRight(1), 200.0); expect(itemRight(1), 200.0);
}); });
testWidgets('remove', (WidgetTester tester) async { testWidgetsWithLeakTracking('remove', (WidgetTester tester) async {
final GlobalKey<SliverAnimatedGridState> listKey = GlobalKey<SliverAnimatedGridState>(); final GlobalKey<SliverAnimatedGridState> listKey = GlobalKey<SliverAnimatedGridState>();
final List<int> items = <int>[0, 1, 2]; final List<int> items = <int>[0, 1, 2];
...@@ -384,7 +385,7 @@ void main() { ...@@ -384,7 +385,7 @@ void main() {
expect(itemRight(2), 200.0); expect(itemRight(2), 200.0);
}); });
testWidgets('removeAll', (WidgetTester tester) async { testWidgetsWithLeakTracking('removeAll', (WidgetTester tester) async {
final GlobalKey<SliverAnimatedGridState> listKey = GlobalKey<SliverAnimatedGridState>(); final GlobalKey<SliverAnimatedGridState> listKey = GlobalKey<SliverAnimatedGridState>();
final List<int> items = <int>[0, 1, 2]; final List<int> items = <int>[0, 1, 2];
...@@ -436,7 +437,7 @@ void main() { ...@@ -436,7 +437,7 @@ void main() {
expect(find.text('item 2'), findsNothing); expect(find.text('item 2'), findsNothing);
}); });
testWidgets('works in combination with other slivers', (WidgetTester tester) async { testWidgetsWithLeakTracking('works in combination with other slivers', (WidgetTester tester) async {
final GlobalKey<SliverAnimatedGridState> listKey = GlobalKey<SliverAnimatedGridState>(); final GlobalKey<SliverAnimatedGridState> listKey = GlobalKey<SliverAnimatedGridState>();
await tester.pumpWidget( await tester.pumpWidget(
...@@ -505,7 +506,7 @@ void main() { ...@@ -505,7 +506,7 @@ void main() {
expect(tester.getTopLeft(find.text('item 0')).dx, 0); expect(tester.getTopLeft(find.text('item 0')).dx, 0);
}); });
testWidgets('passes correctly derived index of findChildIndexCallback to the inner SliverChildBuilderDelegate', testWidgetsWithLeakTracking('passes correctly derived index of findChildIndexCallback to the inner SliverChildBuilderDelegate',
(WidgetTester tester) async { (WidgetTester tester) async {
final List<int> items = <int>[0, 1, 2, 3]; final List<int> items = <int>[0, 1, 2, 3];
final GlobalKey<SliverAnimatedGridState> listKey = GlobalKey<SliverAnimatedGridState>(); final GlobalKey<SliverAnimatedGridState> listKey = GlobalKey<SliverAnimatedGridState>();
...@@ -573,7 +574,7 @@ void main() { ...@@ -573,7 +574,7 @@ void main() {
}); });
}); });
testWidgets( testWidgetsWithLeakTracking(
'AnimatedGrid.of() and maybeOf called with a context that does not contain AnimatedGrid', 'AnimatedGrid.of() and maybeOf called with a context that does not contain AnimatedGrid',
(WidgetTester tester) async { (WidgetTester tester) async {
final GlobalKey key = GlobalKey(); final GlobalKey key = GlobalKey();
...@@ -618,7 +619,7 @@ void main() { ...@@ -618,7 +619,7 @@ void main() {
}, },
); );
testWidgets('AnimatedGrid.clipBehavior is forwarded to its inner CustomScrollView', (WidgetTester tester) async { testWidgetsWithLeakTracking('AnimatedGrid.clipBehavior is forwarded to its inner CustomScrollView', (WidgetTester tester) async {
const Clip clipBehavior = Clip.none; const Clip clipBehavior = Clip.none;
await tester.pumpWidget( await tester.pumpWidget(
...@@ -647,7 +648,7 @@ void main() { ...@@ -647,7 +648,7 @@ void main() {
expect(tester.widget<CustomScrollView>(find.byType(CustomScrollView)).clipBehavior, clipBehavior); expect(tester.widget<CustomScrollView>(find.byType(CustomScrollView)).clipBehavior, clipBehavior);
}); });
testWidgets('AnimatedGrid applies MediaQuery padding', (WidgetTester tester) async { testWidgetsWithLeakTracking('AnimatedGrid applies MediaQuery padding', (WidgetTester tester) async {
const EdgeInsets padding = EdgeInsets.all(30.0); const EdgeInsets padding = EdgeInsets.all(30.0);
EdgeInsets? innerMediaQueryPadding; EdgeInsets? innerMediaQueryPadding;
await tester.pumpWidget( await tester.pumpWidget(
......
...@@ -7,9 +7,10 @@ import 'dart:ui'; ...@@ -7,9 +7,10 @@ import 'dart:ui';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter/rendering.dart'; import 'package:flutter/rendering.dart';
import 'package:flutter_test/flutter_test.dart'; import 'package:flutter_test/flutter_test.dart';
import 'package:leak_tracker_flutter_testing/leak_tracker_flutter_testing.dart';
void main() { void main() {
testWidgets('ImageFiltered avoids repainting child as it animates', (WidgetTester tester) async { testWidgetsWithLeakTracking('ImageFiltered avoids repainting child as it animates', (WidgetTester tester) async {
RenderTestObject.paintCount = 0; RenderTestObject.paintCount = 0;
await tester.pumpWidget( await tester.pumpWidget(
ColoredBox( ColoredBox(
......
...@@ -5,10 +5,11 @@ ...@@ -5,10 +5,11 @@
import 'package:flutter/src/foundation/diagnostics.dart'; import 'package:flutter/src/foundation/diagnostics.dart';
import 'package:flutter/widgets.dart'; import 'package:flutter/widgets.dart';
import 'package:flutter_test/flutter_test.dart'; import 'package:flutter_test/flutter_test.dart';
import 'package:leak_tracker_flutter_testing/leak_tracker_flutter_testing.dart';
void main() { void main() {
// Regression test for https://github.com/flutter/flutter/issues/100451 // Regression test for https://github.com/flutter/flutter/issues/100451
testWidgets('SliverAnimatedList.builder respects findChildIndexCallback', (WidgetTester tester) async { testWidgetsWithLeakTracking('SliverAnimatedList.builder respects findChildIndexCallback', (WidgetTester tester) async {
bool finderCalled = false; bool finderCalled = false;
int itemCount = 7; int itemCount = 7;
late StateSetter stateSetter; late StateSetter stateSetter;
...@@ -47,7 +48,7 @@ void main() { ...@@ -47,7 +48,7 @@ void main() {
expect(finderCalled, true); expect(finderCalled, true);
}); });
testWidgets('AnimatedList', (WidgetTester tester) async { testWidgetsWithLeakTracking('AnimatedList', (WidgetTester tester) async {
Widget builder(BuildContext context, int index, Animation<double> animation) { Widget builder(BuildContext context, int index, Animation<double> animation) {
return SizedBox( return SizedBox(
height: 100.0, height: 100.0,
...@@ -126,7 +127,7 @@ void main() { ...@@ -126,7 +127,7 @@ void main() {
}); });
group('SliverAnimatedList', () { group('SliverAnimatedList', () {
testWidgets('initialItemCount', (WidgetTester tester) async { testWidgetsWithLeakTracking('initialItemCount', (WidgetTester tester) async {
final Map<int, Animation<double>> animations = <int, Animation<double>>{}; final Map<int, Animation<double>> animations = <int, Animation<double>>{};
await tester.pumpWidget( await tester.pumpWidget(
...@@ -159,7 +160,7 @@ void main() { ...@@ -159,7 +160,7 @@ void main() {
expect(animations[1]!.value, 1.0); expect(animations[1]!.value, 1.0);
}); });
testWidgets('insert', (WidgetTester tester) async { testWidgetsWithLeakTracking('insert', (WidgetTester tester) async {
final GlobalKey<SliverAnimatedListState> listKey = GlobalKey<SliverAnimatedListState>(); final GlobalKey<SliverAnimatedListState> listKey = GlobalKey<SliverAnimatedListState>();
await tester.pumpWidget( await tester.pumpWidget(
...@@ -245,7 +246,7 @@ void main() { ...@@ -245,7 +246,7 @@ void main() {
}); });
// Test for insertAllItems with SliverAnimatedList // Test for insertAllItems with SliverAnimatedList
testWidgets('insertAll', (WidgetTester tester) async { testWidgetsWithLeakTracking('insertAll', (WidgetTester tester) async {
final GlobalKey<SliverAnimatedListState> listKey = GlobalKey<SliverAnimatedListState>(); final GlobalKey<SliverAnimatedListState> listKey = GlobalKey<SliverAnimatedListState>();
await tester.pumpWidget( await tester.pumpWidget(
...@@ -302,7 +303,7 @@ void main() { ...@@ -302,7 +303,7 @@ void main() {
}); });
// Test for removeAllItems with SliverAnimatedList // Test for removeAllItems with SliverAnimatedList
testWidgets('remove', (WidgetTester tester) async { testWidgetsWithLeakTracking('remove', (WidgetTester tester) async {
final GlobalKey<SliverAnimatedListState> listKey = GlobalKey<SliverAnimatedListState>(); final GlobalKey<SliverAnimatedListState> listKey = GlobalKey<SliverAnimatedListState>();
final List<int> items = <int>[0, 1, 2]; final List<int> items = <int>[0, 1, 2];
...@@ -379,7 +380,7 @@ void main() { ...@@ -379,7 +380,7 @@ void main() {
}); });
// Test for removeAllItems with SliverAnimatedList // Test for removeAllItems with SliverAnimatedList
testWidgets('removeAll', (WidgetTester tester) async { testWidgetsWithLeakTracking('removeAll', (WidgetTester tester) async {
final GlobalKey<SliverAnimatedListState> listKey = GlobalKey<SliverAnimatedListState>(); final GlobalKey<SliverAnimatedListState> listKey = GlobalKey<SliverAnimatedListState>();
final List<int> items = <int>[0, 1, 2]; final List<int> items = <int>[0, 1, 2];
...@@ -429,7 +430,7 @@ void main() { ...@@ -429,7 +430,7 @@ void main() {
expect(find.text('item 2'), findsNothing); expect(find.text('item 2'), findsNothing);
}); });
testWidgets('works in combination with other slivers', (WidgetTester tester) async { testWidgetsWithLeakTracking('works in combination with other slivers', (WidgetTester tester) async {
final GlobalKey<SliverAnimatedListState> listKey = GlobalKey<SliverAnimatedListState>(); final GlobalKey<SliverAnimatedListState> listKey = GlobalKey<SliverAnimatedListState>();
await tester.pumpWidget( await tester.pumpWidget(
...@@ -494,7 +495,7 @@ void main() { ...@@ -494,7 +495,7 @@ void main() {
expect(tester.getTopLeft(find.text('item 0')).dy, 200); expect(tester.getTopLeft(find.text('item 0')).dy, 200);
}); });
testWidgets('passes correctly derived index of findChildIndexCallback to the inner SliverChildBuilderDelegate', (WidgetTester tester) async { testWidgetsWithLeakTracking('passes correctly derived index of findChildIndexCallback to the inner SliverChildBuilderDelegate', (WidgetTester tester) async {
final List<int> items = <int>[0, 1, 2, 3]; final List<int> items = <int>[0, 1, 2, 3];
final GlobalKey<SliverAnimatedListState> listKey = GlobalKey<SliverAnimatedListState>(); final GlobalKey<SliverAnimatedListState> listKey = GlobalKey<SliverAnimatedListState>();
...@@ -556,7 +557,7 @@ void main() { ...@@ -556,7 +557,7 @@ void main() {
}); });
}); });
testWidgets( testWidgetsWithLeakTracking(
'AnimatedList.of() and maybeOf called with a context that does not contain AnimatedList', 'AnimatedList.of() and maybeOf called with a context that does not contain AnimatedList',
(WidgetTester tester) async { (WidgetTester tester) async {
final GlobalKey key = GlobalKey(); final GlobalKey key = GlobalKey();
...@@ -601,7 +602,7 @@ void main() { ...@@ -601,7 +602,7 @@ void main() {
}, },
); );
testWidgets('AnimatedList.clipBehavior is forwarded to its inner CustomScrollView', (WidgetTester tester) async { testWidgetsWithLeakTracking('AnimatedList.clipBehavior is forwarded to its inner CustomScrollView', (WidgetTester tester) async {
const Clip clipBehavior = Clip.none; const Clip clipBehavior = Clip.none;
await tester.pumpWidget( await tester.pumpWidget(
...@@ -625,7 +626,7 @@ void main() { ...@@ -625,7 +626,7 @@ void main() {
expect(tester.widget<CustomScrollView>(find.byType(CustomScrollView)).clipBehavior, clipBehavior); expect(tester.widget<CustomScrollView>(find.byType(CustomScrollView)).clipBehavior, clipBehavior);
}); });
testWidgets('AnimatedList.shrinkwrap is forwarded to its inner CustomScrollView', (WidgetTester tester) async { testWidgetsWithLeakTracking('AnimatedList.shrinkwrap is forwarded to its inner CustomScrollView', (WidgetTester tester) async {
// Regression test for https://github.com/flutter/flutter/issues/115040 // Regression test for https://github.com/flutter/flutter/issues/115040
final ScrollController controller = ScrollController(); final ScrollController controller = ScrollController();
await tester.pumpWidget( await tester.pumpWidget(
...@@ -650,7 +651,7 @@ void main() { ...@@ -650,7 +651,7 @@ void main() {
expect(tester.widget<CustomScrollView>(find.byType(CustomScrollView)).shrinkWrap, true); expect(tester.widget<CustomScrollView>(find.byType(CustomScrollView)).shrinkWrap, true);
}); });
testWidgets('AnimatedList applies MediaQuery padding', (WidgetTester tester) async { testWidgetsWithLeakTracking('AnimatedList applies MediaQuery padding', (WidgetTester tester) async {
const EdgeInsets padding = EdgeInsets.all(30.0); const EdgeInsets padding = EdgeInsets.all(30.0);
EdgeInsets? innerMediaQueryPadding; EdgeInsets? innerMediaQueryPadding;
await tester.pumpWidget( await tester.pumpWidget(
......
...@@ -5,9 +5,10 @@ ...@@ -5,9 +5,10 @@
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter/rendering.dart'; import 'package:flutter/rendering.dart';
import 'package:flutter_test/flutter_test.dart'; import 'package:flutter_test/flutter_test.dart';
import 'package:leak_tracker_flutter_testing/leak_tracker_flutter_testing.dart';
void main() { void main() {
testWidgets('RenderAnimatedOpacityMixin does not drop layer when animating to 1', (WidgetTester tester) async { testWidgetsWithLeakTracking('RenderAnimatedOpacityMixin does not drop layer when animating to 1', (WidgetTester tester) async {
RenderTestObject.paintCount = 0; RenderTestObject.paintCount = 0;
final AnimationController controller = AnimationController(vsync: const TestVSync(), duration: const Duration(seconds: 1)); final AnimationController controller = AnimationController(vsync: const TestVSync(), duration: const Duration(seconds: 1));
final Tween<double> opacityTween = Tween<double>(begin: 0, end: 1); final Tween<double> opacityTween = Tween<double>(begin: 0, end: 1);
...@@ -40,7 +41,7 @@ void main() { ...@@ -40,7 +41,7 @@ void main() {
expect(RenderTestObject.paintCount, 1); expect(RenderTestObject.paintCount, 1);
}); });
testWidgets('RenderAnimatedOpacityMixin avoids repainting child as it animates', (WidgetTester tester) async { testWidgetsWithLeakTracking('RenderAnimatedOpacityMixin avoids repainting child as it animates', (WidgetTester tester) async {
RenderTestObject.paintCount = 0; RenderTestObject.paintCount = 0;
final AnimationController controller = AnimationController(vsync: const TestVSync(), duration: const Duration(seconds: 1)); final AnimationController controller = AnimationController(vsync: const TestVSync(), duration: const Duration(seconds: 1));
final Tween<double> opacityTween = Tween<double>(begin: 0, end: 0.99); // Layer is dropped at 1 final Tween<double> opacityTween = Tween<double>(begin: 0, end: 0.99); // Layer is dropped at 1
...@@ -73,7 +74,7 @@ void main() { ...@@ -73,7 +74,7 @@ void main() {
expect(RenderTestObject.paintCount, 1); expect(RenderTestObject.paintCount, 1);
}); });
testWidgets('RenderAnimatedOpacityMixin allows opacity layer to be disposed when animating to 0 opacity', (WidgetTester tester) async { testWidgetsWithLeakTracking('RenderAnimatedOpacityMixin allows opacity layer to be disposed when animating to 0 opacity', (WidgetTester tester) async {
RenderTestObject.paintCount = 0; RenderTestObject.paintCount = 0;
final AnimationController controller = AnimationController(vsync: const TestVSync(), duration: const Duration(seconds: 1)); final AnimationController controller = AnimationController(vsync: const TestVSync(), duration: const Duration(seconds: 1));
final Tween<double> opacityTween = Tween<double>(begin: 0.99, end: 0); final Tween<double> opacityTween = Tween<double>(begin: 0.99, end: 0);
......
...@@ -4,9 +4,10 @@ ...@@ -4,9 +4,10 @@
import 'package:flutter/widgets.dart'; import 'package:flutter/widgets.dart';
import 'package:flutter_test/flutter_test.dart'; import 'package:flutter_test/flutter_test.dart';
import 'package:leak_tracker_flutter_testing/leak_tracker_flutter_testing.dart';
void main() { void main() {
testWidgets('AnimatedPadding.debugFillProperties', (WidgetTester tester) async { testWidgetsWithLeakTracking('AnimatedPadding.debugFillProperties', (WidgetTester tester) async {
final AnimatedPadding padding = AnimatedPadding( final AnimatedPadding padding = AnimatedPadding(
padding: const EdgeInsets.all(7.0), padding: const EdgeInsets.all(7.0),
curve: Curves.ease, curve: Curves.ease,
...@@ -16,7 +17,7 @@ void main() { ...@@ -16,7 +17,7 @@ void main() {
expect(padding, hasOneLineDescription); expect(padding, hasOneLineDescription);
}); });
testWidgets('AnimatedPadding padding visual-to-directional animation', (WidgetTester tester) async { testWidgetsWithLeakTracking('AnimatedPadding padding visual-to-directional animation', (WidgetTester tester) async {
final Key target = UniqueKey(); final Key target = UniqueKey();
await tester.pumpWidget( await tester.pumpWidget(
...@@ -58,7 +59,7 @@ void main() { ...@@ -58,7 +59,7 @@ void main() {
expect(tester.getTopRight(find.byKey(target)), const Offset(700.0, 0.0)); expect(tester.getTopRight(find.byKey(target)), const Offset(700.0, 0.0));
}); });
testWidgets('AnimatedPadding animated padding clamped to positive values', (WidgetTester tester) async { testWidgetsWithLeakTracking('AnimatedPadding animated padding clamped to positive values', (WidgetTester tester) async {
final Key target = UniqueKey(); final Key target = UniqueKey();
await tester.pumpWidget( await tester.pumpWidget(
......
...@@ -4,9 +4,10 @@ ...@@ -4,9 +4,10 @@
import 'package:flutter/widgets.dart'; import 'package:flutter/widgets.dart';
import 'package:flutter_test/flutter_test.dart'; import 'package:flutter_test/flutter_test.dart';
import 'package:leak_tracker_flutter_testing/leak_tracker_flutter_testing.dart';
void main() { void main() {
testWidgets('AnimatedPositioned.fromRect control test', (WidgetTester tester) async { testWidgetsWithLeakTracking('AnimatedPositioned.fromRect control test', (WidgetTester tester) async {
final AnimatedPositioned positioned = AnimatedPositioned.fromRect( final AnimatedPositioned positioned = AnimatedPositioned.fromRect(
rect: const Rect.fromLTWH(7.0, 5.0, 12.0, 16.0), rect: const Rect.fromLTWH(7.0, 5.0, 12.0, 16.0),
duration: const Duration(milliseconds: 200), duration: const Duration(milliseconds: 200),
...@@ -20,7 +21,7 @@ void main() { ...@@ -20,7 +21,7 @@ void main() {
expect(positioned, hasOneLineDescription); expect(positioned, hasOneLineDescription);
}); });
testWidgets('AnimatedPositioned - basics (VISUAL)', (WidgetTester tester) async { testWidgetsWithLeakTracking('AnimatedPositioned - basics (VISUAL)', (WidgetTester tester) async {
final GlobalKey key = GlobalKey(); final GlobalKey key = GlobalKey();
RenderBox box; RenderBox box;
...@@ -102,7 +103,7 @@ void main() { ...@@ -102,7 +103,7 @@ void main() {
); );
}); });
testWidgets('AnimatedPositionedDirectional - basics (LTR)', (WidgetTester tester) async { testWidgetsWithLeakTracking('AnimatedPositionedDirectional - basics (LTR)', (WidgetTester tester) async {
final GlobalKey key = GlobalKey(); final GlobalKey key = GlobalKey();
RenderBox box; RenderBox box;
...@@ -188,7 +189,7 @@ void main() { ...@@ -188,7 +189,7 @@ void main() {
); );
}); });
testWidgets('AnimatedPositionedDirectional - basics (RTL)', (WidgetTester tester) async { testWidgetsWithLeakTracking('AnimatedPositionedDirectional - basics (RTL)', (WidgetTester tester) async {
final GlobalKey key = GlobalKey(); final GlobalKey key = GlobalKey();
RenderBox box; RenderBox box;
...@@ -274,7 +275,7 @@ void main() { ...@@ -274,7 +275,7 @@ void main() {
); );
}); });
testWidgets('AnimatedPositioned - interrupted animation (VISUAL)', (WidgetTester tester) async { testWidgetsWithLeakTracking('AnimatedPositioned - interrupted animation (VISUAL)', (WidgetTester tester) async {
final GlobalKey key = GlobalKey(); final GlobalKey key = GlobalKey();
RenderBox box; RenderBox box;
...@@ -357,7 +358,7 @@ void main() { ...@@ -357,7 +358,7 @@ void main() {
expect(box.localToGlobal(box.size.center(Offset.zero)), equals(const Offset(200.0, 200.0))); expect(box.localToGlobal(box.size.center(Offset.zero)), equals(const Offset(200.0, 200.0)));
}); });
testWidgets('AnimatedPositioned - switching variables (VISUAL)', (WidgetTester tester) async { testWidgetsWithLeakTracking('AnimatedPositioned - switching variables (VISUAL)', (WidgetTester tester) async {
final GlobalKey key = GlobalKey(); final GlobalKey key = GlobalKey();
RenderBox box; RenderBox box;
...@@ -416,7 +417,7 @@ void main() { ...@@ -416,7 +417,7 @@ void main() {
expect(box.localToGlobal(box.size.center(Offset.zero)), equals(const Offset(350.0, 150.0))); expect(box.localToGlobal(box.size.center(Offset.zero)), equals(const Offset(350.0, 150.0)));
}); });
testWidgets('AnimatedPositionedDirectional - interrupted animation (LTR)', (WidgetTester tester) async { testWidgetsWithLeakTracking('AnimatedPositionedDirectional - interrupted animation (LTR)', (WidgetTester tester) async {
final GlobalKey key = GlobalKey(); final GlobalKey key = GlobalKey();
RenderBox box; RenderBox box;
...@@ -505,7 +506,7 @@ void main() { ...@@ -505,7 +506,7 @@ void main() {
expect(box.localToGlobal(box.size.center(Offset.zero)), equals(const Offset(200.0, 200.0))); expect(box.localToGlobal(box.size.center(Offset.zero)), equals(const Offset(200.0, 200.0)));
}); });
testWidgets('AnimatedPositionedDirectional - switching variables (LTR)', (WidgetTester tester) async { testWidgetsWithLeakTracking('AnimatedPositionedDirectional - switching variables (LTR)', (WidgetTester tester) async {
final GlobalKey key = GlobalKey(); final GlobalKey key = GlobalKey();
RenderBox box; RenderBox box;
...@@ -568,7 +569,7 @@ void main() { ...@@ -568,7 +569,7 @@ void main() {
expect(box.localToGlobal(box.size.center(Offset.zero)), equals(const Offset(350.0, 150.0))); expect(box.localToGlobal(box.size.center(Offset.zero)), equals(const Offset(350.0, 150.0)));
}); });
testWidgets('AnimatedPositionedDirectional - interrupted animation (RTL)', (WidgetTester tester) async { testWidgetsWithLeakTracking('AnimatedPositionedDirectional - interrupted animation (RTL)', (WidgetTester tester) async {
final GlobalKey key = GlobalKey(); final GlobalKey key = GlobalKey();
RenderBox box; RenderBox box;
...@@ -657,7 +658,7 @@ void main() { ...@@ -657,7 +658,7 @@ void main() {
expect(box.localToGlobal(box.size.center(Offset.zero)), equals(const Offset(600.0, 200.0))); expect(box.localToGlobal(box.size.center(Offset.zero)), equals(const Offset(600.0, 200.0)));
}); });
testWidgets('AnimatedPositionedDirectional - switching variables (RTL)', (WidgetTester tester) async { testWidgetsWithLeakTracking('AnimatedPositionedDirectional - switching variables (RTL)', (WidgetTester tester) async {
final GlobalKey key = GlobalKey(); final GlobalKey key = GlobalKey();
RenderBox box; RenderBox box;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment