fixes to anticipate next Dart linter release (#127211)

The upcoming linter release notices null literals as unnecessary argument values and flags more `type_literal_in_constant_pattern` cases. 

See breakages: https://logs.chromium.org/logs/dart/buildbucket/cr-buildbucket/8780744067138629361/+/u/analyze_flutter_flutter/stdout
This commit is contained in:
Phil Quitslund
2023-05-19 14:27:24 -07:00
committed by GitHub
parent e8b7889dfd
commit d0c0439b8d
13 changed files with 26 additions and 26 deletions

View File

@@ -1624,10 +1624,10 @@ class _MatchAnythingExceptClip extends _FailWithDescriptionMatcher {
final RenderObject renderObject = nodes.single.renderObject!;
switch (renderObject.runtimeType) {
case RenderClipPath:
case RenderClipOval:
case RenderClipRect:
case RenderClipRRect:
case const (RenderClipPath):
case const (RenderClipOval):
case const (RenderClipRect):
case const (RenderClipRRect):
return failWithDescription(matchState, 'had a root render object of type: ${renderObject.runtimeType}');
default:
return true;

View File

@@ -100,11 +100,11 @@ class TestPointer {
_buttons = buttons;
}
switch (event.runtimeType) {
case PointerDownEvent:
case const (PointerDownEvent):
assert(!isDown);
_isDown = true;
case PointerUpEvent:
case PointerCancelEvent:
case const (PointerUpEvent):
case const (PointerCancelEvent):
assert(isDown);
_isDown = false;
default: