rework ui
This commit is contained in:
@@ -204,7 +204,7 @@ class _CustomerWidgetState extends State<CustomerWidget> {
|
||||
);
|
||||
|
||||
final dateStr = _dateFormat.format(pictureDto.pictureDate);
|
||||
final evaluationColor = _generalStyle.evaluationColor(value: pictureDto.evaluation); // FIXME: set to color from DB
|
||||
final evaluationColor = _generalStyle.evaluationColor(value: pictureDto.evaluation);
|
||||
return InkWell(
|
||||
key: Key("table_row_${customerDto.id}"),
|
||||
onTap: () => _actionSelect(context, customerDto, pictureDto),
|
||||
|
||||
@@ -6,6 +6,7 @@ import 'package:fotodocumentation/controller/customer_controller.dart';
|
||||
import 'package:fotodocumentation/controller/picture_controller.dart';
|
||||
import 'package:fotodocumentation/dto/customer_dto.dart';
|
||||
import 'package:fotodocumentation/dto/picture_dto.dart';
|
||||
import 'package:fotodocumentation/l10n/app_localizations.dart';
|
||||
import 'package:fotodocumentation/pages/ui_utils/component/customer_back_button.dart';
|
||||
import 'package:fotodocumentation/pages/customer/picture_fullscreen_dialog.dart';
|
||||
import 'package:fotodocumentation/pages/ui_utils/component/general_error_widget.dart';
|
||||
@@ -200,7 +201,7 @@ class _PictureWidgetState extends State<PictureWidget> {
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text(
|
||||
"KUNDENNUMMER",
|
||||
AppLocalizations.of(context)!.pictureWidgetLabelCustomerNumber,
|
||||
style: labelStyle,
|
||||
),
|
||||
Padding(
|
||||
@@ -210,10 +211,32 @@ class _PictureWidgetState extends State<PictureWidget> {
|
||||
style: contentStyle,
|
||||
),
|
||||
),
|
||||
Text(
|
||||
AppLocalizations.of(context)!.pictureWidgetLabelZip,
|
||||
style: labelStyle,
|
||||
),
|
||||
Padding(
|
||||
padding: const EdgeInsets.only(top: 4.0),
|
||||
child: Text(
|
||||
_customerDto.zip ?? "",
|
||||
style: contentStyle,
|
||||
),
|
||||
),
|
||||
Text(
|
||||
AppLocalizations.of(context)!.pictureWidgetLabelCity,
|
||||
style: labelStyle,
|
||||
),
|
||||
Padding(
|
||||
padding: const EdgeInsets.only(top: 4.0),
|
||||
child: Text(
|
||||
_customerDto.city ?? "",
|
||||
style: contentStyle,
|
||||
),
|
||||
),
|
||||
Padding(
|
||||
padding: const EdgeInsets.only(top: 20.0),
|
||||
child: Text(
|
||||
"KOMMENTAR",
|
||||
AppLocalizations.of(context)!.pictureWidgetLabelComment,
|
||||
style: labelStyle,
|
||||
),
|
||||
),
|
||||
@@ -258,7 +281,7 @@ class _PictureWidgetState extends State<PictureWidget> {
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
Text(
|
||||
"BEWERTUNG",
|
||||
AppLocalizations.of(context)!.pictureWidgetLabelEvaluation,
|
||||
style: TextStyle(
|
||||
fontWeight: FontWeight.normal,
|
||||
fontSize: 16,
|
||||
@@ -333,6 +356,7 @@ class _PictureWidgetState extends State<PictureWidget> {
|
||||
children: [
|
||||
// Previous button
|
||||
IconButton(
|
||||
key: Key("navigate_left"),
|
||||
onPressed: hasPrevious ? () => _actionNavigateToPicture(currentIndex - 1) : null,
|
||||
icon: Icon(Icons.chevron_left, color: _generalStyle.nextTextColor, size: 32),
|
||||
),
|
||||
@@ -372,6 +396,7 @@ class _PictureWidgetState extends State<PictureWidget> {
|
||||
const SizedBox(width: 24),
|
||||
// Next button
|
||||
IconButton(
|
||||
key: Key("navigate_right"),
|
||||
onPressed: hasNext ? () => _actionNavigateToPicture(currentIndex + 1) : null,
|
||||
icon: Icon(Icons.chevron_right, color: _generalStyle.nextTextColor, size: 32),
|
||||
),
|
||||
@@ -383,9 +408,7 @@ class _PictureWidgetState extends State<PictureWidget> {
|
||||
Future<void> _actionUpdateEvaluation(int value) async {
|
||||
_selectedPicture?.evaluation = value;
|
||||
_pictureController.updateEvaluation(_selectedPicture!);
|
||||
setState(() {
|
||||
|
||||
});
|
||||
setState(() {});
|
||||
}
|
||||
|
||||
void _actionNavigateToPicture(int index) {
|
||||
|
||||
Reference in New Issue
Block a user