cleanup and added unit tests
This commit is contained in:
@@ -2,6 +2,7 @@ import 'dart:convert' show base64Decode;
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:fotodocumentation/dto/customer_dto.dart';
|
||||
import 'package:fotodocumentation/dto/picture_dto.dart';
|
||||
import 'package:fotodocumentation/pages/customer/picture_fullscreen_dialog.dart';
|
||||
import 'package:fotodocumentation/pages/ui_utils/general_style.dart';
|
||||
import 'package:fotodocumentation/utils/di_container.dart';
|
||||
@@ -179,12 +180,17 @@ class _PictureWidgetState extends State<PictureWidget> {
|
||||
|
||||
Widget _imageWidget(PictureDto dto) {
|
||||
return GestureDetector(
|
||||
key: const Key("image"),
|
||||
behavior: HitTestBehavior.opaque,
|
||||
onTap: () => _showFullscreenImage(dto),
|
||||
child: MouseRegion(
|
||||
cursor: SystemMouseCursors.click,
|
||||
child: Image.memory(
|
||||
base64Decode(dto.image),
|
||||
fit: BoxFit.contain,
|
||||
child: ConstrainedBox(
|
||||
constraints: const BoxConstraints(minWidth: 100, minHeight: 100),
|
||||
child: Image.memory(
|
||||
base64Decode(dto.image),
|
||||
fit: BoxFit.contain,
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
@@ -234,7 +240,7 @@ class _PictureWidgetState extends State<PictureWidget> {
|
||||
Padding(
|
||||
padding: const EdgeInsets.only(top: 4.0),
|
||||
child: Text(
|
||||
dto.customerListDto.name,
|
||||
widget.customerDto.name,
|
||||
style: contentStyle,
|
||||
),
|
||||
),
|
||||
@@ -248,7 +254,7 @@ class _PictureWidgetState extends State<PictureWidget> {
|
||||
Padding(
|
||||
padding: const EdgeInsets.only(top: 4.0),
|
||||
child: Text(
|
||||
dto.customerListDto.customerNumber,
|
||||
widget.customerDto.customerNumber,
|
||||
style: contentStyle,
|
||||
),
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user