mirror of
https://github.com/vodemn/m3_lightmeter.git
synced 2024-11-22 07:20:39 +00:00
Fixed _models_ and _screens_ folders structure
proper folders for models unified _screen_ folder filenames
This commit is contained in:
parent
a7eba00894
commit
14bac950cf
46 changed files with 86 additions and 167 deletions
|
@ -1,16 +1,16 @@
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter/services.dart';
|
import 'package:flutter/services.dart';
|
||||||
import 'package:flutter_localizations/flutter_localizations.dart';
|
import 'package:flutter_localizations/flutter_localizations.dart';
|
||||||
import 'package:lightmeter/data/ev_source/ev_source_type.dart';
|
|
||||||
import 'package:lightmeter/data/permissions_service.dart';
|
|
||||||
import 'package:lightmeter/screens/settings/settings_screen.dart';
|
|
||||||
import 'package:provider/provider.dart';
|
import 'package:provider/provider.dart';
|
||||||
import 'package:shared_preferences/shared_preferences.dart';
|
import 'package:shared_preferences/shared_preferences.dart';
|
||||||
|
|
||||||
|
import 'data/models/ev_source_type.dart';
|
||||||
|
import 'data/permissions_service.dart';
|
||||||
import 'data/shared_prefs_service.dart';
|
import 'data/shared_prefs_service.dart';
|
||||||
import 'generated/l10n.dart';
|
import 'generated/l10n.dart';
|
||||||
import 'res/theme.dart';
|
import 'res/theme.dart';
|
||||||
import 'screens/metering/flow_metering.dart';
|
import 'screens/metering/flow_metering.dart';
|
||||||
|
import 'screens/settings/screen_settings.dart';
|
||||||
import 'utils/stop_type_provider.dart';
|
import 'utils/stop_type_provider.dart';
|
||||||
|
|
||||||
final RouteObserver<PageRoute> routeObserver = RouteObserver<PageRoute>();
|
final RouteObserver<PageRoute> routeObserver = RouteObserver<PageRoute>();
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import 'aperture_value.dart';
|
import 'photography_values/aperture_value.dart';
|
||||||
import 'shutter_speed_value.dart';
|
import 'photography_values/shutter_speed_value.dart';
|
||||||
|
|
||||||
class ExposurePair {
|
class ExposurePair {
|
||||||
final ApertureValue aperture;
|
final ApertureValue aperture;
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
import 'package:lightmeter/data/models/nd_value.dart';
|
|
||||||
import 'package:lightmeter/data/models/theme_type.dart';
|
|
||||||
import 'package:shared_preferences/shared_preferences.dart';
|
import 'package:shared_preferences/shared_preferences.dart';
|
||||||
|
|
||||||
import 'models/iso_value.dart';
|
import 'models/photography_values/iso_value.dart';
|
||||||
|
import 'models/photography_values/nd_value.dart';
|
||||||
|
import 'models/theme_type.dart';
|
||||||
|
|
||||||
class UserPreferencesService {
|
class UserPreferencesService {
|
||||||
static const _isoKey = "ISO";
|
static const _isoKey = "ISO";
|
||||||
|
|
|
@ -17,9 +17,6 @@
|
||||||
"showFractionalStops": "Show fractional stops",
|
"showFractionalStops": "Show fractional stops",
|
||||||
"halfStops": "1/2",
|
"halfStops": "1/2",
|
||||||
"thirdStops": "1/3",
|
"thirdStops": "1/3",
|
||||||
"caffeine": "Caffeine",
|
|
||||||
"keepsScreenOn": "Keeps screen on",
|
|
||||||
"haptics": "Haptics",
|
|
||||||
"theme": "Theme",
|
"theme": "Theme",
|
||||||
"chooseTheme": "Choose theme",
|
"chooseTheme": "Choose theme",
|
||||||
"themeLight": "Light",
|
"themeLight": "Light",
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:lightmeter/data/ev_source/ev_source_type.dart';
|
import 'package:lightmeter/data/models/ev_source_type.dart';
|
||||||
|
|
||||||
import 'application.dart';
|
import 'application.dart';
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:lightmeter/data/ev_source/ev_source_type.dart';
|
import 'package:lightmeter/data/models/ev_source_type.dart';
|
||||||
|
|
||||||
import 'application.dart';
|
import 'application.dart';
|
||||||
|
|
||||||
|
|
|
@ -2,10 +2,10 @@ import 'dart:async';
|
||||||
import 'dart:math';
|
import 'dart:math';
|
||||||
|
|
||||||
import 'package:flutter_bloc/flutter_bloc.dart';
|
import 'package:flutter_bloc/flutter_bloc.dart';
|
||||||
import 'package:lightmeter/data/models/aperture_value.dart';
|
import 'package:lightmeter/data/models/photography_values/aperture_value.dart';
|
||||||
import 'package:lightmeter/data/models/exposure_pair.dart';
|
import 'package:lightmeter/data/models/exposure_pair.dart';
|
||||||
import 'package:lightmeter/data/models/photography_value.dart';
|
import 'package:lightmeter/data/models/photography_values/photography_value.dart';
|
||||||
import 'package:lightmeter/data/models/shutter_speed_value.dart';
|
import 'package:lightmeter/data/models/photography_values/shutter_speed_value.dart';
|
||||||
import 'package:lightmeter/data/shared_prefs_service.dart';
|
import 'package:lightmeter/data/shared_prefs_service.dart';
|
||||||
import 'package:lightmeter/screens/metering/communication/event_communication_metering.dart' as communication_events;
|
import 'package:lightmeter/screens/metering/communication/event_communication_metering.dart' as communication_events;
|
||||||
import 'package:lightmeter/screens/metering/communication/state_communication_metering.dart' as communication_states;
|
import 'package:lightmeter/screens/metering/communication/state_communication_metering.dart' as communication_states;
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:lightmeter/res/dimens.dart';
|
import 'package:lightmeter/res/dimens.dart';
|
||||||
import 'package:lightmeter/screens/metering/components/shared/filled_circle.dart';
|
|
||||||
|
import 'shared/widget_circle_filled.dart';
|
||||||
|
|
||||||
class MeteringMeasureButton extends StatefulWidget {
|
class MeteringMeasureButton extends StatefulWidget {
|
||||||
final double size;
|
final double size;
|
|
@ -1,11 +1,12 @@
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:lightmeter/screens/metering/components/shared/filled_circle.dart';
|
|
||||||
|
|
||||||
class MeteringBottomControlsSideButton extends StatelessWidget {
|
import 'shared/widget_circle_filled.dart';
|
||||||
|
|
||||||
|
class MeteringSecondaryButton extends StatelessWidget {
|
||||||
final IconData icon;
|
final IconData icon;
|
||||||
final VoidCallback onPressed;
|
final VoidCallback onPressed;
|
||||||
|
|
||||||
const MeteringBottomControlsSideButton({
|
const MeteringSecondaryButton({
|
||||||
required this.icon,
|
required this.icon,
|
||||||
required this.onPressed,
|
required this.onPressed,
|
||||||
super.key,
|
super.key,
|
|
@ -1,25 +0,0 @@
|
||||||
import 'package:flutter/material.dart';
|
|
||||||
import 'package:lightmeter/res/dimens.dart';
|
|
||||||
|
|
||||||
class ZoomSlider extends StatelessWidget {
|
|
||||||
const ZoomSlider({super.key});
|
|
||||||
|
|
||||||
@override
|
|
||||||
Widget build(BuildContext context) {
|
|
||||||
return Padding(
|
|
||||||
padding: const EdgeInsets.symmetric(horizontal: Dimens.paddingL),
|
|
||||||
child: Row(
|
|
||||||
children: [
|
|
||||||
const Icon(Icons.zoom_out),
|
|
||||||
Expanded(
|
|
||||||
child: Slider(
|
|
||||||
value: 0,
|
|
||||||
onChanged: (value) {},
|
|
||||||
),
|
|
||||||
),
|
|
||||||
const Icon(Icons.zoom_in),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,8 +1,8 @@
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:lightmeter/res/dimens.dart';
|
import 'package:lightmeter/res/dimens.dart';
|
||||||
|
|
||||||
import 'components/measure_button.dart';
|
import 'components/widget_button_measure.dart';
|
||||||
import 'components/side_buttons.dart';
|
import 'components/widget_button_secondary.dart';
|
||||||
|
|
||||||
class MeteringBottomControls extends StatelessWidget {
|
class MeteringBottomControls extends StatelessWidget {
|
||||||
final VoidCallback onSourceChanged;
|
final VoidCallback onSourceChanged;
|
||||||
|
@ -32,14 +32,14 @@ class MeteringBottomControls extends StatelessWidget {
|
||||||
child: Row(
|
child: Row(
|
||||||
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
|
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
|
||||||
children: [
|
children: [
|
||||||
MeteringBottomControlsSideButton(
|
MeteringSecondaryButton(
|
||||||
onPressed: onSourceChanged,
|
onPressed: onSourceChanged,
|
||||||
icon: Icons.flip_camera_android,
|
icon: Icons.flip_camera_android,
|
||||||
),
|
),
|
||||||
MeteringMeasureButton(
|
MeteringMeasureButton(
|
||||||
onTap: onMeasure,
|
onTap: onMeasure,
|
||||||
),
|
),
|
||||||
MeteringBottomControlsSideButton(
|
MeteringSecondaryButton(
|
||||||
onPressed: onSettings,
|
onPressed: onSettings,
|
||||||
icon: Icons.settings,
|
icon: Icons.settings,
|
||||||
),
|
),
|
|
@ -1,12 +1,12 @@
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:lightmeter/data/models/photography_value.dart';
|
import 'package:lightmeter/data/models/photography_values/photography_value.dart';
|
||||||
import 'package:lightmeter/res/dimens.dart';
|
import 'package:lightmeter/res/dimens.dart';
|
||||||
|
|
||||||
class ExposurePaitListItem<T extends PhotographyStopValue> extends StatelessWidget {
|
class ExposurePairsListItem<T extends PhotographyStopValue> extends StatelessWidget {
|
||||||
final T value;
|
final T value;
|
||||||
final bool tickOnTheLeft;
|
final bool tickOnTheLeft;
|
||||||
|
|
||||||
const ExposurePaitListItem(this.value, {required this.tickOnTheLeft, super.key});
|
const ExposurePairsListItem(this.value, {required this.tickOnTheLeft, super.key});
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
|
@ -1,7 +1,7 @@
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:lightmeter/data/models/exposure_pair.dart';
|
import 'package:lightmeter/data/models/exposure_pair.dart';
|
||||||
import 'package:lightmeter/res/dimens.dart';
|
import 'package:lightmeter/res/dimens.dart';
|
||||||
import 'package:lightmeter/screens/metering/components/exposure_pairs_list/components/exposure_pair_item.dart';
|
import 'package:lightmeter/screens/metering/components/exposure_pairs_list/components/widget_item_list_exposure_pairs.dart';
|
||||||
|
|
||||||
class ExposurePairsList extends StatelessWidget {
|
class ExposurePairsList extends StatelessWidget {
|
||||||
final List<ExposurePair> exposurePairs;
|
final List<ExposurePair> exposurePairs;
|
||||||
|
@ -27,7 +27,7 @@ class ExposurePairsList extends StatelessWidget {
|
||||||
Expanded(
|
Expanded(
|
||||||
child: Align(
|
child: Align(
|
||||||
alignment: Alignment.centerLeft,
|
alignment: Alignment.centerLeft,
|
||||||
child: ExposurePaitListItem(
|
child: ExposurePairsListItem(
|
||||||
exposurePairs[index].aperture,
|
exposurePairs[index].aperture,
|
||||||
tickOnTheLeft: false,
|
tickOnTheLeft: false,
|
||||||
),
|
),
|
||||||
|
@ -36,7 +36,7 @@ class ExposurePairsList extends StatelessWidget {
|
||||||
Expanded(
|
Expanded(
|
||||||
child: Align(
|
child: Align(
|
||||||
alignment: Alignment.centerLeft,
|
alignment: Alignment.centerLeft,
|
||||||
child: ExposurePaitListItem(
|
child: ExposurePairsListItem(
|
||||||
exposurePairs[index].shutterSpeed,
|
exposurePairs[index].shutterSpeed,
|
||||||
tickOnTheLeft: true,
|
tickOnTheLeft: true,
|
||||||
),
|
),
|
|
@ -1,11 +1,20 @@
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:lightmeter/res/dimens.dart';
|
import 'package:lightmeter/res/dimens.dart';
|
||||||
import 'package:lightmeter/screens/metering/components/topbar/models/reading_value.dart';
|
|
||||||
|
|
||||||
class ReadingContainer extends StatelessWidget {
|
class ReadingValue {
|
||||||
|
final String label;
|
||||||
|
final String value;
|
||||||
|
|
||||||
|
const ReadingValue({
|
||||||
|
required this.label,
|
||||||
|
required this.value,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
class ReadingValueContainer extends StatelessWidget {
|
||||||
late final List<Widget> _items;
|
late final List<Widget> _items;
|
||||||
|
|
||||||
ReadingContainer({
|
ReadingValueContainer({
|
||||||
required List<ReadingValue> values,
|
required List<ReadingValue> values,
|
||||||
super.key,
|
super.key,
|
||||||
}) {
|
}) {
|
||||||
|
@ -18,7 +27,7 @@ class ReadingContainer extends StatelessWidget {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ReadingContainer.singleValue({
|
ReadingValueContainer.singleValue({
|
||||||
required ReadingValue value,
|
required ReadingValue value,
|
||||||
super.key,
|
super.key,
|
||||||
}) : _items = [_ReadingValueBuilder(value)];
|
}) : _items = [_ReadingValueBuilder(value)];
|
|
@ -2,8 +2,8 @@ import 'package:camera/camera.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter/services.dart';
|
import 'package:flutter/services.dart';
|
||||||
import 'package:flutter_bloc/flutter_bloc.dart';
|
import 'package:flutter_bloc/flutter_bloc.dart';
|
||||||
import 'package:lightmeter/data/ev_source/camera/bloc_camera.dart';
|
import 'package:lightmeter/screens/metering/ev_source/camera/bloc_camera.dart';
|
||||||
import 'package:lightmeter/data/ev_source/camera/state_camera.dart';
|
import 'package:lightmeter/screens/metering/ev_source/camera/state_camera.dart';
|
||||||
|
|
||||||
class CameraView extends StatelessWidget {
|
class CameraView extends StatelessWidget {
|
||||||
const CameraView({Key? key}) : super(key: key);
|
const CameraView({Key? key}) : super(key: key);
|
|
@ -1,6 +1,6 @@
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:lightmeter/generated/l10n.dart';
|
import 'package:lightmeter/generated/l10n.dart';
|
||||||
import 'package:lightmeter/data/models/photography_value.dart';
|
import 'package:lightmeter/data/models/photography_values/photography_value.dart';
|
||||||
import 'package:lightmeter/res/dimens.dart';
|
import 'package:lightmeter/res/dimens.dart';
|
||||||
|
|
||||||
typedef DialogPickerItemBuilder<T extends PhotographyValue> = Widget Function(BuildContext, T);
|
typedef DialogPickerItemBuilder<T extends PhotographyValue> = Widget Function(BuildContext, T);
|
|
@ -1,9 +0,0 @@
|
||||||
class ReadingValue {
|
|
||||||
final String label;
|
|
||||||
final String value;
|
|
||||||
|
|
||||||
const ReadingValue({
|
|
||||||
required this.label,
|
|
||||||
required this.value,
|
|
||||||
});
|
|
||||||
}
|
|
|
@ -1,18 +1,17 @@
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter_bloc/flutter_bloc.dart';
|
import 'package:flutter_bloc/flutter_bloc.dart';
|
||||||
import 'package:lightmeter/data/ev_source/camera/bloc_camera.dart';
|
import 'package:lightmeter/screens/metering/ev_source/camera/bloc_camera.dart';
|
||||||
import 'package:lightmeter/generated/l10n.dart';
|
import 'package:lightmeter/generated/l10n.dart';
|
||||||
import 'package:lightmeter/data/models/exposure_pair.dart';
|
import 'package:lightmeter/data/models/exposure_pair.dart';
|
||||||
import 'package:lightmeter/data/models/iso_value.dart';
|
import 'package:lightmeter/data/models/photography_values/iso_value.dart';
|
||||||
import 'package:lightmeter/data/models/nd_value.dart';
|
import 'package:lightmeter/data/models/photography_values/nd_value.dart';
|
||||||
import 'package:lightmeter/data/models/photography_value.dart';
|
import 'package:lightmeter/data/models/photography_values/photography_value.dart';
|
||||||
import 'package:lightmeter/res/dimens.dart';
|
import 'package:lightmeter/res/dimens.dart';
|
||||||
|
|
||||||
import 'components/camera_preview.dart';
|
import 'components/widget_camera_preview.dart';
|
||||||
import 'components/shared/animated_dialog.dart';
|
import 'components/shared/widget_dialog_animated.dart';
|
||||||
import 'components/dialog_picker.dart';
|
import 'components/widget_dialog_picker.dart';
|
||||||
import 'components/reading_container.dart';
|
import 'components/container_reading_value.dart';
|
||||||
import 'models/reading_value.dart';
|
|
||||||
|
|
||||||
class MeteringTopBar extends StatelessWidget {
|
class MeteringTopBar extends StatelessWidget {
|
||||||
final ExposurePair? fastest;
|
final ExposurePair? fastest;
|
||||||
|
@ -57,7 +56,7 @@ class MeteringTopBar extends StatelessWidget {
|
||||||
child: Column(
|
child: Column(
|
||||||
crossAxisAlignment: CrossAxisAlignment.stretch,
|
crossAxisAlignment: CrossAxisAlignment.stretch,
|
||||||
children: [
|
children: [
|
||||||
ReadingContainer(
|
ReadingValueContainer(
|
||||||
values: [
|
values: [
|
||||||
ReadingValue(
|
ReadingValue(
|
||||||
label: S.of(context).fastestExposurePair,
|
label: S.of(context).fastestExposurePair,
|
||||||
|
@ -75,7 +74,7 @@ class MeteringTopBar extends StatelessWidget {
|
||||||
),
|
),
|
||||||
/*
|
/*
|
||||||
const _InnerPadding(),
|
const _InnerPadding(),
|
||||||
ReadingContainer.singleValue(
|
ReadingValueContainer.singleValue(
|
||||||
value: ReadingValue(
|
value: ReadingValue(
|
||||||
label: 'EV',
|
label: 'EV',
|
||||||
value: ev.toStringAsFixed(1),
|
value: ev.toStringAsFixed(1),
|
||||||
|
@ -168,7 +167,7 @@ class _AnimatedDialogPicker<T extends PhotographyValue> extends StatelessWidget
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return AnimatedDialog(
|
return AnimatedDialog(
|
||||||
key: _key,
|
key: _key,
|
||||||
closedChild: ReadingContainer.singleValue(
|
closedChild: ReadingValueContainer.singleValue(
|
||||||
value: ReadingValue(
|
value: ReadingValue(
|
||||||
label: title,
|
label: title,
|
||||||
value: selectedValue.value.toString(),
|
value: selectedValue.value.toString(),
|
|
@ -6,7 +6,7 @@ import 'package:camera/camera.dart';
|
||||||
import 'package:exif/exif.dart';
|
import 'package:exif/exif.dart';
|
||||||
import 'package:flutter/widgets.dart';
|
import 'package:flutter/widgets.dart';
|
||||||
import 'package:flutter_bloc/flutter_bloc.dart';
|
import 'package:flutter_bloc/flutter_bloc.dart';
|
||||||
import 'package:lightmeter/data/ev_source/ev_source_bloc.dart';
|
import 'package:lightmeter/screens/metering/ev_source/ev_source_bloc.dart';
|
||||||
import 'package:lightmeter/screens/metering/communication/bloc_communication_metering.dart';
|
import 'package:lightmeter/screens/metering/communication/bloc_communication_metering.dart';
|
||||||
import 'package:lightmeter/screens/metering/communication/event_communication_metering.dart' as communication_event;
|
import 'package:lightmeter/screens/metering/communication/event_communication_metering.dart' as communication_event;
|
||||||
import 'package:lightmeter/screens/metering/communication/state_communication_metering.dart' as communication_states;
|
import 'package:lightmeter/screens/metering/communication/state_communication_metering.dart' as communication_states;
|
|
@ -1,5 +1,5 @@
|
||||||
import 'dart:math';
|
import 'dart:math';
|
||||||
import 'package:lightmeter/data/ev_source/ev_source_bloc.dart';
|
import 'package:lightmeter/screens/metering/ev_source/ev_source_bloc.dart';
|
||||||
import 'package:lightmeter/screens/metering/communication/bloc_communication_metering.dart';
|
import 'package:lightmeter/screens/metering/communication/bloc_communication_metering.dart';
|
||||||
import 'package:lightmeter/screens/metering/communication/event_communication_metering.dart' as communication_event;
|
import 'package:lightmeter/screens/metering/communication/event_communication_metering.dart' as communication_event;
|
||||||
import 'package:lightmeter/screens/metering/communication/state_communication_metering.dart' as communication_states;
|
import 'package:lightmeter/screens/metering/communication/state_communication_metering.dart' as communication_states;
|
|
@ -1,6 +1,6 @@
|
||||||
import 'package:lightmeter/data/models/iso_value.dart';
|
import 'package:lightmeter/data/models/photography_values/iso_value.dart';
|
||||||
import 'package:lightmeter/data/models/nd_value.dart';
|
import 'package:lightmeter/data/models/photography_values/nd_value.dart';
|
||||||
import 'package:lightmeter/data/models/photography_value.dart';
|
import 'package:lightmeter/data/models/photography_values/photography_value.dart';
|
||||||
|
|
||||||
abstract class MeteringEvent {
|
abstract class MeteringEvent {
|
||||||
const MeteringEvent();
|
const MeteringEvent();
|
||||||
|
|
|
@ -1,12 +1,13 @@
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter_bloc/flutter_bloc.dart';
|
import 'package:flutter_bloc/flutter_bloc.dart';
|
||||||
import 'package:lightmeter/data/ev_source/camera/bloc_camera.dart';
|
import 'package:lightmeter/data/models/ev_source_type.dart';
|
||||||
import 'package:lightmeter/data/ev_source/ev_source_type.dart';
|
import 'package:lightmeter/data/models/photography_values/photography_value.dart';
|
||||||
import 'package:lightmeter/data/ev_source/random_ev/bloc_random_ev.dart';
|
|
||||||
import 'package:lightmeter/data/models/photography_value.dart';
|
|
||||||
import 'package:lightmeter/data/shared_prefs_service.dart';
|
import 'package:lightmeter/data/shared_prefs_service.dart';
|
||||||
import 'package:lightmeter/screens/metering/bloc_metering.dart';
|
|
||||||
import 'package:lightmeter/screens/metering/communication/bloc_communication_metering.dart';
|
import 'ev_source/camera/bloc_camera.dart';
|
||||||
|
import 'ev_source/random_ev/bloc_random_ev.dart';
|
||||||
|
import 'bloc_metering.dart';
|
||||||
|
import 'communication/bloc_communication_metering.dart';
|
||||||
|
|
||||||
import 'screen_metering.dart';
|
import 'screen_metering.dart';
|
||||||
|
|
||||||
|
|
|
@ -1,12 +1,12 @@
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter_bloc/flutter_bloc.dart';
|
import 'package:flutter_bloc/flutter_bloc.dart';
|
||||||
import 'package:lightmeter/data/models/photography_value.dart';
|
import 'package:lightmeter/data/models/photography_values/photography_value.dart';
|
||||||
import 'package:lightmeter/res/dimens.dart';
|
import 'package:lightmeter/res/dimens.dart';
|
||||||
import 'package:lightmeter/screens/settings/settings_screen.dart';
|
import 'package:lightmeter/screens/settings/screen_settings.dart';
|
||||||
|
|
||||||
import 'components/bottom_controls/bottom_controls.dart';
|
import 'components/bottom_controls/widget_bottom_controls.dart';
|
||||||
import 'components/exposure_pairs_list/exposure_pairs_list.dart';
|
import 'components/exposure_pairs_list/widget_list_exposure_pairs.dart';
|
||||||
import 'components/topbar/topbar.dart';
|
import 'components/topbar/widget_topbar.dart';
|
||||||
import 'bloc_metering.dart';
|
import 'bloc_metering.dart';
|
||||||
import 'event_metering.dart';
|
import 'event_metering.dart';
|
||||||
import 'state_metering.dart';
|
import 'state_metering.dart';
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import 'package:lightmeter/data/models/exposure_pair.dart';
|
import 'package:lightmeter/data/models/exposure_pair.dart';
|
||||||
import 'package:lightmeter/data/models/iso_value.dart';
|
import 'package:lightmeter/data/models/photography_values/iso_value.dart';
|
||||||
import 'package:lightmeter/data/models/nd_value.dart';
|
import 'package:lightmeter/data/models/photography_values/nd_value.dart';
|
||||||
|
|
||||||
class MeteringState {
|
class MeteringState {
|
||||||
final double ev;
|
final double ev;
|
||||||
|
|
|
@ -1,28 +0,0 @@
|
||||||
import 'package:flutter/material.dart';
|
|
||||||
import 'package:lightmeter/generated/l10n.dart';
|
|
||||||
|
|
||||||
class CaffeineListTile extends StatefulWidget {
|
|
||||||
const CaffeineListTile({super.key});
|
|
||||||
|
|
||||||
@override
|
|
||||||
State<CaffeineListTile> createState() => _CaffeineListTileState();
|
|
||||||
}
|
|
||||||
|
|
||||||
class _CaffeineListTileState extends State<CaffeineListTile> {
|
|
||||||
bool _isCaffeineOn = false;
|
|
||||||
|
|
||||||
@override
|
|
||||||
Widget build(BuildContext context) {
|
|
||||||
return SwitchListTile(
|
|
||||||
secondary: const Icon(Icons.coffee),
|
|
||||||
title: Text(S.of(context).caffeine),
|
|
||||||
subtitle: Text(S.of(context).keepsScreenOn),
|
|
||||||
value: _isCaffeineOn,
|
|
||||||
onChanged: (value) {
|
|
||||||
setState(() {
|
|
||||||
_isCaffeineOn = value;
|
|
||||||
});
|
|
||||||
},
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,27 +0,0 @@
|
||||||
import 'package:flutter/material.dart';
|
|
||||||
import 'package:lightmeter/generated/l10n.dart';
|
|
||||||
|
|
||||||
class HapticsListTile extends StatefulWidget {
|
|
||||||
const HapticsListTile({super.key});
|
|
||||||
|
|
||||||
@override
|
|
||||||
State<HapticsListTile> createState() => _HapticsListTileState();
|
|
||||||
}
|
|
||||||
|
|
||||||
class _HapticsListTileState extends State<HapticsListTile> {
|
|
||||||
bool _value = false;
|
|
||||||
|
|
||||||
@override
|
|
||||||
Widget build(BuildContext context) {
|
|
||||||
return SwitchListTile(
|
|
||||||
secondary: const Icon(Icons.vibration),
|
|
||||||
title: Text(S.of(context).haptics),
|
|
||||||
value: _value,
|
|
||||||
onChanged: (value) {
|
|
||||||
setState(() {
|
|
||||||
_value = value;
|
|
||||||
});
|
|
||||||
},
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,10 +1,10 @@
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:lightmeter/data/models/photography_value.dart';
|
import 'package:lightmeter/data/models/photography_values/photography_value.dart';
|
||||||
import 'package:lightmeter/generated/l10n.dart';
|
import 'package:lightmeter/generated/l10n.dart';
|
||||||
import 'package:lightmeter/utils/stop_type_provider.dart';
|
import 'package:lightmeter/utils/stop_type_provider.dart';
|
||||||
import 'package:provider/provider.dart';
|
import 'package:provider/provider.dart';
|
||||||
|
|
||||||
import 'shared/dialog_picker.dart';
|
import 'shared/widget_dialog_picker.dart';
|
||||||
|
|
||||||
class StopTypeListTile extends StatelessWidget {
|
class StopTypeListTile extends StatelessWidget {
|
||||||
const StopTypeListTile({super.key});
|
const StopTypeListTile({super.key});
|
|
@ -4,7 +4,7 @@ import 'package:lightmeter/generated/l10n.dart';
|
||||||
import 'package:lightmeter/res/theme.dart';
|
import 'package:lightmeter/res/theme.dart';
|
||||||
import 'package:provider/provider.dart';
|
import 'package:provider/provider.dart';
|
||||||
|
|
||||||
import 'shared/dialog_picker.dart';
|
import 'shared/widget_dialog_picker.dart';
|
||||||
|
|
||||||
class ThemeTypeListTile extends StatelessWidget {
|
class ThemeTypeListTile extends StatelessWidget {
|
||||||
const ThemeTypeListTile({super.key});
|
const ThemeTypeListTile({super.key});
|
|
@ -2,9 +2,9 @@ import 'package:flutter/material.dart';
|
||||||
import 'package:lightmeter/generated/l10n.dart';
|
import 'package:lightmeter/generated/l10n.dart';
|
||||||
import 'package:lightmeter/res/dimens.dart';
|
import 'package:lightmeter/res/dimens.dart';
|
||||||
|
|
||||||
import 'components/fractional_stops_tile.dart';
|
import 'components/widget_list_tile_fractional_stops.dart';
|
||||||
import 'components/theme_type_tile.dart';
|
import 'components/widget_list_tile_theme_type.dart';
|
||||||
import 'components/version_label.dart';
|
import 'components/widget_label_version.dart';
|
||||||
|
|
||||||
class SettingsScreen extends StatelessWidget {
|
class SettingsScreen extends StatelessWidget {
|
||||||
const SettingsScreen({super.key});
|
const SettingsScreen({super.key});
|
|
@ -1,5 +1,5 @@
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:lightmeter/data/models/photography_value.dart';
|
import 'package:lightmeter/data/models/photography_values/photography_value.dart';
|
||||||
import 'package:provider/provider.dart';
|
import 'package:provider/provider.dart';
|
||||||
|
|
||||||
class StopTypeProvider extends StatefulWidget {
|
class StopTypeProvider extends StatefulWidget {
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import 'package:lightmeter/data/models/aperture_value.dart';
|
import 'package:lightmeter/data/models/photography_values/aperture_value.dart';
|
||||||
import 'package:lightmeter/data/models/iso_value.dart';
|
import 'package:lightmeter/data/models/photography_values/iso_value.dart';
|
||||||
import 'package:lightmeter/data/models/photography_value.dart';
|
import 'package:lightmeter/data/models/photography_values/photography_value.dart';
|
||||||
import 'package:lightmeter/data/models/shutter_speed_value.dart';
|
import 'package:lightmeter/data/models/photography_values/shutter_speed_value.dart';
|
||||||
import 'package:test/test.dart';
|
import 'package:test/test.dart';
|
||||||
|
|
||||||
void main() {
|
void main() {
|
||||||
|
|
Loading…
Reference in a new issue