blob: 33959ac503c280565bec5aec6f8bd55ffa115cb8 [file]
// Copyright 2021 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 'package:url_launcher_platform_interface/link.dart';
import 'package:url_launcher_platform_interface/url_launcher_platform_interface.dart';
class FakeUrlLauncher extends UrlLauncherPlatform {
final List<String> launches = <String>[];
@override
Future<bool> canLaunch(String url) {
throw UnimplementedError('canLaunch() has not been implemented.');
}
@override
LinkDelegate? get linkDelegate => null;
@override
Future<bool> launch(
String url, {
required bool useSafariVC,
required bool useWebView,
required bool enableJavaScript,
required bool enableDomStorage,
required bool universalLinksOnly,
required Map<String, String> headers,
String? webOnlyWindowName,
}) {
launches.add(url);
return Future<bool>.value(true);
}
@override
Future<void> closeWebView() {
throw UnimplementedError('closeWebView() has not been implemented.');
}
}