// Copyright 2014 The Flutter Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. import 'dart:async'; import 'package:flutter/services.dart'; import 'test_step.dart'; Future systemNavigatorPop() { const channel = BasicMessageChannel('navigation-test', StringCodec()); final completer = Completer(); channel.setMessageHandler((String? message) async { completer.complete(const TestStepResult('System navigation pop', '', TestStatus.ok)); return ''; }); SystemNavigator.pop(); return completer.future; }