🐛 Fix some styling issues

This commit is contained in:
2025-11-30 15:42:51 +08:00
parent 4a7ff96a8b
commit 7bc44e8f06
4 changed files with 135 additions and 107 deletions

View File

@@ -654,70 +654,88 @@ class ChatRoomScreen extends HookConsumerWidget {
} }
} }
Widget chatMessageListWidget( Widget chatMessageListWidget(List<LocalChatMessage> messageList) =>
List<LocalChatMessage> messageList, ValueListenableBuilder<double>(
) => AnimatedPadding( valueListenable: inputHeight,
duration: const Duration(milliseconds: 200), builder: (context, height, child) {
curve: Curves.easeOut, return TweenAnimationBuilder<EdgeInsets>(
padding: EdgeInsets.only( duration: const Duration(milliseconds: 200),
bottom: MediaQuery.of(context).padding.bottom + 8 + inputHeight.value, curve: Curves.easeOut,
), tween: EdgeInsetsTween(
child: SuperListView.builder( begin: EdgeInsets.only(
listController: listController, bottom: MediaQuery.of(context).padding.bottom + 8 + height,
controller: scrollController,
reverse: true, // Show newest messages at the bottom
itemCount: messageList.length,
findChildIndexCallback: (key) {
if (key is! ValueKey<String>) 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, end: EdgeInsets.only(
disableAnimation: settings.disableAnimation, bottom: MediaQuery.of(context).padding.bottom + 8 + height,
roomOpenTime: roomOpenTime, ),
); ),
}, 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<String>) 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( return AppScaffold(
appBar: AppBar( appBar: AppBar(

View File

@@ -109,40 +109,44 @@ class DeveloperHubScreen extends HookConsumerWidget {
), ),
) )
else else
_MainContentSection( Expanded(
currentDeveloper: currentDeveloper.value, child: Center(
projects: projects, child: _MainContentSection(
developerStats: developerStats, currentDeveloper: currentDeveloper.value,
onProjectSelected: (project) { projects: projects,
currentProject.value = project; developerStats: developerStats,
}, onProjectSelected: (project) {
onDeveloperSelected: (developer) { currentProject.value = project;
currentDeveloper.value = developer; },
}, onDeveloperSelected: (developer) {
onCreateProject: () { currentDeveloper.value = developer;
if (currentDeveloper.value != null) { },
showModalBottomSheet( onCreateProject: () {
context: context, if (currentDeveloper.value != null) {
isScrollControlled: true, showModalBottomSheet(
builder: context: context,
(context) => SheetScaffold( isScrollControlled: true,
titleText: 'createProject'.tr(), builder:
child: ProjectForm( (context) => SheetScaffold(
publisherName: titleText: 'createProject'.tr(),
currentDeveloper.value!.publisher!.name, child: ProjectForm(
), publisherName:
), currentDeveloper.value!.publisher!.name,
).then((value) { ),
if (value != null) { ),
ref.invalidate( ).then((value) {
devProjectsProvider( if (value != null) {
currentDeveloper.value!.publisher!.name, ref.invalidate(
), devProjectsProvider(
); currentDeveloper.value!.publisher!.name,
),
);
}
});
} }
}); },
} ),
}, ),
), ),
], ],
), ),
@@ -210,9 +214,12 @@ class _MainContentSection extends HookConsumerWidget {
data: data:
(stats) => (stats) =>
currentDeveloper == null currentDeveloper == null
? _DeveloperUnselectedWidget( ? ConstrainedBox(
onDeveloperSelected: onDeveloperSelected, constraints: BoxConstraints(maxWidth: 640),
) child: _DeveloperUnselectedWidget(
onDeveloperSelected: onDeveloperSelected,
),
).center()
: Padding( : Padding(
padding: const EdgeInsets.all(16), padding: const EdgeInsets.all(16),
child: Column( child: Column(
@@ -725,6 +732,7 @@ class _DeveloperUnselectedWidget extends HookConsumerWidget {
return Card( return Card(
margin: const EdgeInsets.all(16), margin: const EdgeInsets.all(16),
child: Column( child: Column(
mainAxisSize: MainAxisSize.min,
children: [ children: [
if (!hasDevelopers) ...[ if (!hasDevelopers) ...[
const Icon( const Icon(

View File

@@ -182,6 +182,7 @@ class _FriendTile extends ConsumerWidget {
Symbols.play_arrow, Symbols.play_arrow,
size: 10, size: 10,
color: Colors.white, color: Colors.white,
fill: 1,
) )
: null, : null,
), ),

View File

@@ -171,7 +171,7 @@ PODS:
- irondash_engine_context (0.0.1): - irondash_engine_context (0.0.1):
- FlutterMacOS - FlutterMacOS
- KeychainAccess (4.2.2) - KeychainAccess (4.2.2)
- livekit_client (2.5.3): - livekit_client (2.5.4):
- flutter_webrtc - flutter_webrtc
- FlutterMacOS - FlutterMacOS
- WebRTC-SDK (= 137.7151.04) - WebRTC-SDK (= 137.7151.04)
@@ -187,13 +187,14 @@ PODS:
- nanopb/encode (= 3.30910.0) - nanopb/encode (= 3.30910.0)
- nanopb/decode (3.30910.0) - nanopb/decode (3.30910.0)
- nanopb/encode (3.30910.0) - nanopb/encode (3.30910.0)
- objective_c (0.0.1):
- FlutterMacOS
- OrderedSet (6.0.3) - OrderedSet (6.0.3)
- package_info_plus (0.0.1): - package_info_plus (0.0.1):
- FlutterMacOS - FlutterMacOS
- pasteboard (0.0.1): - pasteboard (0.0.1):
- FlutterMacOS - FlutterMacOS
- path_provider_foundation (0.0.1):
- Flutter
- FlutterMacOS
- PromisesObjC (2.4.0) - PromisesObjC (2.4.0)
- PromisesSwift (2.4.0): - PromisesSwift (2.4.0):
- PromisesObjC (= 2.4.0) - PromisesObjC (= 2.4.0)
@@ -277,9 +278,9 @@ DEPENDENCIES:
- local_auth_darwin (from `Flutter/ephemeral/.symlinks/plugins/local_auth_darwin/darwin`) - 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_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`) - 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`) - package_info_plus (from `Flutter/ephemeral/.symlinks/plugins/package_info_plus/macos`)
- pasteboard (from `Flutter/ephemeral/.symlinks/plugins/pasteboard/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`) - protocol_handler_macos (from `Flutter/ephemeral/.symlinks/plugins/protocol_handler_macos/macos`)
- record_macos (from `Flutter/ephemeral/.symlinks/plugins/record_macos/macos`) - record_macos (from `Flutter/ephemeral/.symlinks/plugins/record_macos/macos`)
- screen_retriever_macos (from `Flutter/ephemeral/.symlinks/plugins/screen_retriever_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 :path: Flutter/ephemeral/.symlinks/plugins/media_kit_libs_macos_video/macos
media_kit_video: media_kit_video:
:path: Flutter/ephemeral/.symlinks/plugins/media_kit_video/macos :path: Flutter/ephemeral/.symlinks/plugins/media_kit_video/macos
objective_c:
:path: Flutter/ephemeral/.symlinks/plugins/objective_c/macos
package_info_plus: package_info_plus:
:path: Flutter/ephemeral/.symlinks/plugins/package_info_plus/macos :path: Flutter/ephemeral/.symlinks/plugins/package_info_plus/macos
pasteboard: pasteboard:
:path: Flutter/ephemeral/.symlinks/plugins/pasteboard/macos :path: Flutter/ephemeral/.symlinks/plugins/pasteboard/macos
path_provider_foundation:
:path: Flutter/ephemeral/.symlinks/plugins/path_provider_foundation/darwin
protocol_handler_macos: protocol_handler_macos:
:path: Flutter/ephemeral/.symlinks/plugins/protocol_handler_macos/macos :path: Flutter/ephemeral/.symlinks/plugins/protocol_handler_macos/macos
record_macos: record_macos:
@@ -437,15 +438,15 @@ SPEC CHECKSUMS:
GoogleUtilities: 00c88b9a86066ef77f0da2fab05f65d7768ed8e1 GoogleUtilities: 00c88b9a86066ef77f0da2fab05f65d7768ed8e1
irondash_engine_context: 893c7d96d20ce361d7e996f39d360c4c2f9869ba irondash_engine_context: 893c7d96d20ce361d7e996f39d360c4c2f9869ba
KeychainAccess: c0c4f7f38f6fc7bbe58f5702e25f7bd2f65abf51 KeychainAccess: c0c4f7f38f6fc7bbe58f5702e25f7bd2f65abf51
livekit_client: a6d5ae8aaeebf3e52235da866fea00f43156c72b livekit_client: 3df5a1787d64010ca56c4002959d9e47c03ba3fb
local_auth_darwin: c3ee6cce0a8d56be34c8ccb66ba31f7f180aaebb local_auth_darwin: c3ee6cce0a8d56be34c8ccb66ba31f7f180aaebb
media_kit_libs_macos_video: 85a23e549b5f480e72cae3e5634b5514bc692f65 media_kit_libs_macos_video: 85a23e549b5f480e72cae3e5634b5514bc692f65
media_kit_video: fa6564e3799a0a28bff39442334817088b7ca758 media_kit_video: fa6564e3799a0a28bff39442334817088b7ca758
nanopb: fad817b59e0457d11a5dfbde799381cd727c1275 nanopb: fad817b59e0457d11a5dfbde799381cd727c1275
objective_c: ec13431e45ba099cb734eb2829a5c1cd37986cba
OrderedSet: e539b66b644ff081c73a262d24ad552a69be3a94 OrderedSet: e539b66b644ff081c73a262d24ad552a69be3a94
package_info_plus: f0052d280d17aa382b932f399edf32507174e870 package_info_plus: f0052d280d17aa382b932f399edf32507174e870
pasteboard: 278d8100149f940fb795d6b3a74f0720c890ecb7 pasteboard: 278d8100149f940fb795d6b3a74f0720c890ecb7
path_provider_foundation: bb55f6dbba17d0dccd6737fe6f7f34fbd0376880
PromisesObjC: f5707f49cb48b9636751c5b2e7d227e43fba9f47 PromisesObjC: f5707f49cb48b9636751c5b2e7d227e43fba9f47
PromisesSwift: 9d77319bbe72ebf6d872900551f7eeba9bce2851 PromisesSwift: 9d77319bbe72ebf6d872900551f7eeba9bce2851
protocol_handler_macos: f9cd7b13bcaf6b0425f7410cbe52376cb843a936 protocol_handler_macos: f9cd7b13bcaf6b0425f7410cbe52376cb843a936