Styling tweaking
This commit is contained in:
@@ -111,15 +111,15 @@ class _PictureWidgetState extends State<PictureWidget> {
|
||||
return LayoutBuilder(
|
||||
builder: (context, constraints) {
|
||||
final isNarrow = constraints.maxWidth < 800;
|
||||
final maxImageWidth = constraints.maxWidth * 0.5;
|
||||
final imageWidth = isNarrow ? constraints.maxWidth : constraints.maxWidth * 0.5;
|
||||
return SingleChildScrollView(
|
||||
child: isNarrow
|
||||
? Column(
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
ConstrainedBox(
|
||||
constraints: BoxConstraints(maxWidth: maxImageWidth),
|
||||
SizedBox(
|
||||
width: imageWidth,
|
||||
child: _imageWidget(selectedPicture),
|
||||
),
|
||||
const SizedBox(height: 32),
|
||||
@@ -130,8 +130,8 @@ class _PictureWidgetState extends State<PictureWidget> {
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
ConstrainedBox(
|
||||
constraints: BoxConstraints(maxWidth: maxImageWidth),
|
||||
SizedBox(
|
||||
width: imageWidth,
|
||||
child: _imageWidget(selectedPicture),
|
||||
),
|
||||
const SizedBox(width: 32),
|
||||
@@ -259,7 +259,6 @@ class _PictureWidgetState extends State<PictureWidget> {
|
||||
thumbVisibility: true,
|
||||
child: SingleChildScrollView(
|
||||
controller: _commentScrollController,
|
||||
padding: const EdgeInsets.all(8.0),
|
||||
child: Text(
|
||||
dto.comment ?? "",
|
||||
style: contentStyle,
|
||||
@@ -424,14 +423,11 @@ class _PictureWidgetState extends State<PictureWidget> {
|
||||
}
|
||||
|
||||
void _actionNavigateToPicture(int index) {
|
||||
print("navigate. too $index");
|
||||
final pictures = _customerDto.pictures;
|
||||
if (index >= 0 && index < pictures.length) {
|
||||
setState(() {
|
||||
_selectedPicture = pictures[index];
|
||||
});
|
||||
} else {
|
||||
print("empty");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user