back method

Future<void> back({
  1. Shot? shot,
  2. Settle? settle,
})

The platform's back gesture — Android's button, iOS's edge swipe, the thing that pops a route without a widget to tap.

Sent as the engine sends it, down flutter/navigation, rather than through the binding's own handler: the message is the public, sanctioned route, and it exercises the app's PopScopes on the way in.

Implementation

Future<void> back({Shot? shot, Settle? settle}) => _step(
  shot,
  settle,
  () => tester.binding.defaultBinaryMessenger.handlePlatformMessage(
    'flutter/navigation',
    const JSONMethodCodec().encodeMethodCall(const MethodCall('popRoute')),
    null,
  ),
  verb: 'back',
);