From 5e131754ee0b126eb8b3b0f4a32ff532f4a9022a Mon Sep 17 00:00:00 2001 From: Pascal Welsch Date: Thu, 17 Aug 2023 15:58:33 +0200 Subject: [PATCH] Analysis --- lib/spot.dart | 8 ++++---- lib/src/effective_text.dart | 1 - lib/src/selectors.dart | 12 ++++++------ test/selectors/multi_matchers_test.dart | 4 ++-- test/selectors/spot_key_test.dart | 4 ++-- test/widgets/text_test.dart | 3 ++- 6 files changed, 16 insertions(+), 16 deletions(-) diff --git a/lib/spot.dart b/lib/spot.dart index 2057179c..0c2547de 100644 --- a/lib/spot.dart +++ b/lib/spot.dart @@ -14,13 +14,13 @@ export 'package:spot/src/checks/checks.dart' it; export 'package:spot/src/checks/context.dart' show - Subject, - Context, - ConditionSubject, Condition, + ConditionSubject, + Context, ContextExtension, + Extracted, Rejection, - Extracted; + Subject; export 'package:spot/src/default_selectors.dart'; export 'package:spot/src/effective_text.dart'; diff --git a/lib/src/effective_text.dart b/lib/src/effective_text.dart index 3569cb64..9701cb70 100644 --- a/lib/src/effective_text.dart +++ b/lib/src/effective_text.dart @@ -1,6 +1,5 @@ import 'package:flutter/widgets.dart'; import 'package:spot/spot.dart'; -import 'package:spot/src/checks/src/checks.dart'; import 'package:spot/src/element_extensions.dart'; extension EffectiveTextMatcher on WidgetMatcher { diff --git a/lib/src/selectors.dart b/lib/src/selectors.dart index 6c317f61..23c85ba0 100644 --- a/lib/src/selectors.dart +++ b/lib/src/selectors.dart @@ -87,7 +87,7 @@ mixin Selectors { PredicateWithDescription( (Element e) => identical(e.widget, widget), description: 'Widget === $widget', - ) + ), ], parents: [if (self != null) self!, ...parents], children: children, @@ -336,7 +336,7 @@ extension SelectorQueries on Selectors { PredicateWithDescription( (Element e) => predicate(e), description: description, - ) + ), ], ); } @@ -356,7 +356,7 @@ extension SelectorQueries on Selectors { return false; }, description: description, - ) + ), ], ); } @@ -397,7 +397,7 @@ extension WidgetMatcherExtensions on WidgetMatcher { if (prop.value is! T) { return Extracted.rejection( which: [ - 'Has no prop "$propName" of type "$T", the type is "${prop.value.runtimeType}"' + 'Has no prop "$propName" of type "$T", the type is "${prop.value.runtimeType}"', ], ); } @@ -637,7 +637,7 @@ class WidgetSelector with Selectors { PredicateWithDescription( (e) => true, description: 'any Widget', - ) + ), ], ); @@ -810,7 +810,7 @@ class WidgetSelector with Selectors { if (prop.value is! T) { return Extracted.rejection( which: [ - 'Has no prop "$propName" of type "$T", the type is "${prop.value.runtimeType}"' + 'Has no prop "$propName" of type "$T", the type is "${prop.value.runtimeType}"', ], ); } diff --git a/test/selectors/multi_matchers_test.dart b/test/selectors/multi_matchers_test.dart index 100d756f..584f4eb5 100644 --- a/test/selectors/multi_matchers_test.dart +++ b/test/selectors/multi_matchers_test.dart @@ -102,7 +102,7 @@ void main() { icon.hasColorWhere((color) => color.equals(Colors.black)); }), throwsSpotErrorContaining([ - "Expected that all candidates fulfill matcher 'property color that: equals ', but only 0 of 2 did." + "Expected that all candidates fulfill matcher 'property color that: equals ', but only 0 of 2 did.", ]), ); }); @@ -139,7 +139,7 @@ void main() { icon.hasColorWhere((color) => color.equals(Colors.black)); }), throwsSpotErrorContaining([ - "Expected that at least one candidate fulfills matcher 'property color that: equals ', but none did." + "Expected that at least one candidate fulfills matcher 'property color that: equals ', but none did.", ]), ); }); diff --git a/test/selectors/spot_key_test.dart b/test/selectors/spot_key_test.dart index 2a1c38b4..09950443 100644 --- a/test/selectors/spot_key_test.dart +++ b/test/selectors/spot_key_test.dart @@ -102,7 +102,7 @@ void main() { Text('x', key: key1), Text('y', key: key2), ], - ) + ), ], ), ), @@ -132,7 +132,7 @@ void main() { Text('x', key: key1), Text('y', key: key2), ], - ) + ), ], ), ), diff --git a/test/widgets/text_test.dart b/test/widgets/text_test.dart index 718df4c9..868fe1cb 100644 --- a/test/widgets/text_test.dart +++ b/test/widgets/text_test.dart @@ -43,6 +43,7 @@ void main() { await widgetTester.pumpWidget( MaterialApp( home: Column( + // ignore: require_trailing_commas children: [ EditableText( controller: TextEditingController(text: 'foo'), @@ -50,7 +51,7 @@ void main() { style: TextStyle(), cursorColor: Colors.black, backgroundCursorColor: Colors.black, - ) + ), ], ), ),