File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -4,6 +4,9 @@ import 'package:flutter_test/flutter_test.dart';
44import '../lib/flutter_switch.dart' ;
55
66void main () {
7+ final alignToggleIndicatorFinder = find.byWidgetPredicate (
8+ (widget) => widget is Align && widget.child is Container );
9+
710 testWidgets (
811 "displays the toggle indicator on the right if the given value is true" ,
912 (WidgetTester tester) async {
@@ -13,7 +16,7 @@ void main() {
1316 ),
1417 );
1518
16- final align = tester.widget <Align >(find. byType ( Align ) );
19+ final align = tester.widget <Align >(alignToggleIndicatorFinder );
1720
1821 expect (align.alignment, equals (Alignment .centerRight));
1922 },
@@ -28,7 +31,7 @@ void main() {
2831 ),
2932 );
3033
31- final align = tester.widget <Align >(find. byType ( Align ) );
34+ final align = tester.widget <Align >(alignToggleIndicatorFinder );
3235
3336 expect (align.alignment, equals (Alignment .centerLeft));
3437 },
You can’t perform that action at this time.
0 commit comments