From 22ac4ed496ffc45e9d1e99bc75f79ebfe64f2b78 Mon Sep 17 00:00:00 2001 From: Nikolas Rimikis Date: Thu, 2 Nov 2023 15:41:07 +0100 Subject: [PATCH] perf(neon_notifications): do not use the spread operator for building lists Signed-off-by: Nikolas Rimikis --- .../neon/neon_notifications/lib/pages/main.dart | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/packages/neon/neon_notifications/lib/pages/main.dart b/packages/neon/neon_notifications/lib/pages/main.dart index 7783f2d3..3b411922 100644 --- a/packages/neon/neon_notifications/lib/pages/main.dart +++ b/packages/neon/neon_notifications/lib/pages/main.dart @@ -61,15 +61,14 @@ class _NotificationsMainPageState extends State { subtitle: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ - if (notification.message.isNotEmpty) ...[ - Text( - notification.message, - overflow: TextOverflow.ellipsis, - ), - const SizedBox( - height: 5, + if (notification.message.isNotEmpty) + Padding( + padding: const EdgeInsets.only(bottom: 5), + child: Text( + notification.message, + overflow: TextOverflow.ellipsis, + ), ), - ], RelativeTime( date: DateTime.parse(notification.datetime), ),