-
Notifications
You must be signed in to change notification settings - Fork 97
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(lints): unnecessary_string_escapes and prefer_function_declaratio…
…ns_over_variables rules (#160) * fix(lints): unnecessary_string_escapes rule * fix(lints): prefer_function_declarations_over_variables rule * Remove prefer_function_declarations_over_variables rule * Formatted the code * Remove the #prefer_const_constructors comment * Formatted the code for prefer_function_declarations_over_variables rule * Formatted the 3 files
- Loading branch information
1 parent
36edacf
commit fb4df78
Showing
5 changed files
with
22 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -42,10 +42,10 @@ void main() { | |
await _pumpSignupView(tester); | ||
await tester.pumpAndSettle(); | ||
|
||
var _signupImagePredicate = | ||
(Widget widget) => widget is Image && widget.height == 300; | ||
|
||
expect(find.byWidgetPredicate(_signupImagePredicate), findsOneWidget); | ||
expect( | ||
find.byWidgetPredicate( | ||
(Widget widget) => widget is Image && widget.height == 300), | ||
findsOneWidget); | ||
expect(find.byType(CVTextField), findsNWidgets(2)); | ||
expect(find.byType(CVPasswordField), findsOneWidget); | ||
expect(find.byType(CVPrimaryButton), findsOneWidget); | ||
|
@@ -63,10 +63,10 @@ void main() { | |
await _pumpSignupView(tester); | ||
await tester.pumpAndSettle(); | ||
|
||
var _nameFieldPredicate = | ||
(Widget widget) => widget is CVTextField && widget.label == 'Name'; | ||
var _emailFieldPredicate = | ||
(Widget widget) => widget is CVTextField && widget.label == 'Email'; | ||
expect( | ||
find.byWidgetPredicate((Widget widget) => | ||
widget is CVTextField && widget.label == 'Name'), | ||
findsOneWidget); | ||
|
||
await tester.tap(find.byType(CVPrimaryButton)); | ||
await tester.pumpAndSettle(); | ||
|
@@ -77,7 +77,9 @@ void main() { | |
expect(find.text('Password can\'t be empty'), findsOneWidget); | ||
|
||
await tester.enterText( | ||
find.byWidgetPredicate(_nameFieldPredicate), 'test'); | ||
find.byWidgetPredicate((Widget widget) => | ||
widget is CVTextField && widget.label == 'Name'), | ||
'test'); | ||
await tester.tap(find.byType(CVPrimaryButton)); | ||
await tester.pumpAndSettle(); | ||
|
||
|
@@ -86,7 +88,9 @@ void main() { | |
expect(find.text('Password can\'t be empty'), findsOneWidget); | ||
|
||
await tester.enterText( | ||
find.byWidgetPredicate(_emailFieldPredicate), '[email protected]'); | ||
find.byWidgetPredicate((Widget widget) => | ||
widget is CVTextField && widget.label == 'Email'), | ||
'[email protected]'); | ||
await tester.tap(find.byType(CVPrimaryButton)); | ||
await tester.pumpAndSettle(); | ||
|
||
|