diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 00000000..7a73a41b --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,2 @@ +{ +} \ No newline at end of file diff --git a/ios/Podfile b/ios/Podfile index 79d1fe23..17857d55 100644 --- a/ios/Podfile +++ b/ios/Podfile @@ -50,4 +50,15 @@ post_install do |installer| ] end end + ################ Awesome Notifications pod modification ################### + awesome_pod_file = File.expand_path(File.join('plugins', 'awesome_notifications', 'ios', 'Scripts', 'AwesomePodFile'), '.symlinks') + require awesome_pod_file + update_awesome_pod_build_settings(installer) + ################ Awesome Notifications pod modification ################### end + +################ Awesome Notifications pod modification ################### +awesome_pod_file = File.expand_path(File.join('plugins', 'awesome_notifications', 'ios', 'Scripts', 'AwesomePodFile'), '.symlinks') +require awesome_pod_file +update_awesome_main_target_settings('Runner', File.dirname(File.realpath(__FILE__)), flutter_root) +################ Awesome Notifications pod modification ################### diff --git a/ios/Runner.xcodeproj/project.pbxproj b/ios/Runner.xcodeproj/project.pbxproj index 13d42eff..a6e90228 100644 --- a/ios/Runner.xcodeproj/project.pbxproj +++ b/ios/Runner.xcodeproj/project.pbxproj @@ -160,7 +160,7 @@ 97C146E61CF9000F007C117D /* Project object */ = { isa = PBXProject; attributes = { - LastUpgradeCheck = 1300; + LastUpgradeCheck = 1510; ORGANIZATIONNAME = ""; TargetAttributes = { 97C146ED1CF9000F007C117D = { @@ -348,7 +348,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 11.0; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = iphoneos; SUPPORTED_PLATFORMS = iphoneos; @@ -361,6 +361,7 @@ isa = XCBuildConfiguration; baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; buildSettings = { + APPLICATION_EXTENSION_API_ONLY = NO; ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; BUILD_LIBRARY_FOR_DISTRIBUTION = NO; CLANG_ENABLE_MODULES = YES; @@ -369,6 +370,7 @@ DEVELOPMENT_TEAM = 642TR6YWHA; ENABLE_BITCODE = NO; INFOPLIST_FILE = Runner/Info.plist; + IPHONEOS_DEPLOYMENT_TARGET = 13.0; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", @@ -428,7 +430,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 11.0; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; MTL_ENABLE_DEBUG_INFO = YES; ONLY_ACTIVE_ARCH = YES; SDKROOT = iphoneos; @@ -477,7 +479,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 11.0; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = iphoneos; SUPPORTED_PLATFORMS = iphoneos; @@ -492,6 +494,7 @@ isa = XCBuildConfiguration; baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */; buildSettings = { + APPLICATION_EXTENSION_API_ONLY = NO; ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; BUILD_LIBRARY_FOR_DISTRIBUTION = NO; CLANG_ENABLE_MODULES = YES; @@ -500,6 +503,7 @@ DEVELOPMENT_TEAM = 642TR6YWHA; ENABLE_BITCODE = NO; INFOPLIST_FILE = Runner/Info.plist; + IPHONEOS_DEPLOYMENT_TARGET = 13.0; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", @@ -517,6 +521,7 @@ isa = XCBuildConfiguration; baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; buildSettings = { + APPLICATION_EXTENSION_API_ONLY = NO; ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; BUILD_LIBRARY_FOR_DISTRIBUTION = NO; CLANG_ENABLE_MODULES = YES; @@ -525,6 +530,7 @@ DEVELOPMENT_TEAM = 642TR6YWHA; ENABLE_BITCODE = NO; INFOPLIST_FILE = Runner/Info.plist; + IPHONEOS_DEPLOYMENT_TARGET = 13.0; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", diff --git a/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme b/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme index 96c4d1a2..636085df 100644 --- a/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme +++ b/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme @@ -1,6 +1,6 @@ createState() => _MobileDeviceViewState(); @@ -190,16 +185,11 @@ class DeviceTile extends StatefulWidget { final int tab; final int index; - final double width; - final double height; - const DeviceTile({ super.key, required this.device, required this.tab, required this.index, - this.width = 640.0, - this.height = 360.0, }); @override @@ -232,13 +222,15 @@ class DeviceTileState extends State { }, // Fullscreen on double-tap. onDoubleTap: () async { - await Navigator.of(context).pushNamed( - '/fullscreen', - arguments: { - 'device': widget.device, - 'player': videoPlayer, - }, - ); + if (videoPlayer.error == null) { + await Navigator.of(context).pushNamed( + '/fullscreen', + arguments: { + 'device': widget.device, + 'player': videoPlayer, + }, + ); + } }, child: UnityVideoView( heroTag: widget.device.streamURL, @@ -248,79 +240,74 @@ class DeviceTileState extends State { paneBuilder: (context, controller) { final video = UnityVideoView.of(context); final error = video.error; + final isLoading = !controller.isSeekable; return ClipRect( - child: Stack(children: [ + child: Stack(alignment: Alignment.center, children: [ if (error != null) ErrorWarning(message: error) - else if (!controller.isSeekable) - const Center( - child: CircularProgressIndicator.adaptive( - valueColor: AlwaysStoppedAnimation(Colors.white), - strokeWidth: 1.5, - ), + else if (isLoading) + const CircularProgressIndicator.adaptive( + valueColor: AlwaysStoppedAnimation(Colors.white), + strokeWidth: 1.5, ), if (video.lastImageUpdate != null) - Center( - child: TweenAnimationBuilder( - tween: Tween( - begin: 0.0, - end: hover ? 1.0 : 0.0, - ), - duration: const Duration(milliseconds: 300), - builder: (context, value, child) { - return Opacity( - opacity: value, - child: child, + TweenAnimationBuilder( + tween: Tween( + begin: 0.0, + end: hover ? 1.0 : 0.0, + ), + duration: const Duration(milliseconds: 300), + builder: (context, value, child) { + return Opacity( + opacity: value, + child: child, + ); + }, + child: SquaredIconButton( + // splashRadius: 20.0, + onPressed: () async { + await Navigator.of(context).pushNamed( + '/fullscreen', + arguments: { + 'device': widget.device, + 'player': videoPlayer, + }, ); }, - child: SquaredIconButton( - // splashRadius: 20.0, - onPressed: () async { - await Navigator.of(context).pushNamed( - '/fullscreen', - arguments: { - 'device': widget.device, - 'player': videoPlayer, - }, - ); - }, - icon: const Icon( - Icons.fullscreen, - color: Colors.white, - size: 32.0, - ), + icon: const Icon( + Icons.fullscreen, + color: Colors.white, + size: 32.0, ), ), ), PositionedDirectional( top: 6.0, start: 6.0, - child: VideoStatusLabel( - video: video, - device: widget.device, - ), + child: VideoStatusLabel(video: video, device: widget.device), ), PositionedDirectional( bottom: 0.0, start: 0.0, end: 0.0, child: AnimatedSlide( - offset: Offset(0, hover ? 0.0 : 1.0), + offset: Offset( + 0, + error != null || isLoading || hover ? 0.0 : 1.0, + ), duration: const Duration(milliseconds: 200), curve: Curves.easeInOut, child: Container( - height: 48.0, + padding: const EdgeInsetsDirectional.only( + start: 16.0, + top: 6.0, + bottom: 6.0, + end: 16.0, + ), alignment: AlignmentDirectional.centerEnd, color: Colors.black26, child: Row(children: [ - const SizedBox(width: 16.0), - const Icon( - Icons.videocam, - color: Colors.white, - size: 20.0, - ), - const SizedBox(width: 16.0), Expanded( child: Column( mainAxisAlignment: MainAxisAlignment.center, @@ -328,10 +315,7 @@ class DeviceTileState extends State { crossAxisAlignment: CrossAxisAlignment.start, children: [ Text( - widget.device.name - .split(' ') - .map((word) => word.uppercaseFirst) - .join(' '), + widget.device.name, style: theme.textTheme.displayLarge?.copyWith( color: Colors.white, fontSize: 14.0, @@ -354,7 +338,6 @@ class DeviceTileState extends State { size: 20.0, semanticLabel: loc.ptzSupported, ), - const SizedBox(width: 16.0), ]), ), ), diff --git a/lib/screens/layouts/video_status_label.dart b/lib/screens/layouts/video_status_label.dart index b4f46386..ffc43fb3 100644 --- a/lib/screens/layouts/video_status_label.dart +++ b/lib/screens/layouts/video_status_label.dart @@ -102,25 +102,27 @@ class _VideoStatusLabelState extends State { event: widget.event, ); final minHeight = label.buildTextSpans(context).length * 15; + + final willLeftOverflow = + position.dx + _DeviceVideoInfo.minWidth > constraints.maxWidth; + + final left = willLeftOverflow + ? (constraints.maxWidth - _DeviceVideoInfo.minWidth - 8.0) + : position.dx; + final top = position.dy > minHeight + 8.0 + ? null + : position.dy + boxSize.height + 8.0; + final bottom = position.dy > minHeight + 8.0 + ? constraints.maxHeight - position.dy + 8.0 + : null; + return Stack(children: [ - if (position.dy > minHeight + 8.0) - Positioned( - bottom: constraints.maxHeight - position.dy + 8.0, - right: constraints.maxWidth - position.dx - boxSize.width, - child: label, - ) - else - () { - final willLeftOverflow = position.dx + _DeviceVideoInfo.minWidth > - constraints.maxWidth; - return Positioned( - top: position.dy + boxSize.height + 8.0, - left: willLeftOverflow - ? (constraints.maxWidth - _DeviceVideoInfo.minWidth - 8.0) - : position.dx, - child: label, - ); - }(), + Positioned( + left: left, + top: top, + bottom: bottom, + child: label, + ), ]); }); }); diff --git a/lib/widgets/misc.dart b/lib/widgets/misc.dart index 569380a2..477f04db 100644 --- a/lib/widgets/misc.dart +++ b/lib/widgets/misc.dart @@ -92,6 +92,7 @@ class GestureDetectorWithReducedDoubleTapTime extends StatelessWidget { Widget build(BuildContext context) { return GestureDetector( key: key, + behavior: HitTestBehavior.opaque, onTap: _onTap, onTapDown: _onTapDown, onTapCancel: _onTapCancel, diff --git a/macos/Flutter/ephemeral/Flutter-Generated.xcconfig b/macos/Flutter/ephemeral/Flutter-Generated.xcconfig index ea87c370..3bf56373 100644 --- a/macos/Flutter/ephemeral/Flutter-Generated.xcconfig +++ b/macos/Flutter/ephemeral/Flutter-Generated.xcconfig @@ -1,6 +1,6 @@ // This is a generated file; do not edit or check into version control. -FLUTTER_ROOT=C:\Users\bruno\Documents\flutter\flutter -FLUTTER_APPLICATION_PATH=C:\Users\bruno\Documents\flutter\paid_projects\unity +FLUTTER_ROOT=/Users/user249455/Documents/development/flutter +FLUTTER_APPLICATION_PATH=/Users/user249455/Documents/GitHub/unity COCOAPODS_PARALLEL_CODE_SIGN=true FLUTTER_BUILD_DIR=build FLUTTER_BUILD_NAME=3.0.015 diff --git a/macos/Flutter/ephemeral/flutter_export_environment.sh b/macos/Flutter/ephemeral/flutter_export_environment.sh index 4e4f0fdc..c75f1092 100755 --- a/macos/Flutter/ephemeral/flutter_export_environment.sh +++ b/macos/Flutter/ephemeral/flutter_export_environment.sh @@ -1,7 +1,7 @@ #!/bin/sh # This is a generated file; do not edit or check into version control. -export "FLUTTER_ROOT=C:\Users\bruno\Documents\flutter\flutter" -export "FLUTTER_APPLICATION_PATH=C:\Users\bruno\Documents\flutter\paid_projects\unity" +export "FLUTTER_ROOT=/Users/user249455/Documents/development/flutter" +export "FLUTTER_APPLICATION_PATH=/Users/user249455/Documents/GitHub/unity" export "COCOAPODS_PARALLEL_CODE_SIGN=true" export "FLUTTER_BUILD_DIR=build" export "FLUTTER_BUILD_NAME=3.0.015" diff --git a/macos/Podfile.lock b/macos/Podfile.lock index f5aad14f..ed240701 100644 --- a/macos/Podfile.lock +++ b/macos/Podfile.lock @@ -89,6 +89,9 @@ PODS: - FlutterMacOS - url_launcher_macos (0.0.1): - FlutterMacOS + - video_player_avfoundation (0.0.1): + - Flutter + - FlutterMacOS - wakelock_plus (0.0.1): - FlutterMacOS - window_manager (0.2.0): @@ -111,6 +114,7 @@ DEPENDENCIES: - screen_retriever (from `Flutter/ephemeral/.symlinks/plugins/screen_retriever/macos`) - system_date_time_format (from `Flutter/ephemeral/.symlinks/plugins/system_date_time_format/macos`) - url_launcher_macos (from `Flutter/ephemeral/.symlinks/plugins/url_launcher_macos/macos`) + - video_player_avfoundation (from `Flutter/ephemeral/.symlinks/plugins/video_player_avfoundation/darwin`) - wakelock_plus (from `Flutter/ephemeral/.symlinks/plugins/wakelock_plus/macos`) - window_manager (from `Flutter/ephemeral/.symlinks/plugins/window_manager/macos`) @@ -160,13 +164,15 @@ EXTERNAL SOURCES: :path: Flutter/ephemeral/.symlinks/plugins/system_date_time_format/macos url_launcher_macos: :path: Flutter/ephemeral/.symlinks/plugins/url_launcher_macos/macos + video_player_avfoundation: + :path: Flutter/ephemeral/.symlinks/plugins/video_player_avfoundation/darwin wakelock_plus: :path: Flutter/ephemeral/.symlinks/plugins/wakelock_plus/macos window_manager: :path: Flutter/ephemeral/.symlinks/plugins/window_manager/macos SPEC CHECKSUMS: - app_links: 4481ed4d71f384b0c3ae5016f4633aa73d32ff67 + app_links: 10e0a0ab602ffaf34d142cd4862f29d34b303b2a awesome_notifications: 428f5c15a700b117418aed09e29c21c5806fcf69 connectivity_plus: 18d3c32514c886e046de60e9c13895109866c747 device_info_plus: 5401765fde0b8d062a2f8eb65510fb17e77cf07f @@ -185,16 +191,17 @@ SPEC CHECKSUMS: media_kit_video: c75b07f14d59706c775778e4dd47dd027de8d1e5 nanopb: d4d75c12cd1316f4a64e3c6963f879ecd4b5e0d5 package_info_plus: 02d7a575e80f194102bef286361c6c326e4c29ce - path_provider_foundation: 29f094ae23ebbca9d3d0cec13889cd9060c0e943 + path_provider_foundation: 3784922295ac71e43754bd15e0653ccfd36a147c PromisesObjC: c50d2056b5253dadbd6c2bea79b0674bd5a52fa4 ReachabilitySwift: 985039c6f7b23a1da463388634119492ff86c825 screen_brightness_macos: 2d6d3af2165592d9a55ffcd95b7550970e41ebda screen_retriever: 59634572a57080243dd1bf715e55b6c54f241a38 system_date_time_format: 4f3982edee40a537cf15c817d1e939b9dbfa457d url_launcher_macos: d2691c7dd33ed713bf3544850a623080ec693d95 + video_player_avfoundation: 02011213dab73ae3687df27ce441fbbcc82b5579 wakelock_plus: 4783562c9a43d209c458cb9b30692134af456269 window_manager: 3a1844359a6295ab1e47659b1a777e36773cd6e8 PODFILE CHECKSUM: 236401fc2c932af29a9fcf0e97baeeb2d750d367 -COCOAPODS: 1.13.0 +COCOAPODS: 1.15.2 diff --git a/macos/Runner.xcodeproj/project.pbxproj b/macos/Runner.xcodeproj/project.pbxproj index 7e013f27..26465cd1 100644 --- a/macos/Runner.xcodeproj/project.pbxproj +++ b/macos/Runner.xcodeproj/project.pbxproj @@ -259,7 +259,7 @@ isa = PBXProject; attributes = { LastSwiftUpdateCheck = 0920; - LastUpgradeCheck = 1430; + LastUpgradeCheck = 1510; ORGANIZATIONNAME = ""; TargetAttributes = { 331C80D4294CF70F00263BE5 = { diff --git a/macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme b/macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme index 834086d8..42cf080d 100644 --- a/macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme +++ b/macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme @@ -1,6 +1,6 @@ =3.2.0-194.0.dev <4.0.0" + dart: ">=3.2.0-0 <4.0.0" flutter: ">=1.17.0" diff --git a/pubspec.lock b/pubspec.lock index 8a93263e..a6a30f27 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -61,10 +61,10 @@ packages: dependency: "direct main" description: name: awesome_notifications - sha256: "65f730f9c0e73a346039ef746384bcff1773f9f03821b859705a7ab8db977b23" + sha256: d9e46ce7f5171ee1e9b1c5bc6dc40bd77528561f592842ce97ce3a0a9ae155ef url: "https://pub.dev" source: hosted - version: "0.8.2" + version: "0.9.3+1" boolean_selector: dependency: transitive description: diff --git a/pubspec.yaml b/pubspec.yaml index 80434ea8..3ae0f977 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -34,7 +34,7 @@ dependencies: duration: ^3.0.13 firebase_core: 2.10.0 firebase_messaging: ^14.4.1 - awesome_notifications: ^0.8.2 + awesome_notifications: ^0.9.3 wakelock_plus: ^1.1.4 app_links: ^3.5.0 win32_registry: ^1.1.2 @@ -67,6 +67,9 @@ dev_dependencies: msix: ^3.7.0 flutter_launcher_icons: ^0.13.0 +dependency_overrides: + intl: 0.18.1 + flutter: uses-material-design: true # The following line ensures that the translations are generated before the