From 3dce7c8f49178084ff74ff9506971b8654964435 Mon Sep 17 00:00:00 2001 From: Inex Code Date: Fri, 1 Nov 2024 16:33:50 +0300 Subject: [PATCH] refactor(ui): Update the ProgressDrawer style --- .../components/drawers/progress_drawer.dart | 67 ++++++++++--------- 1 file changed, 36 insertions(+), 31 deletions(-) diff --git a/lib/ui/components/drawers/progress_drawer.dart b/lib/ui/components/drawers/progress_drawer.dart index d886da02..43fe451f 100644 --- a/lib/ui/components/drawers/progress_drawer.dart +++ b/lib/ui/components/drawers/progress_drawer.dart @@ -25,39 +25,44 @@ class ProgressDrawer extends StatelessWidget { width: 300, height: constraints.maxHeight, child: Drawer( - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Padding( - padding: const EdgeInsets.all(16.0), - child: Text( - title, - style: Theme.of(context).textTheme.titleLarge, - ), - ), - Flexible( - fit: FlexFit.tight, - child: SingleChildScrollView( - child: Column( - children: [ - ...steps.map((final step) { - final index = steps.indexOf(step); - return _StepIndicator( - title: step.tr(), - isCurrent: index == currentStep, - isCompleted: index < currentStep, - ); - }), - ], + child: SafeArea( + child: Padding( + padding: const EdgeInsets.all(12.0), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Padding( + padding: const EdgeInsets.fromLTRB(16.0, 8.0, 8.0, 8.0), + child: Text( + title, + style: Theme.of(context).textTheme.titleLarge, + ), ), - ), + Flexible( + fit: FlexFit.tight, + child: SingleChildScrollView( + child: Column( + children: [ + ...steps.map((final step) { + final index = steps.indexOf(step); + return _StepIndicator( + title: step.tr(), + isCurrent: index == currentStep, + isCompleted: index < currentStep, + ); + }), + ], + ), + ), + ), + // const Spacer(), + Padding( + padding: const EdgeInsets.only(top: 8.0), + child: trailing, + ), + ], ), - // const Spacer(), - Padding( - padding: const EdgeInsets.all(16.0), - child: trailing, - ), - ], + ), ), ), );