mirror of
https://github.com/vodemn/m3_lightmeter.git
synced 2024-11-25 00:40:39 +00:00
display selected exposure pair on timer screen
This commit is contained in:
parent
04bd00b2c0
commit
43ab97f87f
6 changed files with 92 additions and 58 deletions
|
@ -117,5 +117,6 @@
|
|||
"tooltipResetToZero": "Reset to zero",
|
||||
"tooltipUseLightSensor": "Use lightsensor",
|
||||
"tooltipUseCamera": "Use camera",
|
||||
"tooltipOpenSettings": "Open settings"
|
||||
"tooltipOpenSettings": "Open settings",
|
||||
"exposurePair": "Exposure pair"
|
||||
}
|
|
@ -117,5 +117,6 @@
|
|||
"tooltipResetToZero": "Remise à zéro",
|
||||
"tooltipUseLightSensor": "Utiliser un capteur de lumière",
|
||||
"tooltipUseCamera": "Utiliser la caméra",
|
||||
"tooltipOpenSettings": "Ouvrir les paramètres"
|
||||
"tooltipOpenSettings": "Ouvrir les paramètres",
|
||||
"exposurePair": "Paire d'exposition"
|
||||
}
|
|
@ -117,5 +117,6 @@
|
|||
"tooltipResetToZero": "Сбросить до 0",
|
||||
"tooltipUseLightSensor": "Использовать датчик освещенности",
|
||||
"tooltipUseCamera": "Использовать камеру",
|
||||
"tooltipOpenSettings": "Открыть настройки"
|
||||
"tooltipOpenSettings": "Открыть настройки",
|
||||
"exposurePair": "Пара экспозиции"
|
||||
}
|
|
@ -117,5 +117,6 @@
|
|||
"resetToZero": "重置为零",
|
||||
"tooltipUseLightSensor": "使用光线传感器",
|
||||
"tooltipUseCamera": "使用摄像头",
|
||||
"tooltipOpenSettings": "打开设置"
|
||||
"tooltipOpenSettings": "打开设置",
|
||||
"exposurePair": "曝光对"
|
||||
}
|
|
@ -0,0 +1,43 @@
|
|||
import 'package:flutter/material.dart';
|
||||
import 'package:lightmeter/data/models/exposure_pair.dart';
|
||||
import 'package:lightmeter/generated/l10n.dart';
|
||||
import 'package:lightmeter/res/dimens.dart';
|
||||
import 'package:lightmeter/screens/metering/components/shared/readings_container/components/shared/reading_value_container/widget_container_reading_value.dart';
|
||||
|
||||
class TimerMeteringConfig extends StatelessWidget {
|
||||
final ExposurePair exposurePair;
|
||||
|
||||
const TimerMeteringConfig({
|
||||
required this.exposurePair,
|
||||
super.key,
|
||||
});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Container(
|
||||
decoration: BoxDecoration(
|
||||
color: Theme.of(context).colorScheme.surface,
|
||||
borderRadius: const BorderRadius.only(
|
||||
bottomLeft: Radius.circular(Dimens.borderRadiusL),
|
||||
bottomRight: Radius.circular(Dimens.borderRadiusL),
|
||||
),
|
||||
),
|
||||
padding: const EdgeInsets.all(Dimens.paddingM),
|
||||
child: SafeArea(
|
||||
bottom: false,
|
||||
child: Row(
|
||||
children: [
|
||||
Expanded(
|
||||
child: ReadingValueContainer.singleValue(
|
||||
value: ReadingValue(
|
||||
label: S.of(context).exposurePair,
|
||||
value: exposurePair.toString(),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
|
@ -4,6 +4,7 @@ import 'package:lightmeter/data/models/exposure_pair.dart';
|
|||
import 'package:lightmeter/res/dimens.dart';
|
||||
import 'package:lightmeter/screens/shared/bottom_controls_bar/widget_bottom_controls_bar.dart';
|
||||
import 'package:lightmeter/screens/timer/bloc_timer.dart';
|
||||
import 'package:lightmeter/screens/timer/components/metering_config/widget_metering_config_timer.dart';
|
||||
import 'package:lightmeter/screens/timer/components/text/widget_text_timer.dart';
|
||||
import 'package:lightmeter/screens/timer/components/timeline/widget_timeline_timer.dart';
|
||||
import 'package:lightmeter/screens/timer/event_timer.dart';
|
||||
|
@ -64,24 +65,11 @@ class _TimerScreenState extends State<TimerScreen> with TickerProviderStateMixin
|
|||
listenWhen: (previous, current) => previous.runtimeType != current.runtimeType,
|
||||
listener: (context, state) => _updateAnimations(state),
|
||||
child: Scaffold(
|
||||
appBar: AppBar(
|
||||
automaticallyImplyLeading: false,
|
||||
centerTitle: true,
|
||||
elevation: 0,
|
||||
title: Text(
|
||||
widget.exposurePair.toString(),
|
||||
style: TextStyle(
|
||||
color: Theme.of(context).colorScheme.onSurface,
|
||||
fontSize: Dimens.grid24,
|
||||
),
|
||||
),
|
||||
),
|
||||
body: SafeArea(
|
||||
bottom: false,
|
||||
child: Center(
|
||||
body: Center(
|
||||
child: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
TimerMeteringConfig(exposurePair: widget.exposurePair),
|
||||
const Spacer(),
|
||||
Padding(
|
||||
padding: const EdgeInsets.all(Dimens.paddingL),
|
||||
|
@ -129,7 +117,6 @@ class _TimerScreenState extends State<TimerScreen> with TickerProviderStateMixin
|
|||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue