Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
e41ea0e
add android show title customization functionality
Alex-Usmanov Oct 17, 2023
fb67692
Pass the parameter
Alex-Usmanov Oct 17, 2023
21cd06f
Dependency overrides
Alex-Usmanov Oct 17, 2023
276c08b
Add tests for native side
Alex-Usmanov Oct 17, 2023
1897451
Cover dart side with tests
Alex-Usmanov Oct 17, 2023
5cd1709
Format
Alex-Usmanov Oct 17, 2023
bc943c5
Reduce code repetition
Alex-Usmanov Oct 17, 2023
d6306ba
Revert todo change
Alex-Usmanov Oct 18, 2023
f59475b
Wrap browser customization values in another configuration object
Alex-Usmanov Oct 20, 2023
157343b
Remove deps overrides
Alex-Usmanov Oct 20, 2023
ae20b08
Revert more deps overrides
Alex-Usmanov Oct 20, 2023
214b0a9
Revert web as well
Alex-Usmanov Oct 20, 2023
cd7dfc9
Revert go_router
Alex-Usmanov Oct 20, 2023
d205c7c
Merge branch 'main' into main
Alex-Usmanov Oct 20, 2023
5eef662
Merge remote-tracking branch 'upstream/main'
Alex-Usmanov Oct 27, 2023
c86ff6e
Format files
Alex-Usmanov Oct 27, 2023
92b2197
Fix tests
Alex-Usmanov Oct 27, 2023
425617e
Add browseroptions to launchUrlString & add more tests
Alex-Usmanov Oct 30, 2023
ece2b78
Fix docstrings
Alex-Usmanov Dec 7, 2023
3ddd644
Revert test format change
Alex-Usmanov Dec 7, 2023
cd361d0
Fix tests
Alex-Usmanov Dec 8, 2023
f0017b7
Version bumps and changelogs
Alex-Usmanov Dec 8, 2023
6105671
Merge remote-tracking branch 'upstream/main'
Alex-Usmanov Dec 8, 2023
a50be0f
Return path-based dependencies
Alex-Usmanov Dec 8, 2023
ef9c154
Add licences
Alex-Usmanov Dec 11, 2023
f4b08cb
Merge remote-tracking branch 'upstream/main'
Alex-Usmanov Dec 11, 2023
80d439b
Fix documentation & changelog
Alex-Usmanov Dec 26, 2023
992d38e
Merge remote-tracking branch 'upstream/main'
Alex-Usmanov Dec 26, 2023
6973c07
Revert everything except for url_launcher_platform_interface
Alex-Usmanov Dec 26, 2023
193c076
Add backticks to SFSafariViewController in platform interface changelog
Alex-Usmanov Jan 4, 2024
b399c9b
Merge remote-tracking branch 'upstream/main'
Alex-Usmanov Jan 4, 2024
1ad83a2
More merging
Alex-Usmanov Jan 4, 2024
c36e5ff
Merge branch 'main' into show-title-platform-interface
Alex-Usmanov Jan 4, 2024
b24e139
Fix version
Alex-Usmanov Jan 4, 2024
eab1467
Revert android changes
Alex-Usmanov Jan 4, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 2.3.0
* Adds `InAppBrowserConfiguration` parameter to `LaunchOptions`, to configure in-app browser views, such as Android Custom Tabs or `SFSafariViewController`.
* Adds `showTitle` parameter to `InAppBrowserConfiguration` in order to control web-page title visibility.

## 2.2.1

* Updates minimum supported SDK version to Flutter 3.10/Dart 3.0.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,13 +50,26 @@ class InAppWebViewConfiguration {
final Map<String, String> headers;
}

/// Additional configuration options for [PreferredLaunchMode.inAppBrowserView].
@immutable
class InAppBrowserConfiguration {
/// Creates a new InAppBrowserConfiguration with given settings.
const InAppBrowserConfiguration({this.showTitle = false});

/// Whether or not to show the webpage title.
///
/// May not be supported on all platforms.
final bool showTitle;
}

/// Options for [launchUrl].
@immutable
class LaunchOptions {
/// Creates a new parameter object with the given options.
const LaunchOptions({
this.mode = PreferredLaunchMode.platformDefault,
this.webViewConfiguration = const InAppWebViewConfiguration(),
this.browserConfiguration = const InAppBrowserConfiguration(),
this.webOnlyWindowName,
});

Expand All @@ -66,6 +79,9 @@ class LaunchOptions {
/// Configuration for the web view in [PreferredLaunchMode.inAppWebView] mode.
final InAppWebViewConfiguration webViewConfiguration;

/// Configuration for the browser view in [PreferredLaunchMode.inAppBrowserView] mode.
final InAppBrowserConfiguration browserConfiguration;

/// A web-platform-specific option to set the link target.
///
/// Default behaviour when unset should be to open the url in a new tab.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ repository: https://github.com/flutter/packages/tree/main/packages/url_launcher/
issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+url_launcher%22
# NOTE: We strongly prefer non-breaking changes, even at the expense of a
# less-clean API. See https://flutter.dev/go/platform-interface-breaking-changes
version: 2.2.1
version: 2.3.0

environment:
sdk: ">=3.0.0 <4.0.0"
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
// Copyright 2013 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:flutter_test/flutter_test.dart';
import 'package:url_launcher_platform_interface/url_launcher_platform_interface.dart';

void main() {
test('InAppBrowserConfiguration defaults to showTitle false', () {
expect(const InAppBrowserConfiguration().showTitle, false);
});

test('InAppBrowserConfiguration showTitle can be set to true', () {
expect(const InAppBrowserConfiguration(showTitle: true).showTitle, true);
});
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
// Copyright 2013 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:flutter_test/flutter_test.dart';
import 'package:url_launcher_platform_interface/url_launcher_platform_interface.dart';

void main() {
test('LaunchOptions have default InAppBrowserConfiguration when not passed',
() {
expect(
const LaunchOptions().browserConfiguration,
const InAppBrowserConfiguration(),
);
});

test('passing non-default InAppBrowserConfiguration to LaunchOptions works',
() {
const InAppBrowserConfiguration browserConfiguration =
InAppBrowserConfiguration(showTitle: true);

const LaunchOptions launchOptions = LaunchOptions(
browserConfiguration: browserConfiguration,
);

expect(launchOptions.browserConfiguration, browserConfiguration);
});
}