diff --git a/lib/screens/metering/components/bottom_controls/components/measure_button/widget_button_measure.dart b/lib/screens/metering/components/bottom_controls/components/measure_button/widget_button_measure.dart index e306dc8..e918557 100644 --- a/lib/screens/metering/components/bottom_controls/components/measure_button/widget_button_measure.dart +++ b/lib/screens/metering/components/bottom_controls/components/measure_button/widget_button_measure.dart @@ -3,6 +3,7 @@ import 'package:lightmeter/generated/l10n.dart'; import 'package:lightmeter/providers/user_preferences_provider.dart'; import 'package:lightmeter/res/dimens.dart'; import 'package:lightmeter/screens/shared/filled_circle/widget_circle_filled.dart'; +import 'package:lightmeter/utils/context_utils.dart'; const String _subscript100 = '\u2081\u2080\u2080'; @@ -106,7 +107,7 @@ class _EvValueText extends StatelessWidget { } String _text(BuildContext context) { - final bool showEv100 = UserPreferencesProvider.showEv100Of(context); + final bool showEv100 = context.isPro && UserPreferencesProvider.showEv100Of(context); final StringBuffer buffer = StringBuffer() ..writeAll([ (showEv100 ? ev100 : ev).toStringAsFixed(1), diff --git a/lib/screens/settings/components/metering/components/show_ev_100/widget_list_tile_show_ev_100.dart b/lib/screens/settings/components/metering/components/show_ev_100/widget_list_tile_show_ev_100.dart index 74e3339..2007526 100644 --- a/lib/screens/settings/components/metering/components/show_ev_100/widget_list_tile_show_ev_100.dart +++ b/lib/screens/settings/components/metering/components/show_ev_100/widget_list_tile_show_ev_100.dart @@ -2,18 +2,23 @@ import 'package:flutter/material.dart'; import 'package:lightmeter/generated/l10n.dart'; import 'package:lightmeter/providers/user_preferences_provider.dart'; import 'package:lightmeter/res/dimens.dart'; +import 'package:lightmeter/screens/settings/components/shared/disable/widget_disable.dart'; +import 'package:lightmeter/utils/context_utils.dart'; class ShowEv100ListTile extends StatelessWidget { const ShowEv100ListTile({super.key}); @override Widget build(BuildContext context) { - return SwitchListTile( - secondary: const Icon(Icons.adjust), - title: Text(S.of(context).showEv100), - value: UserPreferencesProvider.showEv100Of(context), - onChanged: (_) => UserPreferencesProvider.of(context).toggleShowEV100(), - contentPadding: const EdgeInsets.symmetric(horizontal: Dimens.paddingM), + return Disable( + disable: !context.isPro, + child: SwitchListTile( + secondary: const Icon(Icons.adjust), + title: Text(S.of(context).showEv100), + value: context.isPro && UserPreferencesProvider.showEv100Of(context), + onChanged: (_) => UserPreferencesProvider.of(context).toggleShowEV100(), + contentPadding: const EdgeInsets.symmetric(horizontal: Dimens.paddingM), + ), ); } }