diff --git a/lib/pages/add_story/add_story.dart b/lib/pages/add_story/add_story.dart index cdf6d0d2..58136f4e 100644 --- a/lib/pages/add_story/add_story.dart +++ b/lib/pages/add_story/add_story.dart @@ -1,5 +1,5 @@ -import 'dart:async'; import 'dart:io'; +import 'dart:math'; import 'package:flutter/material.dart'; @@ -14,6 +14,7 @@ import 'package:fluffychat/pages/add_story/add_story_view.dart'; import 'package:fluffychat/pages/add_story/invite_story_page.dart'; import 'package:fluffychat/utils/matrix_sdk_extensions.dart/matrix_file_extension.dart'; import 'package:fluffychat/utils/resize_image.dart'; +import 'package:fluffychat/utils/story_theme_data.dart'; import 'package:fluffychat/utils/string_color.dart'; import 'package:fluffychat/widgets/matrix.dart'; import '../../utils/matrix_sdk_extensions.dart/client_stories_extension.dart'; @@ -41,22 +42,29 @@ class AddStoryController extends State { bool textFieldHasFocus = false; - Timer? _updateColorsCooldown; + BoxFit fit = BoxFit.contain; - void updateColors() { - if (hasText != controller.text.isNotEmpty) { + int alignmentX = 0; + int alignmentY = 0; + + void toggleBoxFit() { + if (fit == BoxFit.contain) { setState(() { - hasText = controller.text.isNotEmpty; + fit = BoxFit.cover; + }); + } else { + setState(() { + fit = BoxFit.contain; + }); + } + } + + void updateHasText(String text) { + if (hasText != text.isNotEmpty) { + setState(() { + hasText = text.isNotEmpty; }); } - _updateColorsCooldown?.cancel(); - _updateColorsCooldown = Timer( - const Duration(seconds: 3), - () => setState(() { - backgroundColor = controller.text.color; - backgroundColorDark = controller.text.darkColor; - }), - ); } void importMedia() async { @@ -65,13 +73,16 @@ class AddStoryController extends State { ); final fileName = picked.fileName; if (fileName == null) return; - final shrinked = await MatrixImageFile.shrink( - bytes: picked.toUint8List(), - name: fileName, - compute: Matrix.of(context).client.runInBackground, + final shrinked = await showFutureLoadingDialog( + context: context, + future: () => MatrixImageFile.shrink( + bytes: picked.toUint8List(), + name: fileName, + compute: Matrix.of(context).client.runInBackground, + ), ); setState(() { - image = shrinked; + image = shrinked.result; }); } @@ -80,14 +91,27 @@ class AddStoryController extends State { source: ImageSource.camera, ); if (picked == null) return; - final bytes = await picked.readAsBytes(); - final shrinked = await MatrixImageFile.shrink( - bytes: bytes, - name: picked.name, - compute: Matrix.of(context).client.runInBackground, - ); + final shrinked = await showFutureLoadingDialog( + context: context, + future: () async { + final bytes = await picked.readAsBytes(); + return await MatrixImageFile.shrink( + bytes: bytes, + name: picked.name, + compute: Matrix.of(context).client.runInBackground, + ); + }); + setState(() { - image = shrinked; + image = shrinked.result; + }); + } + + void updateColor() { + final rand = Random().nextInt(1000).toString(); + setState(() { + backgroundColor = rand.color; + backgroundColorDark = rand.darkColor; }); } @@ -107,6 +131,7 @@ class AddStoryController extends State { void reset() => setState(() { image = video = null; + alignmentX = alignmentY = 0; controller.clear(); }); @@ -143,7 +168,14 @@ class AddStoryController extends State { final thumbnail = await video.getVideoThumbnail(); await storiesRoom.sendFileEvent( video, - extraContent: {'body': controller.text}, + extraContent: { + 'body': controller.text, + StoryThemeData.contentKey: StoryThemeData( + fit: fit, + alignmentX: alignmentX, + alignmentY: alignmentY, + ).toJson(), + }, thumbnail: thumbnail, ); return; @@ -152,11 +184,28 @@ class AddStoryController extends State { if (image != null) { await storiesRoom.sendFileEvent( image, - extraContent: {'body': controller.text}, + extraContent: { + 'body': controller.text, + StoryThemeData.contentKey: StoryThemeData( + fit: fit, + alignmentX: alignmentX, + alignmentY: alignmentY, + ).toJson(), + }, ); return; } - await storiesRoom.sendTextEvent(controller.text); + await storiesRoom.sendEvent({ + 'msgtype': MessageTypes.Text, + 'body': controller.text, + StoryThemeData.contentKey: StoryThemeData( + color1: backgroundColor, + color2: backgroundColorDark, + fit: fit, + alignmentX: alignmentX, + alignmentY: alignmentY, + ).toJson(), + }); }, ); if (postResult.error == null) { @@ -164,12 +213,40 @@ class AddStoryController extends State { } } + void onVerticalDragUpdate(DragUpdateDetails details) { + final delta = details.primaryDelta; + if (delta == null) return; + if (delta > 0 && alignmentY < 100) { + setState(() { + alignmentY += 1; + }); + } else if (delta < 0 && alignmentY > -100) { + setState(() { + alignmentY -= 1; + }); + } + } + + void onHorizontalDragUpdate(DragUpdateDetails details) { + final delta = details.primaryDelta; + if (delta == null) return; + if (delta > 0 && alignmentX < 100) { + setState(() { + alignmentX += 1; + }); + } else if (delta < 0 && alignmentX > -100) { + setState(() { + alignmentX -= 1; + }); + } + } + @override void initState() { super.initState(); - final text = Matrix.of(context).client.userID!; - backgroundColor = text.color; - backgroundColorDark = text.darkColor; + final rand = Random().nextInt(1000).toString(); + backgroundColor = rand.color; + backgroundColorDark = rand.darkColor; focusNode.addListener(() { if (textFieldHasFocus != focusNode.hasFocus) { setState(() { diff --git a/lib/pages/add_story/add_story_view.dart b/lib/pages/add_story/add_story_view.dart index eda2034f..faecb415 100644 --- a/lib/pages/add_story/add_story_view.dart +++ b/lib/pages/add_story/add_story_view.dart @@ -13,6 +13,7 @@ class AddStoryView extends StatelessWidget { @override Widget build(BuildContext context) { final video = controller.videoPlayerController; + return Scaffold( backgroundColor: Colors.blueGrey.shade900, appBar: AppBar( @@ -36,102 +37,126 @@ class AddStoryView extends StatelessWidget { actions: [ if (controller.hasMedia) IconButton( - icon: const Icon(Icons.delete_outlined), - onPressed: controller.reset, + icon: const Icon(Icons.fullscreen_outlined), + onPressed: controller.toggleBoxFit, ), - ], - ), - extendBodyBehindAppBar: true, - body: Stack( - children: [ - if (video != null) - Padding( - padding: const EdgeInsets.symmetric(vertical: 80.0), - child: FutureBuilder( - future: video.initialize().then((_) => video.play()), - builder: (_, __) => Center(child: VideoPlayer(video)), - ), - ), - AnimatedContainer( - duration: const Duration(seconds: 2), - padding: const EdgeInsets.symmetric( - horizontal: 8.0, - vertical: 80.0, - ), - decoration: BoxDecoration( - image: controller.image == null - ? null - : DecorationImage( - image: MemoryImage(controller.image!.bytes), - fit: BoxFit.contain, - opacity: 0.75, - ), - gradient: controller.hasMedia - ? null - : LinearGradient( - colors: [ - controller.backgroundColorDark, - controller.backgroundColor, - ], - begin: Alignment.topCenter, - end: Alignment.bottomCenter, - ), - ), - child: Center( - child: TextField( - controller: controller.controller, - focusNode: controller.focusNode, - minLines: 1, - maxLines: 15, - maxLength: 500, - autofocus: false, - textAlign: TextAlign.center, - style: TextStyle( - fontSize: 24, - color: Colors.white, - backgroundColor: !controller.hasMedia - ? null - : Colors.black.withOpacity(0.5), - ), - onChanged: (_) => controller.updateColors(), - decoration: InputDecoration( - border: InputBorder.none, - hintText: controller.hasMedia - ? L10n.of(context)!.addDescription - : L10n.of(context)!.whatIsGoingOn, - filled: false, - hintStyle: TextStyle( - color: Colors.white.withOpacity(0.5), - backgroundColor: Colors.transparent, - ), - enabledBorder: InputBorder.none, - focusedBorder: InputBorder.none, - ), - ), + if (!controller.hasMedia) + IconButton( + icon: const Icon(Icons.color_lens_outlined), + onPressed: controller.updateColor, ), + IconButton( + icon: const Icon(Icons.delete_outlined), + onPressed: controller.reset, ), ], ), - floatingActionButton: Column( + extendBodyBehindAppBar: true, + body: GestureDetector( + onVerticalDragUpdate: controller.onVerticalDragUpdate, + onHorizontalDragUpdate: controller.onHorizontalDragUpdate, + child: Stack( + children: [ + if (video != null) + Padding( + padding: const EdgeInsets.symmetric(vertical: 80.0), + child: FutureBuilder( + future: video.initialize().then((_) => video.play()), + builder: (_, __) => Center(child: VideoPlayer(video)), + ), + ), + AnimatedContainer( + duration: const Duration(seconds: 1), + padding: const EdgeInsets.symmetric( + horizontal: 8.0, + vertical: 80.0, + ), + decoration: BoxDecoration( + image: controller.image == null + ? null + : DecorationImage( + image: MemoryImage(controller.image!.bytes), + fit: controller.fit, + opacity: 0.75, + ), + gradient: controller.hasMedia + ? null + : LinearGradient( + colors: [ + controller.backgroundColorDark, + controller.backgroundColor, + ], + begin: Alignment.topCenter, + end: Alignment.bottomCenter, + ), + ), + child: Align( + alignment: Alignment( + controller.alignmentX / 100, + controller.alignmentY / 100, + ), + child: IntrinsicWidth( + child: TextField( + controller: controller.controller, + focusNode: controller.focusNode, + minLines: 1, + maxLines: 15, + maxLength: 500, + autofocus: false, + textAlign: TextAlign.center, + style: TextStyle( + fontSize: 24, + color: Colors.white, + shadows: controller.hasMedia + ? const [ + Shadow( + color: Colors.black, + offset: Offset(5, 5), + blurRadius: 20, + ), + Shadow( + color: Colors.black, + offset: Offset(5, 5), + blurRadius: 20, + ), + Shadow( + color: Colors.black, + offset: Offset(-5, -5), + blurRadius: 20, + ), + Shadow( + color: Colors.black, + offset: Offset(-5, -5), + blurRadius: 20, + ), + ] + : null, + ), + onChanged: controller.updateHasText, + decoration: InputDecoration( + border: InputBorder.none, + hintText: controller.hasMedia + ? L10n.of(context)!.addDescription + : L10n.of(context)!.whatIsGoingOn, + filled: false, + hintStyle: TextStyle( + color: Colors.white.withOpacity(0.5), + backgroundColor: Colors.transparent, + ), + enabledBorder: InputBorder.none, + focusedBorder: InputBorder.none, + ), + ), + ), + ), + ), + ], + ), + ), + floatingActionButton: Row( mainAxisSize: MainAxisSize.min, children: [ - if (!controller.hasMedia && !controller.textFieldHasFocus) ...[ - FloatingActionButton( - onPressed: controller.captureVideo, - backgroundColor: controller.backgroundColorDark, - foregroundColor: Colors.white, - heroTag: null, - child: const Icon(Icons.video_camera_front_outlined), - ), - const SizedBox(height: 16), - FloatingActionButton( - onPressed: controller.capturePhoto, - backgroundColor: controller.backgroundColorDark, - foregroundColor: Colors.white, - heroTag: null, - child: const Icon(Icons.camera_alt_outlined), - ), - const SizedBox(height: 16), + if (!controller.hasMedia) ...[ FloatingActionButton( onPressed: controller.importMedia, backgroundColor: controller.backgroundColorDark, @@ -139,9 +164,25 @@ class AddStoryView extends StatelessWidget { heroTag: null, child: const Icon(Icons.photo_outlined), ), + const SizedBox(width: 16), + FloatingActionButton( + onPressed: controller.capturePhoto, + backgroundColor: controller.backgroundColorDark, + foregroundColor: Colors.white, + heroTag: null, + child: const Icon(Icons.camera_alt_outlined), + ), + const SizedBox(width: 16), + FloatingActionButton( + onPressed: controller.captureVideo, + backgroundColor: controller.backgroundColorDark, + foregroundColor: Colors.white, + heroTag: null, + child: const Icon(Icons.video_camera_front_outlined), + ), ], if (controller.hasMedia || controller.hasText) ...[ - const SizedBox(height: 16), + const SizedBox(width: 16), FloatingActionButton( onPressed: controller.postStory, backgroundColor: Theme.of(context).colorScheme.surface, diff --git a/lib/pages/story/story_page.dart b/lib/pages/story/story_page.dart index 4955e38d..f37cf47b 100644 --- a/lib/pages/story/story_page.dart +++ b/lib/pages/story/story_page.dart @@ -19,6 +19,7 @@ import 'package:fluffychat/utils/matrix_sdk_extensions.dart/client_stories_exten import 'package:fluffychat/utils/matrix_sdk_extensions.dart/ios_badge_client_extension.dart'; import 'package:fluffychat/utils/platform_infos.dart'; import 'package:fluffychat/utils/room_status_extension.dart'; +import 'package:fluffychat/utils/story_theme_data.dart'; import 'package:fluffychat/widgets/avatar.dart'; import 'package:fluffychat/widgets/matrix.dart'; @@ -44,6 +45,10 @@ class StoryPageController extends State { Timeline? timeline; Event? get currentEvent => index < events.length ? events[index] : null; + StoryThemeData get storyThemeData => + StoryThemeData.fromJson(currentEvent?.content + .tryGetMap(StoryThemeData.contentKey) ?? + {}); bool replyLoading = false; bool _modalOpened = false; @@ -467,6 +472,14 @@ class StoryPageController extends State { case PopupStoryAction.delete: _delete(); break; + case PopupStoryAction.message: + final roomIdResult = await showFutureLoadingDialog( + context: context, + future: () => currentEvent!.sender.startDirectChat(), + ); + if (roomIdResult.error != null) return; + VRouter.of(context).toSegments(['rooms', roomIdResult.result!]); + break; } } @@ -493,4 +506,5 @@ extension on List { enum PopupStoryAction { report, delete, + message, } diff --git a/lib/pages/story/story_view.dart b/lib/pages/story/story_view.dart index 6f68a804..db4f4bdf 100644 --- a/lib/pages/story/story_view.dart +++ b/lib/pages/story/story_view.dart @@ -19,6 +19,29 @@ class StoryView extends StatelessWidget { final StoryPageController controller; const StoryView(this.controller, {Key? key}) : super(key: key); + static const List textShadows = [ + Shadow( + color: Colors.black, + offset: Offset(5, 5), + blurRadius: 20, + ), + Shadow( + color: Colors.black, + offset: Offset(5, 5), + blurRadius: 20, + ), + Shadow( + color: Colors.black, + offset: Offset(-5, -5), + blurRadius: 20, + ), + Shadow( + color: Colors.black, + offset: Offset(-5, -5), + blurRadius: 20, + ), + ]; + @override Widget build(BuildContext context) { final currentEvent = controller.currentEvent; @@ -85,6 +108,11 @@ class StoryView extends StatelessWidget { value: PopupStoryAction.report, child: Text(L10n.of(context)!.reportMessage), ), + if (!controller.isOwnStory) + PopupMenuItem( + value: PopupStoryAction.message, + child: Text(L10n.of(context)!.sendAMessage), + ), ], ), ], @@ -134,11 +162,12 @@ class StoryView extends StatelessWidget { ); } final event = events[controller.index]; - final backgroundColor = event.content.tryGet('body')?.color ?? + final backgroundColor = controller.storyThemeData.color1 ?? + event.content.tryGet('body')?.color ?? Theme.of(context).primaryColor; - final backgroundColorDark = + final backgroundColorDark = controller.storyThemeData.color2 ?? event.content.tryGet('body')?.darkColor ?? - Theme.of(context).primaryColorDark; + Theme.of(context).primaryColorDark; if (event.messageType == MessageTypes.Text) { controller.loadingModeOff(); } @@ -146,6 +175,11 @@ class StoryView extends StatelessWidget { return GestureDetector( onTapDown: controller.hold, onTapUp: controller.unhold, + onTapCancel: controller.unhold, + onVerticalDragStart: controller.hold, + onVerticalDragEnd: controller.unhold, + onHorizontalDragStart: controller.hold, + onHorizontalDragEnd: controller.unhold, child: Stack( children: [ if (hash is String) @@ -178,29 +212,23 @@ class StoryView extends StatelessWidget { if (event.messageType == MessageTypes.Image || (event.messageType == MessageTypes.Video && !PlatformInfos.isMobile)) - Positioned( - top: 80, - bottom: 64, - left: 0, - right: 0, - child: FutureBuilder( - future: controller.downloadAndDecryptAttachment( - event, event.messageType == MessageTypes.Video), - builder: (context, snapshot) { - final matrixFile = snapshot.data; - if (matrixFile == null) { - controller.loadingModeOn(); - return Container(); - } - controller.loadingModeOff(); - return Center( - child: Image.memory( - matrixFile.bytes, - fit: BoxFit.contain, - ), - ); - }, - ), + FutureBuilder( + future: controller.downloadAndDecryptAttachment( + event, event.messageType == MessageTypes.Video), + builder: (context, snapshot) { + final matrixFile = snapshot.data; + if (matrixFile == null) { + controller.loadingModeOn(); + return Container(); + } + controller.loadingModeOff(); + return Center( + child: Image.memory( + matrixFile.bytes, + fit: controller.storyThemeData.fit, + ), + ); + }, ), AnimatedContainer( duration: const Duration(milliseconds: 200), @@ -220,36 +248,31 @@ class StoryView extends StatelessWidget { ) : null, ), - alignment: Alignment.center, - child: ListView( - shrinkWrap: true, - children: [ - LinkText( - text: controller.loadingMode - ? L10n.of(context)!.loadingPleaseWait - : event.content.tryGet('body') ?? '', - textAlign: TextAlign.center, - onLinkTap: (url) => - UrlLauncher(context, url).launchUrl(), - linkStyle: TextStyle( - fontSize: 24, - color: Colors.blue.shade50, - decoration: TextDecoration.underline, - backgroundColor: - event.messageType == MessageTypes.Text - ? null - : Colors.black, - ), - textStyle: TextStyle( - fontSize: 24, - color: Colors.white, - backgroundColor: - event.messageType == MessageTypes.Text - ? null - : Colors.black, - ), - ), - ], + alignment: Alignment( + controller.storyThemeData.alignmentX.toDouble() / 100, + controller.storyThemeData.alignmentY.toDouble() / 100, + ), + child: LinkText( + text: controller.loadingMode + ? L10n.of(context)!.loadingPleaseWait + : event.content.tryGet('body') ?? '', + textAlign: TextAlign.center, + onLinkTap: (url) => UrlLauncher(context, url).launchUrl(), + linkStyle: TextStyle( + fontSize: 24, + color: Colors.blue.shade50, + decoration: TextDecoration.underline, + shadows: event.messageType == MessageTypes.Text + ? null + : textShadows, + ), + textStyle: TextStyle( + fontSize: 24, + color: Colors.white, + shadows: event.messageType == MessageTypes.Text + ? null + : textShadows, + ), ), ), Positioned( diff --git a/lib/utils/story_theme_data.dart b/lib/utils/story_theme_data.dart new file mode 100644 index 00000000..9006dcc0 --- /dev/null +++ b/lib/utils/story_theme_data.dart @@ -0,0 +1,44 @@ +import 'package:flutter/material.dart'; + +import 'package:matrix/matrix.dart'; + +class StoryThemeData { + final Color? color1; + final Color? color2; + final BoxFit fit; + final int alignmentX; + final int alignmentY; + + static const String contentKey = 'msc3588.stories.design'; + + const StoryThemeData({ + this.color1, + this.color2, + this.fit = BoxFit.contain, + this.alignmentX = 0, + this.alignmentY = 0, + }); + + factory StoryThemeData.fromJson(Map json) { + final color1Int = json.tryGet('color1'); + final color2Int = json.tryGet('color2'); + final color1 = color1Int == null ? null : Color(color1Int); + final color2 = color2Int == null ? null : Color(color2Int); + return StoryThemeData( + color1: color1, + color2: color2, + fit: + json.tryGet('fit') == 'cover' ? BoxFit.cover : BoxFit.contain, + alignmentX: json.tryGet('alignment_x') ?? 0, + alignmentY: json.tryGet('alignment_y') ?? 0, + ); + } + + Map toJson() => { + if (color1 != null) 'color1': color1?.value, + if (color2 != null) 'color2': color2?.value, + 'fit': fit.name, + 'alignment_x': alignmentX, + 'alignment_y': alignmentY, + }; +} diff --git a/macos/Podfile b/macos/Podfile index 22d9caad..22966c3f 100644 --- a/macos/Podfile +++ b/macos/Podfile @@ -1,4 +1,4 @@ -platform :osx, '10.12' +platform :osx, '12.2' # CocoaPods analytics sends network stats synchronously affecting flutter build latency. ENV['COCOAPODS_DISABLE_STATS'] = 'true' diff --git a/macos/Podfile.lock b/macos/Podfile.lock index 996364d2..5c724b57 100644 --- a/macos/Podfile.lock +++ b/macos/Podfile.lock @@ -1,10 +1,32 @@ PODS: + - assets_audio_player (0.0.1): + - FlutterMacOS + - assets_audio_player_web (0.0.1): + - FlutterMacOS - audioplayers (0.0.1): - FlutterMacOS + - connectivity_plus_macos (0.0.1): + - FlutterMacOS + - ReachabilitySwift + - desktop_drop (0.0.1): + - FlutterMacOS + - desktop_lifecycle (0.0.1): + - FlutterMacOS + - device_info_plus_macos (0.0.1): + - FlutterMacOS + - emoji_picker_flutter (0.0.1): + - FlutterMacOS - file_selector_macos (0.0.1): - FlutterMacOS - flutter_local_notifications (0.0.1): - FlutterMacOS + - flutter_secure_storage_macos (3.3.1): + - FlutterMacOS + - flutter_web_auth (0.4.0): + - FlutterMacOS + - flutter_webrtc (0.7.1): + - FlutterMacOS + - WebRTC-SDK (= 93.4577.01) - FlutterMacOS (1.0.0) - FMDB (2.7.5): - FMDB/standard (= 2.7.5) @@ -17,6 +39,7 @@ PODS: - FlutterMacOS - path_provider_macos (0.0.1): - FlutterMacOS + - ReachabilitySwift (5.0.0) - shared_preferences_macos (0.0.1): - FlutterMacOS - sqflite (0.0.2): @@ -24,13 +47,26 @@ PODS: - FMDB (>= 2.7.5) - url_launcher_macos (0.0.1): - FlutterMacOS + - video_compress (0.3.0): + - FlutterMacOS - wakelock_macos (0.0.1): - FlutterMacOS + - WebRTC-SDK (93.4577.01) DEPENDENCIES: + - assets_audio_player (from `Flutter/ephemeral/.symlinks/plugins/assets_audio_player/macos`) + - assets_audio_player_web (from `Flutter/ephemeral/.symlinks/plugins/assets_audio_player_web/macos`) - audioplayers (from `Flutter/ephemeral/.symlinks/plugins/audioplayers/macos`) + - connectivity_plus_macos (from `Flutter/ephemeral/.symlinks/plugins/connectivity_plus_macos/macos`) + - desktop_drop (from `Flutter/ephemeral/.symlinks/plugins/desktop_drop/macos`) + - desktop_lifecycle (from `Flutter/ephemeral/.symlinks/plugins/desktop_lifecycle/macos`) + - device_info_plus_macos (from `Flutter/ephemeral/.symlinks/plugins/device_info_plus_macos/macos`) + - emoji_picker_flutter (from `Flutter/ephemeral/.symlinks/plugins/emoji_picker_flutter/macos`) - file_selector_macos (from `Flutter/ephemeral/.symlinks/plugins/file_selector_macos/macos`) - flutter_local_notifications (from `Flutter/ephemeral/.symlinks/plugins/flutter_local_notifications/macos`) + - flutter_secure_storage_macos (from `Flutter/ephemeral/.symlinks/plugins/flutter_secure_storage_macos/macos`) + - flutter_web_auth (from `Flutter/ephemeral/.symlinks/plugins/flutter_web_auth/macos`) + - flutter_webrtc (from `Flutter/ephemeral/.symlinks/plugins/flutter_webrtc/macos`) - FlutterMacOS (from `Flutter/ephemeral`) - geolocator_apple (from `Flutter/ephemeral/.symlinks/plugins/geolocator_apple/macos`) - package_info (from `Flutter/ephemeral/.symlinks/plugins/package_info/macos`) @@ -39,19 +75,42 @@ DEPENDENCIES: - shared_preferences_macos (from `Flutter/ephemeral/.symlinks/plugins/shared_preferences_macos/macos`) - sqflite (from `Flutter/ephemeral/.symlinks/plugins/sqflite/macos`) - url_launcher_macos (from `Flutter/ephemeral/.symlinks/plugins/url_launcher_macos/macos`) + - video_compress (from `Flutter/ephemeral/.symlinks/plugins/video_compress/macos`) - wakelock_macos (from `Flutter/ephemeral/.symlinks/plugins/wakelock_macos/macos`) SPEC REPOS: trunk: - FMDB + - ReachabilitySwift + - WebRTC-SDK EXTERNAL SOURCES: + assets_audio_player: + :path: Flutter/ephemeral/.symlinks/plugins/assets_audio_player/macos + assets_audio_player_web: + :path: Flutter/ephemeral/.symlinks/plugins/assets_audio_player_web/macos audioplayers: :path: Flutter/ephemeral/.symlinks/plugins/audioplayers/macos + connectivity_plus_macos: + :path: Flutter/ephemeral/.symlinks/plugins/connectivity_plus_macos/macos + desktop_drop: + :path: Flutter/ephemeral/.symlinks/plugins/desktop_drop/macos + desktop_lifecycle: + :path: Flutter/ephemeral/.symlinks/plugins/desktop_lifecycle/macos + device_info_plus_macos: + :path: Flutter/ephemeral/.symlinks/plugins/device_info_plus_macos/macos + emoji_picker_flutter: + :path: Flutter/ephemeral/.symlinks/plugins/emoji_picker_flutter/macos file_selector_macos: :path: Flutter/ephemeral/.symlinks/plugins/file_selector_macos/macos flutter_local_notifications: :path: Flutter/ephemeral/.symlinks/plugins/flutter_local_notifications/macos + flutter_secure_storage_macos: + :path: Flutter/ephemeral/.symlinks/plugins/flutter_secure_storage_macos/macos + flutter_web_auth: + :path: Flutter/ephemeral/.symlinks/plugins/flutter_web_auth/macos + flutter_webrtc: + :path: Flutter/ephemeral/.symlinks/plugins/flutter_webrtc/macos FlutterMacOS: :path: Flutter/ephemeral geolocator_apple: @@ -68,24 +127,39 @@ EXTERNAL SOURCES: :path: Flutter/ephemeral/.symlinks/plugins/sqflite/macos url_launcher_macos: :path: Flutter/ephemeral/.symlinks/plugins/url_launcher_macos/macos + video_compress: + :path: Flutter/ephemeral/.symlinks/plugins/video_compress/macos wakelock_macos: :path: Flutter/ephemeral/.symlinks/plugins/wakelock_macos/macos SPEC CHECKSUMS: + assets_audio_player: be2578e6f11dd4d183412e97143673c3c4cb2e8a + assets_audio_player_web: 917101123b6db8f73156835c0fa266c11340ff15 audioplayers: 8b48e22684b6e0d9df143b2d1bbd61dca9dab6b4 + connectivity_plus_macos: f6e86fd000e971d361e54b5afcadc8c8fa773308 + desktop_drop: 69eeff437544aa619c8db7f4481b3a65f7696898 + desktop_lifecycle: a600c10e12fe033c7be9078f2e929b8241f2c1e3 + device_info_plus_macos: 1ad388a1ef433505c4038e7dd9605aadd1e2e9c7 + emoji_picker_flutter: 533634326b1c5de9a181ba14b9758e6dfe967a20 file_selector_macos: ff6dc948d4ddd34e8602a1f60b7d0b4cc6051a47 flutter_local_notifications: 3805ca215b2fb7f397d78b66db91f6a747af52e4 + flutter_secure_storage_macos: 6ceee8fbc7f484553ad17f79361b556259df89aa + flutter_web_auth: 0432fb32dd550d65cc874aa596d952b2add0ad9d + flutter_webrtc: c49ea45decce467d75b78b2004b1b58ac5a6874a FlutterMacOS: 57701585bf7de1b3fc2bb61f6378d73bbdea8424 FMDB: 2ce00b547f966261cd18927a3ddb07cb6f3db82a geolocator_apple: 821be05bbdb1b49500e029ebcbf2d6acf2dfb966 package_info: 6eba2fd8d3371dda2d85c8db6fe97488f24b74b2 package_info_plus_macos: f010621b07802a241d96d01876d6705f15e77c1c - path_provider_macos: a0a3fd666cb7cd0448e936fb4abad4052961002b + path_provider_macos: 160cab0d5461f0c0e02995469a98f24bdb9a3f1f + ReachabilitySwift: 985039c6f7b23a1da463388634119492ff86c825 shared_preferences_macos: 480ce071d0666e37cef23fe6c702293a3d21799e sqflite: a5789cceda41d54d23f31d6de539d65bb14100ea url_launcher_macos: 45af3d61de06997666568a7149c1be98b41c95d4 + video_compress: c896234f100791b5fef7f049afa38f6d2ef7b42f wakelock_macos: bc3f2a9bd8d2e6c89fee1e1822e7ddac3bd004a9 + WebRTC-SDK: 166b0e161d93d4b961f410bf7966a634f42aa17d -PODFILE CHECKSUM: c7161fcf45d4fd9025dc0f48a76d6e64e52f8176 +PODFILE CHECKSUM: 9b8d08a513b178c33212d1b54cc9e3cba756d95b COCOAPODS: 1.11.2 diff --git a/macos/Runner.xcodeproj/project.pbxproj b/macos/Runner.xcodeproj/project.pbxproj index 1ed1f8a5..0fbd142b 100644 --- a/macos/Runner.xcodeproj/project.pbxproj +++ b/macos/Runner.xcodeproj/project.pbxproj @@ -261,9 +261,20 @@ inputPaths = ( "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh", "${BUILT_PRODUCTS_DIR}/FMDB/FMDB.framework", + "${BUILT_PRODUCTS_DIR}/ReachabilitySwift/Reachability.framework", + "${BUILT_PRODUCTS_DIR}/assets_audio_player/assets_audio_player.framework", + "${BUILT_PRODUCTS_DIR}/assets_audio_player_web/assets_audio_player_web.framework", "${BUILT_PRODUCTS_DIR}/audioplayers/audioplayers.framework", + "${BUILT_PRODUCTS_DIR}/connectivity_plus_macos/connectivity_plus_macos.framework", + "${BUILT_PRODUCTS_DIR}/desktop_drop/desktop_drop.framework", + "${BUILT_PRODUCTS_DIR}/desktop_lifecycle/desktop_lifecycle.framework", + "${BUILT_PRODUCTS_DIR}/device_info_plus_macos/device_info_plus_macos.framework", + "${BUILT_PRODUCTS_DIR}/emoji_picker_flutter/emoji_picker_flutter.framework", "${BUILT_PRODUCTS_DIR}/file_selector_macos/file_selector_macos.framework", "${BUILT_PRODUCTS_DIR}/flutter_local_notifications/flutter_local_notifications.framework", + "${BUILT_PRODUCTS_DIR}/flutter_secure_storage_macos/flutter_secure_storage_macos.framework", + "${BUILT_PRODUCTS_DIR}/flutter_web_auth/flutter_web_auth.framework", + "${BUILT_PRODUCTS_DIR}/flutter_webrtc/flutter_webrtc.framework", "${BUILT_PRODUCTS_DIR}/geolocator_apple/geolocator_apple.framework", "${BUILT_PRODUCTS_DIR}/package_info/package_info.framework", "${BUILT_PRODUCTS_DIR}/package_info_plus_macos/package_info_plus_macos.framework", @@ -271,14 +282,27 @@ "${BUILT_PRODUCTS_DIR}/shared_preferences_macos/shared_preferences_macos.framework", "${BUILT_PRODUCTS_DIR}/sqflite/sqflite.framework", "${BUILT_PRODUCTS_DIR}/url_launcher_macos/url_launcher_macos.framework", + "${BUILT_PRODUCTS_DIR}/video_compress/video_compress.framework", "${BUILT_PRODUCTS_DIR}/wakelock_macos/wakelock_macos.framework", + "${PODS_XCFRAMEWORKS_BUILD_DIR}/WebRTC-SDK/WebRTC.framework/WebRTC", ); name = "[CP] Embed Pods Frameworks"; outputPaths = ( "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/FMDB.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Reachability.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/assets_audio_player.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/assets_audio_player_web.framework", "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/audioplayers.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/connectivity_plus_macos.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/desktop_drop.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/desktop_lifecycle.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/device_info_plus_macos.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/emoji_picker_flutter.framework", "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/file_selector_macos.framework", "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/flutter_local_notifications.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/flutter_secure_storage_macos.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/flutter_web_auth.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/flutter_webrtc.framework", "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/geolocator_apple.framework", "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/package_info.framework", "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/package_info_plus_macos.framework", @@ -286,7 +310,9 @@ "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/shared_preferences_macos.framework", "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/sqflite.framework", "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/url_launcher_macos.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/video_compress.framework", "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/wakelock_macos.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/WebRTC.framework", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; @@ -426,7 +452,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - MACOSX_DEPLOYMENT_TARGET = 10.11; + MACOSX_DEPLOYMENT_TARGET = 12.2; MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = macosx; SWIFT_COMPILATION_MODE = wholemodule; @@ -511,7 +537,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - MACOSX_DEPLOYMENT_TARGET = 10.11; + MACOSX_DEPLOYMENT_TARGET = 12.2; MTL_ENABLE_DEBUG_INFO = YES; ONLY_ACTIVE_ARCH = YES; SDKROOT = macosx; @@ -558,7 +584,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - MACOSX_DEPLOYMENT_TARGET = 10.11; + MACOSX_DEPLOYMENT_TARGET = 12.2; MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = macosx; SWIFT_COMPILATION_MODE = wholemodule; diff --git a/pubspec.yaml b/pubspec.yaml index cae78753..4aedef5c 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -24,7 +24,7 @@ dependencies: desktop_notifications: ^0.6.3 device_info_plus: ^3.2.1 email_validator: ^2.0.1 - emoji_picker_flutter: ^1.1.1 + emoji_picker_flutter: ^1.1.2 encrypt: ^5.0.1 #fcm_shared_isolate: # git: https://gitlab.com/famedly/libraries/fcm_shared_isolate.git diff --git a/scripts/enable-android-google-services.patch b/scripts/enable-android-google-services.patch index b646dd1d..fc2b34b0 100644 --- a/scripts/enable-android-google-services.patch +++ b/scripts/enable-android-google-services.patch @@ -83,7 +83,7 @@ index 73b9eca2..5e6f9f16 100644 +++ b/pubspec.yaml @@ -25,8 +25,8 @@ dependencies: email_validator: ^2.0.1 - emoji_picker_flutter: ^1.1.1 + emoji_picker_flutter: ^1.1.2 encrypt: ^5.0.1 - #fcm_shared_isolate: - # git: https://gitlab.com/famedly/libraries/fcm_shared_isolate.git