From 4b75ecc2354b33404fd2258f53e747721b1ac84f Mon Sep 17 00:00:00 2001 From: Igor Kulikov Date: Tue, 6 Jul 2021 11:05:15 +0300 Subject: [PATCH] Improve device card layout --- lib/modules/device/devices_base.dart | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/lib/modules/device/devices_base.dart b/lib/modules/device/devices_base.dart index 4eb8e73..f2dac45 100644 --- a/lib/modules/device/devices_base.dart +++ b/lib/modules/device/devices_base.dart @@ -202,17 +202,21 @@ class _DeviceCardState extends TbContextState { mainAxisSize: MainAxisSize.max, mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ - FittedBox( - fit: BoxFit.fitWidth, - alignment: Alignment.centerLeft, - child: Text('${widget.device.field('name')!}', - style: TextStyle( - color: Color(0xFF282828), - fontSize: 14, - fontWeight: FontWeight.w500, - height: 20 / 14 - )) + Flexible( + fit: FlexFit.tight, + child: FittedBox( + fit: BoxFit.scaleDown, + alignment: Alignment.centerLeft, + child: Text('${widget.device.field('name')!}', + style: TextStyle( + color: Color(0xFF282828), + fontSize: 14, + fontWeight: FontWeight.w500, + height: 20 / 14 + )) + ) ), + SizedBox(width: 12), Text(entityDateFormat.format(DateTime.fromMillisecondsSinceEpoch(widget.device.createdTime!)), style: TextStyle( color: Color(0xFFAFAFAF),