From 3c0eae88e7091398bdd8ce9e039b796449c26197 Mon Sep 17 00:00:00 2001 From: "J. A. Messias" Date: Tue, 8 Oct 2024 17:48:38 -0300 Subject: [PATCH] fix --- ios/Runner/AppDelegate.swift | 8 ++++++++ ios/Runner/Info.plist | 2 ++ lib/backend/api_requests/api_calls.dart | 16 ++++------------ 3 files changed, 14 insertions(+), 12 deletions(-) diff --git a/ios/Runner/AppDelegate.swift b/ios/Runner/AppDelegate.swift index 4f2d7865..a97488f8 100644 --- a/ios/Runner/AppDelegate.swift +++ b/ios/Runner/AppDelegate.swift @@ -9,6 +9,14 @@ import Flutter didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? ) -> Bool { GeneratedPluginRegistrant.register(with: self) + + // Retrieve the link from parameters + if let url = AppLinks.shared.getLink(launchOptions: launchOptions) { + // We have a link, propagate it to your Flutter app or not + AppLinks.shared.handleLink(url: url) + return true // Returning true will stop the propagation to other packages + } + return super.application(application, didFinishLaunchingWithOptions: launchOptions) } } \ No newline at end of file diff --git a/ios/Runner/Info.plist b/ios/Runner/Info.plist index de941755..cd9f8916 100644 --- a/ios/Runner/Info.plist +++ b/ios/Runner/Info.plist @@ -2,6 +2,8 @@ + FlutterDeepLinkingEnabled + CADisableMinimumFrameDurationOnPhone CFBundleDevelopmentRegion diff --git a/lib/backend/api_requests/api_calls.dart b/lib/backend/api_requests/api_calls.dart index 0e86bf14..7b14e8a5 100644 --- a/lib/backend/api_requests/api_calls.dart +++ b/lib/backend/api_requests/api_calls.dart @@ -85,9 +85,7 @@ class UnregisterDevice { } class DeletePet { - Future call({ - final int? petID = 0, - }) async { + Future call({final int? petID = 0}) async { final String baseUrl = PhpGroup.getBaseUrl(); final String devUUID = StorageUtil().devUUID; final String userUUID = StorageUtil().userUUID; @@ -176,10 +174,7 @@ class UpdatePet { } class GetPets { - Future call({ - final int? page, - final int? pageSize, - }) async { + Future call({final int? page, final int? pageSize,}) async { final String baseUrl = PhpGroup.getBaseUrl(); final String devUUID = StorageUtil().devUUID; @@ -213,9 +208,7 @@ class GetPets { } class GetPetPhoto { - Future call({ - final int? petId, - }) async { + Future call({final int? petId}) async { final String baseUrl = PhpGroup.getBaseUrl(); final String devUUID = StorageUtil().devUUID; @@ -1951,6 +1944,7 @@ class RespondeSolicitacaoCall { )); } + class GetAccessCall { Future call({ final String? pageSize, @@ -2201,7 +2195,6 @@ class GetAccessCall { .withoutNulls .toList(); } - class GetLiberationsCall { Stream call() { final String baseUrl = PhpGroup.getBaseUrl(); @@ -2391,7 +2384,6 @@ class GetLiberationsCall { .withoutNulls .toList(); } - class GetMessagesCall { Future call({ final String? pageSize,