mirror of
https://github.com/vodemn/m3_lightmeter.git
synced 2024-11-22 07:20:39 +00:00
added Equipment section placeholder
This commit is contained in:
parent
59287d06bc
commit
a2f1e1b2df
9 changed files with 108 additions and 16 deletions
|
@ -34,6 +34,10 @@
|
|||
"calibrationMessageCameraOnly": "The accuracy of the readings measured by this application depends entirely on the rear camera of the device. Therefore, consider testing this application and setting up an EV calibration value that will give you the desired measurement results.",
|
||||
"camera": "Camera",
|
||||
"lightSensor": "Light sensor",
|
||||
"equipment": "Equipment",
|
||||
"isoValues": "ISO values",
|
||||
"ndFilters": "ND filters",
|
||||
"equipmentProfiles": "Equipment profiles",
|
||||
"general": "General",
|
||||
"keepScreenOn": "Keep screen on",
|
||||
"haptics": "Haptics",
|
||||
|
|
|
@ -26,6 +26,9 @@ class Dimens {
|
|||
static const Duration durationML = Duration(milliseconds: 250);
|
||||
static const Duration durationL = Duration(milliseconds: 300);
|
||||
|
||||
static const double enabledOpacity = 1.0;
|
||||
static const double disabledOpacity = 0.38;
|
||||
|
||||
// TopBar
|
||||
/// Probably this is a bad practice, but with text size locked, the height is always 212
|
||||
static const double readingContainerHeight = 212;
|
||||
|
|
|
@ -0,0 +1,14 @@
|
|||
import 'package:flutter/material.dart';
|
||||
import 'package:lightmeter/generated/l10n.dart';
|
||||
|
||||
class EquipmentProfilesListTile extends StatelessWidget {
|
||||
const EquipmentProfilesListTile({super.key});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return ListTile(
|
||||
leading: const Icon(Icons.camera),
|
||||
title: Text(S.of(context).equipmentProfiles),
|
||||
);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,14 @@
|
|||
import 'package:flutter/material.dart';
|
||||
import 'package:lightmeter/generated/l10n.dart';
|
||||
|
||||
class IsoValuesListTile extends StatelessWidget {
|
||||
const IsoValuesListTile({super.key});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return ListTile(
|
||||
leading: const Icon(Icons.iso),
|
||||
title: Text(S.of(context).isoValues),
|
||||
);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,14 @@
|
|||
import 'package:flutter/material.dart';
|
||||
import 'package:lightmeter/generated/l10n.dart';
|
||||
|
||||
class NdFiltersListTile extends StatelessWidget {
|
||||
const NdFiltersListTile({super.key});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return ListTile(
|
||||
leading: const Icon(Icons.filter_b_and_w),
|
||||
title: Text(S.of(context).ndFilters),
|
||||
);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,25 @@
|
|||
import 'package:flutter/material.dart';
|
||||
import 'package:lightmeter/generated/l10n.dart';
|
||||
import 'package:lightmeter/screens/settings/components/shared/settings_section/widget_settings_section.dart';
|
||||
|
||||
import 'components/equipment_profiles/widget_list_tile_equipment_profiles.dart';
|
||||
import 'components/iso_values/widget_list_tile_iso_values.dart';
|
||||
import 'components/nd_filters/widget_list_tile_nd_filters.dart';
|
||||
|
||||
|
||||
class EquipmentSettingsSection extends StatelessWidget {
|
||||
const EquipmentSettingsSection({super.key});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return SettingsSection(
|
||||
enabled: false,
|
||||
title: S.of(context).equipment,
|
||||
children: const [
|
||||
IsoValuesListTile(),
|
||||
NdFiltersListTile(),
|
||||
EquipmentProfilesListTile(),
|
||||
],
|
||||
);
|
||||
}
|
||||
}
|
|
@ -4,10 +4,12 @@ import 'package:lightmeter/res/dimens.dart';
|
|||
class SettingsSection extends StatelessWidget {
|
||||
final String title;
|
||||
final List<Widget> children;
|
||||
final bool enabled;
|
||||
|
||||
const SettingsSection({
|
||||
required this.title,
|
||||
required this.children,
|
||||
this.enabled = true,
|
||||
super.key,
|
||||
});
|
||||
|
||||
|
@ -23,22 +25,35 @@ class SettingsSection extends StatelessWidget {
|
|||
child: Card(
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.symmetric(vertical: Dimens.paddingM),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
Padding(
|
||||
padding: const EdgeInsets.only(left: Dimens.paddingM),
|
||||
child: Text(
|
||||
title,
|
||||
style: Theme.of(context)
|
||||
.textTheme
|
||||
.labelLarge
|
||||
?.copyWith(color: Theme.of(context).colorScheme.onSurface),
|
||||
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,
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
...children,
|
||||
],
|
||||
...children,
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
|
|
|
@ -3,6 +3,7 @@ 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/providers/theme_provider.dart';
|
||||
import 'package:lightmeter/res/dimens.dart';
|
||||
|
||||
import 'components/primary_color_picker_dialog/widget_dialog_picker_primary_color.dart';
|
||||
|
||||
|
@ -13,7 +14,7 @@ class PrimaryColorListTile extends StatelessWidget {
|
|||
Widget build(BuildContext context) {
|
||||
if (context.watch<DynamicColorState>() == DynamicColorState.enabled) {
|
||||
return Opacity(
|
||||
opacity: 0.5,
|
||||
opacity: Dimens.disabledOpacity,
|
||||
child: IgnorePointer(
|
||||
child: ListTile(
|
||||
leading: const Icon(Icons.palette),
|
||||
|
|
|
@ -3,6 +3,7 @@ import 'package:lightmeter/generated/l10n.dart';
|
|||
import 'package:lightmeter/res/dimens.dart';
|
||||
|
||||
import 'components/about/widget_settings_section_about.dart';
|
||||
import 'components/equipment/widget_settings_section_equipment.dart';
|
||||
import 'components/general/widget_settings_section_general.dart';
|
||||
import 'components/metering/widget_settings_section_metering.dart';
|
||||
import 'components/theme/widget_settings_section_theme.dart';
|
||||
|
@ -44,6 +45,7 @@ class SettingsScreen extends StatelessWidget {
|
|||
delegate: SliverChildListDelegate(
|
||||
<Widget>[
|
||||
const MeteringSettingsSection(),
|
||||
const EquipmentSettingsSection(),
|
||||
const GeneralSettingsSection(),
|
||||
const ThemeSettingsSection(),
|
||||
const AboutSettingsSection(),
|
||||
|
|
Loading…
Reference in a new issue