@@ -890,7 +890,6 @@ abstract class WidgetController {
890
890
assert (kDragSlopDefault > kTouchSlop);
891
891
return TestAsyncUtils .guard <void >(() async {
892
892
final TestGesture gesture = await startGesture (startLocation, pointer: pointer, buttons: buttons, kind: kind);
893
- assert (gesture != null );
894
893
895
894
final double xSign = offset.dx.sign;
896
895
final double ySign = offset.dy.sign;
@@ -1120,7 +1119,6 @@ abstract class WidgetController {
1120
1119
PointerDeviceKind kind = PointerDeviceKind .touch,
1121
1120
int buttons = kPrimaryButton,
1122
1121
}) async {
1123
- assert (downLocation != null );
1124
1122
final TestGesture result = await createGesture (
1125
1123
pointer: pointer,
1126
1124
kind: kind,
@@ -1268,9 +1266,7 @@ abstract class WidgetController {
1268
1266
}
1269
1267
if (! found) {
1270
1268
bool outOfBounds = false ;
1271
- if (binding.renderView != null && binding.renderView.size != null ) {
1272
- outOfBounds = ! (Offset .zero & binding.renderView.size).contains (location);
1273
- }
1269
+ outOfBounds = ! (Offset .zero & binding.renderView.size).contains (location);
1274
1270
if (hitTestWarningShouldBeFatal) {
1275
1271
throw FlutterError .fromParts (< DiagnosticsNode > [
1276
1272
ErrorSummary ('Finder specifies a widget that would not receive pointer events.' ),
@@ -1349,7 +1345,6 @@ abstract class WidgetController {
1349
1345
String ? character,
1350
1346
PhysicalKeyboardKey ? physicalKey
1351
1347
}) async {
1352
- assert (platform != null );
1353
1348
final bool handled = await simulateKeyDownEvent (key, platform: platform, character: character, physicalKey: physicalKey);
1354
1349
// Internally wrapped in async guard.
1355
1350
await simulateKeyUpEvent (key, platform: platform, physicalKey: physicalKey);
@@ -1393,7 +1388,6 @@ abstract class WidgetController {
1393
1388
String ? character,
1394
1389
PhysicalKeyboardKey ? physicalKey
1395
1390
}) async {
1396
- assert (platform != null );
1397
1391
// Internally wrapped in async guard.
1398
1392
return simulateKeyDownEvent (key, platform: platform, character: character, physicalKey: physicalKey);
1399
1393
}
@@ -1427,7 +1421,6 @@ abstract class WidgetController {
1427
1421
String platform = _defaultPlatform,
1428
1422
PhysicalKeyboardKey ? physicalKey
1429
1423
}) async {
1430
- assert (platform != null );
1431
1424
// Internally wrapped in async guard.
1432
1425
return simulateKeyUpEvent (key, platform: platform, physicalKey: physicalKey);
1433
1426
}
@@ -1469,7 +1462,6 @@ abstract class WidgetController {
1469
1462
String ? character,
1470
1463
PhysicalKeyboardKey ? physicalKey
1471
1464
}) async {
1472
- assert (platform != null );
1473
1465
// Internally wrapped in async guard.
1474
1466
return simulateKeyRepeatEvent (key, platform: platform, character: character, physicalKey: physicalKey);
1475
1467
}
@@ -1627,7 +1619,6 @@ class LiveWidgetController extends WidgetController {
1627
1619
Future <int > pumpAndSettle ([
1628
1620
Duration duration = const Duration (milliseconds: 100 ),
1629
1621
]) {
1630
- assert (duration != null );
1631
1622
assert (duration > Duration .zero);
1632
1623
return TestAsyncUtils .guard <int >(() async {
1633
1624
int count = 0 ;
@@ -1641,7 +1632,6 @@ class LiveWidgetController extends WidgetController {
1641
1632
1642
1633
@override
1643
1634
Future <List <Duration >> handlePointerEventRecord (List <PointerEventRecord > records) {
1644
- assert (records != null );
1645
1635
assert (records.isNotEmpty);
1646
1636
return TestAsyncUtils .guard <List <Duration >>(() async {
1647
1637
final List <Duration > handleTimeStampDiff = < Duration > [];
0 commit comments