From cb4e91cb0a38b26079425465f5310738b1f42828 Mon Sep 17 00:00:00 2001 From: Vadim <44135514+vodemn@users.noreply.github.com> Date: Sun, 29 Jan 2023 20:02:18 +0300 Subject: [PATCH] Folders cleanup --- lib/application.dart | 2 +- lib/{res/theme.dart => providers/theme_provider.dart} | 0 lib/res/dimens.dart | 1 + .../{ => measure_button}/widget_button_measure.dart | 3 +-- .../{ => secondary_button}/widget_button_secondary.dart | 6 +++--- .../components/bottom_controls/widget_bottom_controls.dart | 4 ++-- .../dynamic_color/widget_list_tile_dynamic_color.dart | 2 +- .../components/theme_type/widget_list_tile_theme_type.dart | 2 +- 8 files changed, 10 insertions(+), 10 deletions(-) rename lib/{res/theme.dart => providers/theme_provider.dart} (100%) rename lib/screens/metering/components/bottom_controls/components/{ => measure_button}/widget_button_measure.dart (93%) rename lib/screens/metering/components/bottom_controls/components/{ => secondary_button}/widget_button_secondary.dart (77%) diff --git a/lib/application.dart b/lib/application.dart index 583fc18..6caa8f3 100644 --- a/lib/application.dart +++ b/lib/application.dart @@ -14,7 +14,7 @@ import 'data/shared_prefs_service.dart'; import 'environment.dart'; import 'generated/l10n.dart'; import 'providers/ev_source_type_provider.dart'; -import 'res/theme.dart'; +import 'providers/theme_provider.dart'; import 'screens/metering/flow_metering.dart'; import 'screens/settings/flow_settings.dart'; import 'utils/stop_type_provider.dart'; diff --git a/lib/res/theme.dart b/lib/providers/theme_provider.dart similarity index 100% rename from lib/res/theme.dart rename to lib/providers/theme_provider.dart diff --git a/lib/res/dimens.dart b/lib/res/dimens.dart index 0a5b2e4..cb8aff0 100644 --- a/lib/res/dimens.dart +++ b/lib/res/dimens.dart @@ -9,6 +9,7 @@ class Dimens { static const double grid8 = 8; static const double grid16 = 16; static const double grid24 = 24; + static const double grid48 = 48; static const double grid56 = 56; static const double grid168 = 168; diff --git a/lib/screens/metering/components/bottom_controls/components/widget_button_measure.dart b/lib/screens/metering/components/bottom_controls/components/measure_button/widget_button_measure.dart similarity index 93% rename from lib/screens/metering/components/bottom_controls/components/widget_button_measure.dart rename to lib/screens/metering/components/bottom_controls/components/measure_button/widget_button_measure.dart index cfecb86..438f640 100644 --- a/lib/screens/metering/components/bottom_controls/components/widget_button_measure.dart +++ b/lib/screens/metering/components/bottom_controls/components/measure_button/widget_button_measure.dart @@ -1,7 +1,6 @@ import 'package:flutter/material.dart'; import 'package:lightmeter/res/dimens.dart'; - -import 'shared/widget_circle_filled.dart'; +import 'package:lightmeter/screens/metering/components/bottom_controls/components/shared/widget_circle_filled.dart'; class MeteringMeasureButton extends StatefulWidget { final double size; diff --git a/lib/screens/metering/components/bottom_controls/components/widget_button_secondary.dart b/lib/screens/metering/components/bottom_controls/components/secondary_button/widget_button_secondary.dart similarity index 77% rename from lib/screens/metering/components/bottom_controls/components/widget_button_secondary.dart rename to lib/screens/metering/components/bottom_controls/components/secondary_button/widget_button_secondary.dart index e161bb6..d89130d 100644 --- a/lib/screens/metering/components/bottom_controls/components/widget_button_secondary.dart +++ b/lib/screens/metering/components/bottom_controls/components/secondary_button/widget_button_secondary.dart @@ -1,6 +1,6 @@ import 'package:flutter/material.dart'; - -import 'shared/widget_circle_filled.dart'; +import 'package:lightmeter/res/dimens.dart'; +import 'package:lightmeter/screens/metering/components/bottom_controls/components/shared/widget_circle_filled.dart'; class MeteringSecondaryButton extends StatelessWidget { final IconData icon; @@ -17,7 +17,7 @@ class MeteringSecondaryButton extends StatelessWidget { return Center( child: FilledCircle( color: Theme.of(context).colorScheme.surfaceVariant, - size: 48, + size: Dimens.grid48, child: Center( child: IconButton( onPressed: onPressed, diff --git a/lib/screens/metering/components/bottom_controls/widget_bottom_controls.dart b/lib/screens/metering/components/bottom_controls/widget_bottom_controls.dart index 8b2d7d8..5f89cea 100644 --- a/lib/screens/metering/components/bottom_controls/widget_bottom_controls.dart +++ b/lib/screens/metering/components/bottom_controls/widget_bottom_controls.dart @@ -3,8 +3,8 @@ import 'package:lightmeter/data/models/ev_source_type.dart'; import 'package:lightmeter/res/dimens.dart'; import 'package:provider/provider.dart'; -import 'components/widget_button_measure.dart'; -import 'components/widget_button_secondary.dart'; +import 'components/measure_button/widget_button_measure.dart'; +import 'components/secondary_button/widget_button_secondary.dart'; class MeteringBottomControls extends StatelessWidget { final VoidCallback? onSwitchEvSourceType; diff --git a/lib/screens/settings/components/dynamic_color/widget_list_tile_dynamic_color.dart b/lib/screens/settings/components/dynamic_color/widget_list_tile_dynamic_color.dart index 44bf25d..9f9e82d 100644 --- a/lib/screens/settings/components/dynamic_color/widget_list_tile_dynamic_color.dart +++ b/lib/screens/settings/components/dynamic_color/widget_list_tile_dynamic_color.dart @@ -2,7 +2,7 @@ import 'package:flutter/material.dart'; import 'package:flutter_bloc/flutter_bloc.dart'; import 'package:lightmeter/data/models/dynamic_colors_state.dart'; import 'package:lightmeter/generated/l10n.dart'; -import 'package:lightmeter/res/theme.dart'; +import 'package:lightmeter/providers/theme_provider.dart'; class DynamicColorListTile extends StatelessWidget { const DynamicColorListTile({super.key}); diff --git a/lib/screens/settings/components/theme_type/widget_list_tile_theme_type.dart b/lib/screens/settings/components/theme_type/widget_list_tile_theme_type.dart index 7e89785..53df421 100644 --- a/lib/screens/settings/components/theme_type/widget_list_tile_theme_type.dart +++ b/lib/screens/settings/components/theme_type/widget_list_tile_theme_type.dart @@ -1,7 +1,7 @@ import 'package:flutter/material.dart'; import 'package:lightmeter/data/models/theme_type.dart'; import 'package:lightmeter/generated/l10n.dart'; -import 'package:lightmeter/res/theme.dart'; +import 'package:lightmeter/providers/theme_provider.dart'; import 'package:lightmeter/screens/settings/components/shared/dialog_picker.dart/widget_dialog_picker.dart'; import 'package:provider/provider.dart';