From e374e0335567ac46584b19319804fc1c719f2c2f Mon Sep 17 00:00:00 2001 From: Alberto Ponces Date: Tue, 20 Sep 2022 02:38:28 +0100 Subject: [PATCH] fix: Readd padding between Application Items --- lib/ui/widgets/shared/application_item.dart | 104 ++++++++++---------- 1 file changed, 54 insertions(+), 50 deletions(-) diff --git a/lib/ui/widgets/shared/application_item.dart b/lib/ui/widgets/shared/application_item.dart index be0f4fb7..d59faec6 100644 --- a/lib/ui/widgets/shared/application_item.dart +++ b/lib/ui/widgets/shared/application_item.dart @@ -60,64 +60,68 @@ class _ApplicationItemState extends State hasIcon: false, animationDuration: Duration(milliseconds: 450), ), - header: CustomCard( - onTap: () { - expController.toggle(); - _animationController.isCompleted - ? _animationController.reverse() - : _animationController.forward(); - }, - child: Row( - children: [ - SizedBox( - width: 40, - child: Image.memory(widget.icon, height: 40, width: 40), - ), - const SizedBox(width: 4), - Padding( - padding: const EdgeInsets.only(left: 15.0), - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Text( - widget.name.length > 9 - ? '${widget.name.substring(0, 9)}...' - : widget.name, - style: const TextStyle( - fontSize: 16, - fontWeight: FontWeight.w500, + header: Padding( + padding: const EdgeInsets.only(bottom: 16.0), + child: CustomCard( + onTap: () { + expController.toggle(); + _animationController.isCompleted + ? _animationController.reverse() + : _animationController.forward(); + }, + child: Row( + children: [ + SizedBox( + width: 40, + child: Image.memory(widget.icon, height: 40, width: 40), + ), + const SizedBox(width: 4), + Padding( + padding: const EdgeInsets.only(left: 15.0), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + widget.name.length > 9 + ? '${widget.name.substring(0, 9)}...' + : widget.name, + style: const TextStyle( + fontSize: 16, + fontWeight: FontWeight.w500, + ), ), + Text(format(widget.patchDate)), + ], + ), + ), + const Spacer(), + RotationTransition( + turns: + Tween(begin: 0.0, end: 0.50).animate(_animationController), + child: const Padding( + padding: EdgeInsets.all(8.0), + child: Icon(Icons.arrow_drop_down), + ), + ), + Column( + mainAxisAlignment: MainAxisAlignment.center, + crossAxisAlignment: CrossAxisAlignment.end, + children: [ + CustomMaterialButton( + label: widget.isUpdatableApp + ? I18nText('applicationItem.patchButton') + : I18nText('applicationItem.infoButton'), + onPressed: widget.onPressed, ), - Text(format(widget.patchDate)), ], ), - ), - const Spacer(), - RotationTransition( - turns: Tween(begin: 0.0, end: 0.50).animate(_animationController), - child: const Padding( - padding: EdgeInsets.all(8.0), - child: Icon(Icons.arrow_drop_down), - ), - ), - Column( - mainAxisAlignment: MainAxisAlignment.center, - crossAxisAlignment: CrossAxisAlignment.end, - children: [ - CustomMaterialButton( - label: widget.isUpdatableApp - ? I18nText('applicationItem.patchButton') - : I18nText('applicationItem.infoButton'), - onPressed: widget.onPressed, - ), - ], - ), - ], + ], + ), ), ), collapsed: const SizedBox(), expanded: Padding( - padding: const EdgeInsets.symmetric(vertical: 16.0, horizontal: 16.0), + padding: const EdgeInsets.all(16.0).copyWith(top: 0.0), child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [