mirror of
https://github.com/JGeek00/adguard-home-manager.git
synced 2025-05-04 12:24:47 +00:00
Optimized filters screen
This commit is contained in:
parent
2afbaf1f93
commit
eb4462d4d0
23 changed files with 1445 additions and 759 deletions
|
@ -1,17 +1,30 @@
|
|||
import 'package:flutter_web_browser/flutter_web_browser.dart';
|
||||
import 'dart:io';
|
||||
|
||||
void openUrl(String url) {
|
||||
FlutterWebBrowser.openWebPage(
|
||||
url: url,
|
||||
customTabsOptions: const CustomTabsOptions(
|
||||
instantAppsEnabled: true,
|
||||
showTitle: true,
|
||||
urlBarHidingEnabled: false,
|
||||
),
|
||||
safariVCOptions: const SafariViewControllerOptions(
|
||||
barCollapsingEnabled: true,
|
||||
dismissButtonStyle: SafariViewControllerDismissButtonStyle.close,
|
||||
modalPresentationCapturesStatusBarAppearance: true,
|
||||
)
|
||||
);
|
||||
}
|
||||
import 'package:flutter_web_browser/flutter_web_browser.dart';
|
||||
import 'package:url_launcher/url_launcher.dart';
|
||||
|
||||
void openUrl(String url) async {
|
||||
if (Platform.isAndroid || Platform.isIOS) {
|
||||
FlutterWebBrowser.openWebPage(
|
||||
url: url,
|
||||
customTabsOptions: const CustomTabsOptions(
|
||||
instantAppsEnabled: true,
|
||||
showTitle: true,
|
||||
urlBarHidingEnabled: false,
|
||||
),
|
||||
safariVCOptions: const SafariViewControllerOptions(
|
||||
barCollapsingEnabled: true,
|
||||
dismissButtonStyle: SafariViewControllerDismissButtonStyle.close,
|
||||
modalPresentationCapturesStatusBarAppearance: true,
|
||||
)
|
||||
);
|
||||
}
|
||||
else {
|
||||
final uri = Uri.parse(url);
|
||||
if (await canLaunchUrl(uri)) {
|
||||
await launchUrl(uri);
|
||||
} else {
|
||||
throw 'Could not launch $url';
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue