2024-12-07 12:29:34 +00:00
|
|
|
/* SPDX-License-Identifier: GPL-3.0-or-later */
|
2024-12-07 12:39:11 +00:00
|
|
|
/* Copyright (C) 2024 Marco Groß <mgross@sw-gross.de> */
|
2024-06-09 12:42:17 +00:00
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
|
2024-09-06 00:23:47 +00:00
|
|
|
class RowWidget extends StatelessWidget {
|
2024-06-09 12:42:17 +00:00
|
|
|
final Widget? widget1;
|
|
|
|
final Widget? widget2;
|
|
|
|
final Widget? widget3;
|
|
|
|
final Widget? widget4;
|
2025-01-03 21:34:01 +00:00
|
|
|
final bool showDividers;
|
2024-06-09 12:42:17 +00:00
|
|
|
|
2024-09-06 00:23:47 +00:00
|
|
|
const RowWidget(this.widget1, this.widget2, this.widget3, this.widget4,
|
2025-01-03 21:34:01 +00:00
|
|
|
{super.key, required this.showDividers});
|
2024-06-09 12:42:17 +00:00
|
|
|
|
|
|
|
@override
|
|
|
|
Widget build(BuildContext context) {
|
2025-01-03 21:34:01 +00:00
|
|
|
return IntrinsicHeight(
|
|
|
|
child: ConstrainedBox(
|
|
|
|
constraints: BoxConstraints(minHeight: 48),
|
|
|
|
child: Row(
|
|
|
|
children: [
|
|
|
|
Expanded(
|
|
|
|
flex: 10,
|
|
|
|
child: Padding(
|
|
|
|
padding: const EdgeInsets.symmetric(horizontal: 4.0),
|
|
|
|
child: widget1 ?? Container(),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
Opacity(
|
|
|
|
opacity: showDividers ? 1.0 : 0.0,
|
|
|
|
child: VerticalDivider(),
|
|
|
|
),
|
|
|
|
Expanded(
|
|
|
|
flex: 6,
|
|
|
|
child: Padding(
|
|
|
|
padding: const EdgeInsets.symmetric(horizontal: 4.0),
|
|
|
|
child: widget2 ?? Container(),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
Opacity(
|
|
|
|
opacity: showDividers ? 1.0 : 0.0,
|
|
|
|
child: VerticalDivider(),
|
|
|
|
),
|
|
|
|
Expanded(
|
|
|
|
flex: 6,
|
|
|
|
child: Padding(
|
|
|
|
padding: const EdgeInsets.symmetric(horizontal: 4.0),
|
|
|
|
child: widget3 ?? Container(),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
Opacity(
|
|
|
|
opacity: showDividers ? 1.0 : 0.0,
|
|
|
|
child: VerticalDivider(),
|
|
|
|
),
|
|
|
|
Expanded(
|
|
|
|
flex: 6,
|
|
|
|
child: Padding(
|
|
|
|
padding: const EdgeInsets.symmetric(horizontal: 4.0),
|
|
|
|
child: widget4 ?? Container(),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
],
|
|
|
|
),
|
|
|
|
),
|
2024-06-09 12:42:17 +00:00
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|