diff --git a/lib/screens/chat/room.dart b/lib/screens/chat/room.dart index ed2a4c88..8e744f74 100644 --- a/lib/screens/chat/room.dart +++ b/lib/screens/chat/room.dart @@ -654,70 +654,88 @@ class ChatRoomScreen extends HookConsumerWidget { } } - Widget chatMessageListWidget( - List messageList, - ) => AnimatedPadding( - duration: const Duration(milliseconds: 200), - curve: Curves.easeOut, - padding: EdgeInsets.only( - bottom: MediaQuery.of(context).padding.bottom + 8 + inputHeight.value, - ), - child: SuperListView.builder( - listController: listController, - controller: scrollController, - reverse: true, // Show newest messages at the bottom - itemCount: messageList.length, - findChildIndexCallback: (key) { - if (key is! ValueKey) return null; - final messageId = key.value.substring(messageKeyPrefix.length); - final index = messageList.indexWhere( - (m) => (m.nonce ?? m.id) == messageId, - ); - return index >= 0 ? index : null; - }, - extentEstimation: (_, _) => 40, - itemBuilder: (context, index) { - final message = messageList[index]; - final nextMessage = - index < messageList.length - 1 ? messageList[index + 1] : null; - final isLastInGroup = - nextMessage == null || - nextMessage.senderId != message.senderId || - nextMessage.createdAt - .difference(message.createdAt) - .inMinutes - .abs() > - 3; - - final key = Key('$messageKeyPrefix${message.nonce ?? message.id}'); - - return MessageItemWrapper( - key: key, - message: message, - index: index, - isLastInGroup: isLastInGroup, - isSelectionMode: isSelectionMode.value, - selectedMessages: selectedMessages.value, - chatIdentity: chatIdentity, - toggleSelectionMode: toggleSelectionMode, - toggleMessageSelection: toggleMessageSelection, - onMessageAction: onMessageAction, - onJump: - (messageId) => scrollToMessage( - messageId: messageId, - messageList: messageList, - messagesNotifier: messagesNotifier, - listController: listController, - scrollController: scrollController, - ref: ref, + Widget chatMessageListWidget(List messageList) => + ValueListenableBuilder( + valueListenable: inputHeight, + builder: (context, height, child) { + return TweenAnimationBuilder( + duration: const Duration(milliseconds: 200), + curve: Curves.easeOut, + tween: EdgeInsetsTween( + begin: EdgeInsets.only( + bottom: MediaQuery.of(context).padding.bottom + 8 + height, ), - attachmentProgress: attachmentProgress.value, - disableAnimation: settings.disableAnimation, - roomOpenTime: roomOpenTime, - ); - }, - ), - ); + end: EdgeInsets.only( + bottom: MediaQuery.of(context).padding.bottom + 8 + height, + ), + ), + builder: (context, padding, child) { + return SuperListView.builder( + listController: listController, + controller: scrollController, + reverse: true, // Show newest messages at the bottom + padding: padding, + itemCount: messageList.length, + findChildIndexCallback: (key) { + if (key is! ValueKey) return null; + final messageId = key.value.substring( + messageKeyPrefix.length, + ); + final index = messageList.indexWhere( + (m) => (m.nonce ?? m.id) == messageId, + ); + return index >= 0 ? index : null; + }, + extentEstimation: (_, _) => 40, + itemBuilder: (context, index) { + final message = messageList[index]; + final nextMessage = + index < messageList.length - 1 + ? messageList[index + 1] + : null; + final isLastInGroup = + nextMessage == null || + nextMessage.senderId != message.senderId || + nextMessage.createdAt + .difference(message.createdAt) + .inMinutes + .abs() > + 3; + + final key = Key( + '$messageKeyPrefix${message.nonce ?? message.id}', + ); + + return MessageItemWrapper( + key: key, + message: message, + index: index, + isLastInGroup: isLastInGroup, + isSelectionMode: isSelectionMode.value, + selectedMessages: selectedMessages.value, + chatIdentity: chatIdentity, + toggleSelectionMode: toggleSelectionMode, + toggleMessageSelection: toggleMessageSelection, + onMessageAction: onMessageAction, + onJump: + (messageId) => scrollToMessage( + messageId: messageId, + messageList: messageList, + messagesNotifier: messagesNotifier, + listController: listController, + scrollController: scrollController, + ref: ref, + ), + attachmentProgress: attachmentProgress.value, + disableAnimation: settings.disableAnimation, + roomOpenTime: roomOpenTime, + ); + }, + ); + }, + ); + }, + ); return AppScaffold( appBar: AppBar( diff --git a/lib/screens/developers/hub.dart b/lib/screens/developers/hub.dart index a4418d96..0158f5f1 100644 --- a/lib/screens/developers/hub.dart +++ b/lib/screens/developers/hub.dart @@ -109,40 +109,44 @@ class DeveloperHubScreen extends HookConsumerWidget { ), ) else - _MainContentSection( - currentDeveloper: currentDeveloper.value, - projects: projects, - developerStats: developerStats, - onProjectSelected: (project) { - currentProject.value = project; - }, - onDeveloperSelected: (developer) { - currentDeveloper.value = developer; - }, - onCreateProject: () { - if (currentDeveloper.value != null) { - showModalBottomSheet( - context: context, - isScrollControlled: true, - builder: - (context) => SheetScaffold( - titleText: 'createProject'.tr(), - child: ProjectForm( - publisherName: - currentDeveloper.value!.publisher!.name, - ), - ), - ).then((value) { - if (value != null) { - ref.invalidate( - devProjectsProvider( - currentDeveloper.value!.publisher!.name, - ), - ); + Expanded( + child: Center( + child: _MainContentSection( + currentDeveloper: currentDeveloper.value, + projects: projects, + developerStats: developerStats, + onProjectSelected: (project) { + currentProject.value = project; + }, + onDeveloperSelected: (developer) { + currentDeveloper.value = developer; + }, + onCreateProject: () { + if (currentDeveloper.value != null) { + showModalBottomSheet( + context: context, + isScrollControlled: true, + builder: + (context) => SheetScaffold( + titleText: 'createProject'.tr(), + child: ProjectForm( + publisherName: + currentDeveloper.value!.publisher!.name, + ), + ), + ).then((value) { + if (value != null) { + ref.invalidate( + devProjectsProvider( + currentDeveloper.value!.publisher!.name, + ), + ); + } + }); } - }); - } - }, + }, + ), + ), ), ], ), @@ -210,9 +214,12 @@ class _MainContentSection extends HookConsumerWidget { data: (stats) => currentDeveloper == null - ? _DeveloperUnselectedWidget( - onDeveloperSelected: onDeveloperSelected, - ) + ? ConstrainedBox( + constraints: BoxConstraints(maxWidth: 640), + child: _DeveloperUnselectedWidget( + onDeveloperSelected: onDeveloperSelected, + ), + ).center() : Padding( padding: const EdgeInsets.all(16), child: Column( @@ -725,6 +732,7 @@ class _DeveloperUnselectedWidget extends HookConsumerWidget { return Card( margin: const EdgeInsets.all(16), child: Column( + mainAxisSize: MainAxisSize.min, children: [ if (!hasDevelopers) ...[ const Icon( diff --git a/lib/widgets/account/friends_overview.dart b/lib/widgets/account/friends_overview.dart index ffed56b8..1da974c7 100644 --- a/lib/widgets/account/friends_overview.dart +++ b/lib/widgets/account/friends_overview.dart @@ -182,6 +182,7 @@ class _FriendTile extends ConsumerWidget { Symbols.play_arrow, size: 10, color: Colors.white, + fill: 1, ) : null, ), diff --git a/macos/Podfile.lock b/macos/Podfile.lock index 1bd3914f..ad4e55e1 100644 --- a/macos/Podfile.lock +++ b/macos/Podfile.lock @@ -171,7 +171,7 @@ PODS: - irondash_engine_context (0.0.1): - FlutterMacOS - KeychainAccess (4.2.2) - - livekit_client (2.5.3): + - livekit_client (2.5.4): - flutter_webrtc - FlutterMacOS - WebRTC-SDK (= 137.7151.04) @@ -187,13 +187,14 @@ PODS: - nanopb/encode (= 3.30910.0) - nanopb/decode (3.30910.0) - nanopb/encode (3.30910.0) - - objective_c (0.0.1): - - FlutterMacOS - OrderedSet (6.0.3) - package_info_plus (0.0.1): - FlutterMacOS - pasteboard (0.0.1): - FlutterMacOS + - path_provider_foundation (0.0.1): + - Flutter + - FlutterMacOS - PromisesObjC (2.4.0) - PromisesSwift (2.4.0): - PromisesObjC (= 2.4.0) @@ -277,9 +278,9 @@ DEPENDENCIES: - local_auth_darwin (from `Flutter/ephemeral/.symlinks/plugins/local_auth_darwin/darwin`) - media_kit_libs_macos_video (from `Flutter/ephemeral/.symlinks/plugins/media_kit_libs_macos_video/macos`) - media_kit_video (from `Flutter/ephemeral/.symlinks/plugins/media_kit_video/macos`) - - objective_c (from `Flutter/ephemeral/.symlinks/plugins/objective_c/macos`) - package_info_plus (from `Flutter/ephemeral/.symlinks/plugins/package_info_plus/macos`) - pasteboard (from `Flutter/ephemeral/.symlinks/plugins/pasteboard/macos`) + - path_provider_foundation (from `Flutter/ephemeral/.symlinks/plugins/path_provider_foundation/darwin`) - protocol_handler_macos (from `Flutter/ephemeral/.symlinks/plugins/protocol_handler_macos/macos`) - record_macos (from `Flutter/ephemeral/.symlinks/plugins/record_macos/macos`) - screen_retriever_macos (from `Flutter/ephemeral/.symlinks/plugins/screen_retriever_macos/macos`) @@ -367,12 +368,12 @@ EXTERNAL SOURCES: :path: Flutter/ephemeral/.symlinks/plugins/media_kit_libs_macos_video/macos media_kit_video: :path: Flutter/ephemeral/.symlinks/plugins/media_kit_video/macos - objective_c: - :path: Flutter/ephemeral/.symlinks/plugins/objective_c/macos package_info_plus: :path: Flutter/ephemeral/.symlinks/plugins/package_info_plus/macos pasteboard: :path: Flutter/ephemeral/.symlinks/plugins/pasteboard/macos + path_provider_foundation: + :path: Flutter/ephemeral/.symlinks/plugins/path_provider_foundation/darwin protocol_handler_macos: :path: Flutter/ephemeral/.symlinks/plugins/protocol_handler_macos/macos record_macos: @@ -437,15 +438,15 @@ SPEC CHECKSUMS: GoogleUtilities: 00c88b9a86066ef77f0da2fab05f65d7768ed8e1 irondash_engine_context: 893c7d96d20ce361d7e996f39d360c4c2f9869ba KeychainAccess: c0c4f7f38f6fc7bbe58f5702e25f7bd2f65abf51 - livekit_client: a6d5ae8aaeebf3e52235da866fea00f43156c72b + livekit_client: 3df5a1787d64010ca56c4002959d9e47c03ba3fb local_auth_darwin: c3ee6cce0a8d56be34c8ccb66ba31f7f180aaebb media_kit_libs_macos_video: 85a23e549b5f480e72cae3e5634b5514bc692f65 media_kit_video: fa6564e3799a0a28bff39442334817088b7ca758 nanopb: fad817b59e0457d11a5dfbde799381cd727c1275 - objective_c: ec13431e45ba099cb734eb2829a5c1cd37986cba OrderedSet: e539b66b644ff081c73a262d24ad552a69be3a94 package_info_plus: f0052d280d17aa382b932f399edf32507174e870 pasteboard: 278d8100149f940fb795d6b3a74f0720c890ecb7 + path_provider_foundation: bb55f6dbba17d0dccd6737fe6f7f34fbd0376880 PromisesObjC: f5707f49cb48b9636751c5b2e7d227e43fba9f47 PromisesSwift: 9d77319bbe72ebf6d872900551f7eeba9bce2851 protocol_handler_macos: f9cd7b13bcaf6b0425f7410cbe52376cb843a936