mirror of
https://github.com/vodemn/m3_lightmeter.git
synced 2025-08-05 04:36:41 +00:00
moved date to title
This commit is contained in:
parent
137d13cfbe
commit
3cd4d32a2b
6 changed files with 44 additions and 60 deletions
|
@ -170,7 +170,6 @@
|
||||||
"addEquipmentProfileTitle": "Ausrüstung hinzufügen",
|
"addEquipmentProfileTitle": "Ausrüstung hinzufügen",
|
||||||
"editEquipmentProfileTitle": "Ausrüstung bearbeiten",
|
"editEquipmentProfileTitle": "Ausrüstung bearbeiten",
|
||||||
"editPhotoTitle": "Foto bearbeiten",
|
"editPhotoTitle": "Foto bearbeiten",
|
||||||
"date": "Datum",
|
|
||||||
"ndFilter": "ND Filter",
|
"ndFilter": "ND Filter",
|
||||||
"note": "Notiz",
|
"note": "Notiz",
|
||||||
"notSet": "Nicht gesetzt",
|
"notSet": "Nicht gesetzt",
|
||||||
|
|
|
@ -170,7 +170,6 @@
|
||||||
"addEquipmentProfileTitle": "Add equipment",
|
"addEquipmentProfileTitle": "Add equipment",
|
||||||
"editEquipmentProfileTitle": "Edit equipment",
|
"editEquipmentProfileTitle": "Edit equipment",
|
||||||
"editPhotoTitle": "Edit Photo",
|
"editPhotoTitle": "Edit Photo",
|
||||||
"date": "Date",
|
|
||||||
"ndFilter": "ND Filter",
|
"ndFilter": "ND Filter",
|
||||||
"note": "Note",
|
"note": "Note",
|
||||||
"notSet": "Not set",
|
"notSet": "Not set",
|
||||||
|
|
|
@ -161,7 +161,6 @@
|
||||||
"addEquipmentProfileTitle": "Ajouter un profil",
|
"addEquipmentProfileTitle": "Ajouter un profil",
|
||||||
"editEquipmentProfileTitle": "Editer le profil",
|
"editEquipmentProfileTitle": "Editer le profil",
|
||||||
"editPhotoTitle": "Modifier la photo",
|
"editPhotoTitle": "Modifier la photo",
|
||||||
"date": "Date",
|
|
||||||
"ndFilter": "Filtre ND",
|
"ndFilter": "Filtre ND",
|
||||||
"note": "Note",
|
"note": "Note",
|
||||||
"notSet": "Non défini",
|
"notSet": "Non défini",
|
||||||
|
|
|
@ -160,7 +160,6 @@
|
||||||
"addEquipmentProfileTitle": "Добавить профиль",
|
"addEquipmentProfileTitle": "Добавить профиль",
|
||||||
"editEquipmentProfileTitle": "Редактировать профиль",
|
"editEquipmentProfileTitle": "Редактировать профиль",
|
||||||
"editPhotoTitle": "Редактировать фото",
|
"editPhotoTitle": "Редактировать фото",
|
||||||
"date": "Дата",
|
|
||||||
"ndFilter": "ND фильтр",
|
"ndFilter": "ND фильтр",
|
||||||
"note": "Заметка",
|
"note": "Заметка",
|
||||||
"notSet": "Не задано",
|
"notSet": "Не задано",
|
||||||
|
|
|
@ -158,7 +158,6 @@
|
||||||
"addEquipmentProfileTitle": "添加设备",
|
"addEquipmentProfileTitle": "添加设备",
|
||||||
"editEquipmentProfileTitle": "编辑设备",
|
"editEquipmentProfileTitle": "编辑设备",
|
||||||
"editPhotoTitle": "编辑照片",
|
"editPhotoTitle": "编辑照片",
|
||||||
"date": "日期",
|
|
||||||
"ndFilter": "ND 滤镜",
|
"ndFilter": "ND 滤镜",
|
||||||
"note": "备注",
|
"note": "备注",
|
||||||
"notSet": "未设置",
|
"notSet": "未设置",
|
||||||
|
|
|
@ -37,6 +37,7 @@ class _LogbookPhotoEditScreenState extends State<LogbookPhotoEditScreen> {
|
||||||
builder: (context, state) => IgnorePointer(
|
builder: (context, state) => IgnorePointer(
|
||||||
ignoring: state.isLoading,
|
ignoring: state.isLoading,
|
||||||
child: SliverScreen(
|
child: SliverScreen(
|
||||||
|
title: Text(_formatDate(state.timestamp)),
|
||||||
appBarActions: [
|
appBarActions: [
|
||||||
BlocBuilder<LogbookPhotoEditBloc, LogbookPhotoEditState>(
|
BlocBuilder<LogbookPhotoEditBloc, LogbookPhotoEditState>(
|
||||||
buildWhen: (previous, current) => previous.canSave != current.canSave,
|
buildWhen: (previous, current) => previous.canSave != current.canSave,
|
||||||
|
@ -60,17 +61,17 @@ class _LogbookPhotoEditScreenState extends State<LogbookPhotoEditScreen> {
|
||||||
SliverToBoxAdapter(
|
SliverToBoxAdapter(
|
||||||
child: Opacity(
|
child: Opacity(
|
||||||
opacity: state.isLoading ? Dimens.disabledOpacity : Dimens.enabledOpacity,
|
opacity: state.isLoading ? Dimens.disabledOpacity : Dimens.enabledOpacity,
|
||||||
child: const Column(
|
child: const Padding(
|
||||||
|
padding: EdgeInsets.symmetric(horizontal: Dimens.paddingM),
|
||||||
|
child: Column(
|
||||||
children: [
|
children: [
|
||||||
_PhotoPreviewBuilder(),
|
_PhotoPreviewBuilder(),
|
||||||
|
SizedBox(height: Dimens.grid16),
|
||||||
Card(
|
Card(
|
||||||
margin: EdgeInsets.all(Dimens.paddingM),
|
|
||||||
child: Padding(
|
child: Padding(
|
||||||
padding: EdgeInsets.symmetric(vertical: Dimens.paddingM),
|
padding: EdgeInsets.symmetric(vertical: Dimens.paddingM),
|
||||||
child: Column(
|
child: Column(
|
||||||
children: [
|
children: [
|
||||||
_DateListTile(),
|
|
||||||
//TODO: maybe make it edge to edge and add InterActiveViewer
|
|
||||||
LogbookPhotoCoordinatesListTile(),
|
LogbookPhotoCoordinatesListTile(),
|
||||||
_NoteListTile(),
|
_NoteListTile(),
|
||||||
_EvListTile(),
|
_EvListTile(),
|
||||||
|
@ -86,12 +87,22 @@ class _LogbookPhotoEditScreenState extends State<LogbookPhotoEditScreen> {
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
),
|
||||||
SliverToBoxAdapter(child: SizedBox(height: MediaQuery.paddingOf(context).bottom)),
|
SliverToBoxAdapter(child: SizedBox(height: MediaQuery.paddingOf(context).bottom)),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
String _formatDate(DateTime dateTime) {
|
||||||
|
final day = dateTime.day.toString().padLeft(2, '0');
|
||||||
|
final month = dateTime.month.toString().padLeft(2, '0');
|
||||||
|
final year = dateTime.year.toString();
|
||||||
|
final hour = dateTime.hour.toString().padLeft(2, '0');
|
||||||
|
final minute = dateTime.minute.toString().padLeft(2, '0');
|
||||||
|
return '$day.$month.$year $hour:$minute';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class _PhotoPreviewBuilder extends StatelessWidget {
|
class _PhotoPreviewBuilder extends StatelessWidget {
|
||||||
|
@ -105,6 +116,8 @@ class _PhotoPreviewBuilder extends StatelessWidget {
|
||||||
aspectRatio: PlatformConfig.cameraPreviewAspectRatio,
|
aspectRatio: PlatformConfig.cameraPreviewAspectRatio,
|
||||||
child: Hero(
|
child: Hero(
|
||||||
tag: state.id,
|
tag: state.id,
|
||||||
|
child: ClipRRect(
|
||||||
|
borderRadius: BorderRadius.circular(Dimens.borderRadiusM),
|
||||||
child: PlatformConfig.cameraStubImage.isNotEmpty
|
child: PlatformConfig.cameraStubImage.isNotEmpty
|
||||||
? Image.asset(
|
? Image.asset(
|
||||||
PlatformConfig.cameraStubImage,
|
PlatformConfig.cameraStubImage,
|
||||||
|
@ -116,30 +129,6 @@ class _PhotoPreviewBuilder extends StatelessWidget {
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
class _DateListTile extends StatelessWidget {
|
|
||||||
const _DateListTile();
|
|
||||||
|
|
||||||
String _formatDate(DateTime dateTime) {
|
|
||||||
final day = dateTime.day.toString().padLeft(2, '0');
|
|
||||||
final month = dateTime.month.toString().padLeft(2, '0');
|
|
||||||
final year = dateTime.year.toString();
|
|
||||||
final hour = dateTime.hour.toString().padLeft(2, '0');
|
|
||||||
final minute = dateTime.minute.toString().padLeft(2, '0');
|
|
||||||
return '$day.$month.$year $hour:$minute';
|
|
||||||
}
|
|
||||||
|
|
||||||
@override
|
|
||||||
Widget build(BuildContext context) {
|
|
||||||
return BlocBuilder<LogbookPhotoEditBloc, LogbookPhotoEditState>(
|
|
||||||
buildWhen: (_, __) => false,
|
|
||||||
builder: (context, state) => ListTile(
|
|
||||||
leading: const Icon(Icons.access_time),
|
|
||||||
title: Text(S.of(context).date),
|
|
||||||
trailing: Text(_formatDate(state.timestamp)),
|
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue