diff --git a/lib/l10n/app_pt.arb b/lib/l10n/app_pt.arb index d22f8a5d..1c3c4f04 100644 --- a/lib/l10n/app_pt.arb +++ b/lib/l10n/app_pt.arb @@ -1,7 +1,7 @@ { "@@locale": "pt", "welcome": "Bem vindo!", - "welcomeDescription": "Bem vindo ao Bluecherry Surveillance DVR!\nVamos conectar ao seu servidor DVR em un instante.", + "welcomeDescription": "Sea bem vindo ao Bluecherry Surveillance DVR!\nVamos conectar ao seu servidor DVR em um instante!", "configure": "Configure um Servidor DVR", "configureDescription": "Configure uma conexão com seu servidor DVR remoto", "hostname": "Hostname", diff --git a/lib/utils/app_links.dart b/lib/utils/app_links.dart index 5062ddfd..befd76e3 100644 --- a/lib/utils/app_links.dart +++ b/lib/utils/app_links.dart @@ -2,9 +2,9 @@ import 'dart:io'; import 'package:app_links/app_links.dart'; import 'package:bluecherry_client/main.dart'; +import 'package:bluecherry_client/utils/methods.dart'; import 'package:bluecherry_client/widgets/device_grid/device_grid.dart'; -import 'package:flutter/foundation.dart'; -import 'package:flutter/material.dart'; +import 'package:flutter/widgets.dart'; import 'package:win32_registry/win32_registry.dart'; final instance = AppLinks(); @@ -48,13 +48,17 @@ Future init() async { void listen() { instance.allUriLinkStream.listen((uri) { - final navigator = navigatorKey.currentState; - if (navigator == null) return; - debugPrint('Received URI: $uri'); - final url = uri.toString(); - final context = navigatorKey.currentContext!; - AddExternalStreamDialog.addStream(context, url); + if (isDesktopPlatform) { + final context = navigatorKey.currentContext; + if (context != null) { + AddExternalStreamDialog.addStream(context, url); + } + } else { + final navigator = navigatorKey.currentState; + if (navigator == null) return; + navigator.pushNamed('/rtsp', arguments: url); + } }); }