@@ -890,7 +890,6 @@ abstract class WidgetController {
890890 assert (kDragSlopDefault > kTouchSlop);
891891 return TestAsyncUtils .guard <void >(() async {
892892 final TestGesture gesture = await startGesture (startLocation, pointer: pointer, buttons: buttons, kind: kind);
893- assert (gesture != null );
894893
895894 final double xSign = offset.dx.sign;
896895 final double ySign = offset.dy.sign;
@@ -1120,7 +1119,6 @@ abstract class WidgetController {
11201119 PointerDeviceKind kind = PointerDeviceKind .touch,
11211120 int buttons = kPrimaryButton,
11221121 }) async {
1123- assert (downLocation != null );
11241122 final TestGesture result = await createGesture (
11251123 pointer: pointer,
11261124 kind: kind,
@@ -1268,9 +1266,7 @@ abstract class WidgetController {
12681266 }
12691267 if (! found) {
12701268 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);
12741270 if (hitTestWarningShouldBeFatal) {
12751271 throw FlutterError .fromParts (< DiagnosticsNode > [
12761272 ErrorSummary ('Finder specifies a widget that would not receive pointer events.' ),
@@ -1349,7 +1345,6 @@ abstract class WidgetController {
13491345 String ? character,
13501346 PhysicalKeyboardKey ? physicalKey
13511347 }) async {
1352- assert (platform != null );
13531348 final bool handled = await simulateKeyDownEvent (key, platform: platform, character: character, physicalKey: physicalKey);
13541349 // Internally wrapped in async guard.
13551350 await simulateKeyUpEvent (key, platform: platform, physicalKey: physicalKey);
@@ -1393,7 +1388,6 @@ abstract class WidgetController {
13931388 String ? character,
13941389 PhysicalKeyboardKey ? physicalKey
13951390 }) async {
1396- assert (platform != null );
13971391 // Internally wrapped in async guard.
13981392 return simulateKeyDownEvent (key, platform: platform, character: character, physicalKey: physicalKey);
13991393 }
@@ -1427,7 +1421,6 @@ abstract class WidgetController {
14271421 String platform = _defaultPlatform,
14281422 PhysicalKeyboardKey ? physicalKey
14291423 }) async {
1430- assert (platform != null );
14311424 // Internally wrapped in async guard.
14321425 return simulateKeyUpEvent (key, platform: platform, physicalKey: physicalKey);
14331426 }
@@ -1469,7 +1462,6 @@ abstract class WidgetController {
14691462 String ? character,
14701463 PhysicalKeyboardKey ? physicalKey
14711464 }) async {
1472- assert (platform != null );
14731465 // Internally wrapped in async guard.
14741466 return simulateKeyRepeatEvent (key, platform: platform, character: character, physicalKey: physicalKey);
14751467 }
@@ -1627,7 +1619,6 @@ class LiveWidgetController extends WidgetController {
16271619 Future <int > pumpAndSettle ([
16281620 Duration duration = const Duration (milliseconds: 100 ),
16291621 ]) {
1630- assert (duration != null );
16311622 assert (duration > Duration .zero);
16321623 return TestAsyncUtils .guard <int >(() async {
16331624 int count = 0 ;
@@ -1641,7 +1632,6 @@ class LiveWidgetController extends WidgetController {
16411632
16421633 @override
16431634 Future <List <Duration >> handlePointerEventRecord (List <PointerEventRecord > records) {
1644- assert (records != null );
16451635 assert (records.isNotEmpty);
16461636 return TestAsyncUtils .guard <List <Duration >>(() async {
16471637 final List <Duration > handleTimeStampDiff = < Duration > [];
0 commit comments