From 96b7ec04401baebaacc7c135f5f2630f678b8f0d Mon Sep 17 00:00:00 2001 From: Vadim Date: Thu, 23 Mar 2023 23:15:54 +0300 Subject: [PATCH] removed `enabled` param from settings section --- .../widget_settings_section.dart | 45 +++++++------------ 1 file changed, 15 insertions(+), 30 deletions(-) diff --git a/lib/screens/settings/components/shared/settings_section/widget_settings_section.dart b/lib/screens/settings/components/shared/settings_section/widget_settings_section.dart index cac35dd..be62847 100644 --- a/lib/screens/settings/components/shared/settings_section/widget_settings_section.dart +++ b/lib/screens/settings/components/shared/settings_section/widget_settings_section.dart @@ -4,12 +4,10 @@ import 'package:lightmeter/res/dimens.dart'; class SettingsSection extends StatelessWidget { final String title; final List children; - final bool enabled; const SettingsSection({ required this.title, required this.children, - this.enabled = true, super.key, }); @@ -25,35 +23,22 @@ class SettingsSection extends StatelessWidget { child: Card( child: Padding( padding: const EdgeInsets.symmetric(vertical: Dimens.paddingM), - child: Opacity( - opacity: enabled ? Dimens.enabledOpacity : Dimens.disabledOpacity, - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - mainAxisSize: MainAxisSize.min, - children: [ - Padding( - padding: const EdgeInsets.symmetric(horizontal: Dimens.paddingM), - child: Row( - children: [ - Text( - title, - style: Theme.of(context) - .textTheme - .labelLarge - ?.copyWith(color: Theme.of(context).colorScheme.onSurface), - ), - const Spacer(), - if (!enabled) - const Icon( - Icons.lock, - size: Dimens.grid16, - ), - ], - ), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + mainAxisSize: MainAxisSize.min, + children: [ + Padding( + padding: const EdgeInsets.symmetric(horizontal: Dimens.paddingM), + child: Text( + title, + style: Theme.of(context) + .textTheme + .labelLarge + ?.copyWith(color: Theme.of(context).colorScheme.onSurface), ), - ...children, - ], - ), + ), + ...children, + ], ), ), ),