Changed url launcher library

This commit is contained in:
Juan Gilsanz Polo 2024-01-29 02:37:45 +01:00
parent 406f7c832f
commit a4e8694cc1
11 changed files with 79 additions and 129 deletions

View file

@ -112,7 +112,6 @@ On [this repository](https://github.com/JuanRodenas/Pihole_list) you can find a
- [dynamic color](https://pub.dev/packages/dynamic_color)
- [device info](https://pub.dev/packages/device_info)
- [fl chart](https://pub.dev/packages/fl_chart)
- [flutter web browser](https://pub.dev/packages/flutter_web_browser)
- [flutter svg](https://pub.dev/packages/flutter_svg)
- [percent indicator](https://pub.dev/packages/percent_indicator)
- [store checker](https://pub.dev/packages/store_checker)

View file

@ -2,60 +2,53 @@ PODS:
- device_info_plus (0.0.1):
- Flutter
- Flutter (1.0.0)
- flutter_custom_tabs_ios (2.0.0):
- Flutter
- flutter_native_splash (0.0.1):
- Flutter
- flutter_web_browser (0.17.1):
- Flutter
- FMDB (2.7.5):
- FMDB/standard (= 2.7.5)
- FMDB/standard (2.7.5)
- package_info_plus (0.4.5):
- Flutter
- Sentry/HybridSDK (8.17.2):
- SentryPrivate (= 8.17.2)
- Sentry/HybridSDK (8.18.0):
- SentryPrivate (= 8.18.0)
- sentry_flutter (0.0.1):
- Flutter
- FlutterMacOS
- Sentry/HybridSDK (= 8.17.2)
- SentryPrivate (8.17.2)
- Sentry/HybridSDK (= 8.18.0)
- SentryPrivate (8.18.0)
- sqflite (0.0.3):
- Flutter
- FMDB (>= 2.7.5)
- sqlite3 (3.44.0):
- sqlite3/common (= 3.44.0)
- sqlite3/common (3.44.0)
- sqlite3/fts5 (3.44.0):
- FlutterMacOS
- sqlite3 (3.45.0):
- sqlite3/common (= 3.45.0)
- sqlite3/common (3.45.0)
- sqlite3/fts5 (3.45.0):
- sqlite3/common
- sqlite3/perf-threadsafe (3.44.0):
- sqlite3/perf-threadsafe (3.45.0):
- sqlite3/common
- sqlite3/rtree (3.44.0):
- sqlite3/rtree (3.45.0):
- sqlite3/common
- sqlite3_flutter_libs (0.0.1):
- Flutter
- sqlite3 (~> 3.44.0)
- sqlite3 (~> 3.45.0)
- sqlite3/fts5
- sqlite3/perf-threadsafe
- sqlite3/rtree
- store_checker (0.0.1):
- Flutter
- url_launcher_ios (0.0.1):
- Flutter
DEPENDENCIES:
- device_info_plus (from `.symlinks/plugins/device_info_plus/ios`)
- Flutter (from `Flutter`)
- flutter_custom_tabs_ios (from `.symlinks/plugins/flutter_custom_tabs_ios/ios`)
- flutter_native_splash (from `.symlinks/plugins/flutter_native_splash/ios`)
- flutter_web_browser (from `.symlinks/plugins/flutter_web_browser/ios`)
- package_info_plus (from `.symlinks/plugins/package_info_plus/ios`)
- sentry_flutter (from `.symlinks/plugins/sentry_flutter/ios`)
- sqflite (from `.symlinks/plugins/sqflite/ios`)
- sqflite (from `.symlinks/plugins/sqflite/darwin`)
- sqlite3_flutter_libs (from `.symlinks/plugins/sqlite3_flutter_libs/ios`)
- store_checker (from `.symlinks/plugins/store_checker/ios`)
- url_launcher_ios (from `.symlinks/plugins/url_launcher_ios/ios`)
SPEC REPOS:
trunk:
- FMDB
- Sentry
- SentryPrivate
- sqlite3
@ -65,38 +58,34 @@ EXTERNAL SOURCES:
:path: ".symlinks/plugins/device_info_plus/ios"
Flutter:
:path: Flutter
flutter_custom_tabs_ios:
:path: ".symlinks/plugins/flutter_custom_tabs_ios/ios"
flutter_native_splash:
:path: ".symlinks/plugins/flutter_native_splash/ios"
flutter_web_browser:
:path: ".symlinks/plugins/flutter_web_browser/ios"
package_info_plus:
:path: ".symlinks/plugins/package_info_plus/ios"
sentry_flutter:
:path: ".symlinks/plugins/sentry_flutter/ios"
sqflite:
:path: ".symlinks/plugins/sqflite/ios"
:path: ".symlinks/plugins/sqflite/darwin"
sqlite3_flutter_libs:
:path: ".symlinks/plugins/sqlite3_flutter_libs/ios"
store_checker:
:path: ".symlinks/plugins/store_checker/ios"
url_launcher_ios:
:path: ".symlinks/plugins/url_launcher_ios/ios"
SPEC CHECKSUMS:
device_info_plus: c6fb39579d0f423935b0c9ce7ee2f44b71b9fce6
Flutter: e0871f40cf51350855a761d2e70bf5af5b9b5de7
flutter_custom_tabs_ios: 62439c843b2691aae516fd50119a01eb9755fff7
flutter_native_splash: 52501b97d1c0a5f898d687f1646226c1f93c56ef
flutter_web_browser: 7bccaafbb0c5b8862afe7bcd158f15557109f61f
FMDB: 2ce00b547f966261cd18927a3ddb07cb6f3db82a
package_info_plus: 115f4ad11e0698c8c1c5d8a689390df880f47e85
Sentry: 64a9f9c3637af913adcf53deced05bbe452d1410
sentry_flutter: 57912cf425e09398bdf47f38842a1fcb9836f1be
SentryPrivate: 024c6fed507ac39ae98e6d087034160f942920d5
sqflite: 31f7eba61e3074736dff8807a9b41581e4f7f15a
sqlite3: 6e2d4a4879854d0ec86b476bf3c3e30870bac273
sqlite3_flutter_libs: eb769059df0356dc52ddda040f09cacc9391a7cf
Sentry: 8984a4ffb2b9bd2894d74fb36e6f5833865bc18e
sentry_flutter: c87a0556eeb6cbf7f9f924d30e878bdedf22d364
SentryPrivate: 2f0c9ba4c3fc993f70eab6ca95673509561e0085
sqflite: 673a0e54cc04b7d6dba8d24fb8095b31c3a99eec
sqlite3: f307b6291c4db7b5086c38d6237446b98a738581
sqlite3_flutter_libs: aeb4d37509853dfa79d9b59386a2dac5dd079428
store_checker: 359c5051d9ec30ff0a8fa39eb5ec9df021bb745d
url_launcher_ios: bbd758c6e7f9fd7b5b1d4cde34d2b95fcce5e812
PODFILE CHECKSUM: c4c93c5f6502fe2754f48404d3594bf779584011

View file

@ -1,30 +1,21 @@
import 'dart:io';
import 'package:flutter_web_browser/flutter_web_browser.dart';
import 'package:url_launcher/url_launcher.dart';
import 'package:flutter_custom_tabs/flutter_custom_tabs.dart';
import 'package:sentry_flutter/sentry_flutter.dart';
void openUrl(String url) async {
if (Platform.isAndroid || Platform.isIOS) {
FlutterWebBrowser.openWebPage(
url: url,
try {
await launchUrl(
Uri.parse(url),
customTabsOptions: const CustomTabsOptions(
instantAppsEnabled: true,
shareState: CustomTabsShareState.browserDefault,
urlBarHidingEnabled: true,
showTitle: true,
urlBarHidingEnabled: false,
),
),
safariVCOptions: const SafariViewControllerOptions(
barCollapsingEnabled: true,
dismissButtonStyle: SafariViewControllerDismissButtonStyle.close,
modalPresentationCapturesStatusBarAppearance: true,
)
dismissButtonStyle: SafariViewControllerDismissButtonStyle.close,
),
);
}
else {
final uri = Uri.parse(url);
if (await canLaunchUrl(uri)) {
await launchUrl(uri);
} else {
throw 'Could not launch $url';
}
} catch (e, stackTrace) {
Sentry.captureException(e, stackTrace: stackTrace);
}
}

View file

@ -9,7 +9,6 @@
#include <dynamic_color/dynamic_color_plugin.h>
#include <sentry_flutter/sentry_flutter_plugin.h>
#include <sqlite3_flutter_libs/sqlite3_flutter_libs_plugin.h>
#include <url_launcher_linux/url_launcher_plugin.h>
#include <window_size/window_size_plugin.h>
void fl_register_plugins(FlPluginRegistry* registry) {
@ -22,9 +21,6 @@ void fl_register_plugins(FlPluginRegistry* registry) {
g_autoptr(FlPluginRegistrar) sqlite3_flutter_libs_registrar =
fl_plugin_registry_get_registrar_for_plugin(registry, "Sqlite3FlutterLibsPlugin");
sqlite3_flutter_libs_plugin_register_with_registrar(sqlite3_flutter_libs_registrar);
g_autoptr(FlPluginRegistrar) url_launcher_linux_registrar =
fl_plugin_registry_get_registrar_for_plugin(registry, "UrlLauncherPlugin");
url_launcher_plugin_register_with_registrar(url_launcher_linux_registrar);
g_autoptr(FlPluginRegistrar) window_size_registrar =
fl_plugin_registry_get_registrar_for_plugin(registry, "WindowSizePlugin");
window_size_plugin_register_with_registrar(window_size_registrar);

View file

@ -6,7 +6,6 @@ list(APPEND FLUTTER_PLUGIN_LIST
dynamic_color
sentry_flutter
sqlite3_flutter_libs
url_launcher_linux
window_size
)

View file

@ -11,7 +11,6 @@ import package_info_plus
import sentry_flutter
import sqflite
import sqlite3_flutter_libs
import url_launcher_macos
import window_size
func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) {
@ -21,6 +20,5 @@ func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) {
SentryFlutterPlugin.register(with: registry.registrar(forPlugin: "SentryFlutterPlugin"))
SqflitePlugin.register(with: registry.registrar(forPlugin: "SqflitePlugin"))
Sqlite3FlutterLibsPlugin.register(with: registry.registrar(forPlugin: "Sqlite3FlutterLibsPlugin"))
UrlLauncherPlugin.register(with: registry.registrar(forPlugin: "UrlLauncherPlugin"))
WindowSizePlugin.register(with: registry.registrar(forPlugin: "WindowSizePlugin"))
}

View file

@ -222,6 +222,46 @@ packages:
description: flutter
source: sdk
version: "0.0.0"
flutter_custom_tabs:
dependency: "direct main"
description:
name: flutter_custom_tabs
sha256: "961fe962ae55e9e41097c34e68c6d7d2de10e9a71034f83834919e31a891e728"
url: "https://pub.dev"
source: hosted
version: "2.0.0+1"
flutter_custom_tabs_android:
dependency: transitive
description:
name: flutter_custom_tabs_android
sha256: "5701a3e38117dfc59e5fa9e84a29eea9203e0062de7be56d1f775845c34456d9"
url: "https://pub.dev"
source: hosted
version: "2.0.0+1"
flutter_custom_tabs_ios:
dependency: transitive
description:
name: flutter_custom_tabs_ios
sha256: b29f687f7f366159d37347f888369fcd1259adac8ca6c7f07d356a80b091e08a
url: "https://pub.dev"
source: hosted
version: "2.0.0"
flutter_custom_tabs_platform_interface:
dependency: transitive
description:
name: flutter_custom_tabs_platform_interface
sha256: "13531a743486695d87b462b151801e11476b1b5a15274caec092420cc1943064"
url: "https://pub.dev"
source: hosted
version: "2.0.0"
flutter_custom_tabs_web:
dependency: transitive
description:
name: flutter_custom_tabs_web
sha256: "3114b511d3942ed42c502cc57ad47eaef9622ac06dd036e2b21b19d8876f6498"
url: "https://pub.dev"
source: hosted
version: "2.0.0"
flutter_displaymode:
dependency: "direct main"
description:
@ -313,14 +353,6 @@ packages:
description: flutter
source: sdk
version: "0.0.0"
flutter_web_browser:
dependency: "direct main"
description:
name: flutter_web_browser
sha256: a5564b736253f745e147b8c4eff86de436324d081974cc1f16bff881134a400f
url: "https://pub.dev"
source: hosted
version: "0.17.1"
flutter_web_plugins:
dependency: transitive
description: flutter
@ -683,46 +715,6 @@ packages:
url: "https://pub.dev"
source: hosted
version: "2.2.2"
url_launcher:
dependency: "direct main"
description:
name: url_launcher
sha256: c512655380d241a337521703af62d2c122bf7b77a46ff7dd750092aa9433499c
url: "https://pub.dev"
source: hosted
version: "6.2.4"
url_launcher_android:
dependency: transitive
description:
name: url_launcher_android
sha256: "507dc655b1d9cb5ebc756032eb785f114e415f91557b73bf60b7e201dfedeb2f"
url: "https://pub.dev"
source: hosted
version: "6.2.2"
url_launcher_ios:
dependency: transitive
description:
name: url_launcher_ios
sha256: "75bb6fe3f60070407704282a2d295630cab232991eb52542b18347a8a941df03"
url: "https://pub.dev"
source: hosted
version: "6.2.4"
url_launcher_linux:
dependency: transitive
description:
name: url_launcher_linux
sha256: ab360eb661f8879369acac07b6bb3ff09d9471155357da8443fd5d3cf7363811
url: "https://pub.dev"
source: hosted
version: "3.1.1"
url_launcher_macos:
dependency: transitive
description:
name: url_launcher_macos
sha256: b7244901ea3cf489c5335bdacda07264a6e960b1c1b1a9f91e4bc371d9e68234
url: "https://pub.dev"
source: hosted
version: "3.1.0"
url_launcher_platform_interface:
dependency: transitive
description:
@ -739,14 +731,6 @@ packages:
url: "https://pub.dev"
source: hosted
version: "2.2.3"
url_launcher_windows:
dependency: transitive
description:
name: url_launcher_windows
sha256: ecf9725510600aa2bb6d7ddabe16357691b6d2805f66216a97d1b881e21beff7
url: "https://pub.dev"
source: hosted
version: "3.1.1"
uuid:
dependency: "direct main"
description:

View file

@ -49,7 +49,6 @@ dependencies:
uuid: ^4.2.1
expandable: ^5.0.1
fl_chart: ^0.66.0
flutter_web_browser: ^0.17.1
flutter_svg: ^2.0.9
percent_indicator: ^4.2.3
store_checker: ^1.4.0
@ -67,7 +66,6 @@ dependencies:
git:
url: https://github.com/JGeek00/flutter_split_view
ref: master-alt
url_launcher: ^6.2.2
contextmenu: ^3.0.0
async: ^2.11.0
sentry_flutter: ^7.13.2
@ -77,6 +75,7 @@ dependencies:
segmented_button_slide: ^1.0.4
http: ^1.1.2
timezone: ^0.9.2
flutter_custom_tabs: ^2.0.0+1
dev_dependencies:
flutter_test:

View file

@ -9,7 +9,6 @@
#include <dynamic_color/dynamic_color_plugin_c_api.h>
#include <sentry_flutter/sentry_flutter_plugin.h>
#include <sqlite3_flutter_libs/sqlite3_flutter_libs_plugin.h>
#include <url_launcher_windows/url_launcher_windows.h>
#include <window_size/window_size_plugin.h>
void RegisterPlugins(flutter::PluginRegistry* registry) {
@ -19,8 +18,6 @@ void RegisterPlugins(flutter::PluginRegistry* registry) {
registry->GetRegistrarForPlugin("SentryFlutterPlugin"));
Sqlite3FlutterLibsPluginRegisterWithRegistrar(
registry->GetRegistrarForPlugin("Sqlite3FlutterLibsPlugin"));
UrlLauncherWindowsRegisterWithRegistrar(
registry->GetRegistrarForPlugin("UrlLauncherWindows"));
WindowSizePluginRegisterWithRegistrar(
registry->GetRegistrarForPlugin("WindowSizePlugin"));
}

View file

@ -6,7 +6,6 @@ list(APPEND FLUTTER_PLUGIN_LIST
dynamic_color
sentry_flutter
sqlite3_flutter_libs
url_launcher_windows
window_size
)

View file

@ -43,7 +43,6 @@ Source: "..\build\windows\x64\runner\Release\flutter_windows.dll"; DestDir: "{ap
Source: "..\build\windows\x64\runner\Release\sentry_flutter_plugin.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "..\build\windows\x64\runner\Release\sqlite3.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "..\build\windows\x64\runner\Release\sqlite3_flutter_libs_plugin.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "..\build\windows\x64\runner\Release\url_launcher_windows_plugin.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "..\build\windows\x64\runner\Release\window_size_plugin.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "..\build\windows\x64\runner\Release\data\*"; DestDir: "{app}\data"; Flags: ignoreversion recursesubdirs createallsubdirs
; NOTE: Don't use "Flags: ignoreversion" on any shared system files