2022-09-19 17:37:27 +00:00
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
|
2022-12-05 22:10:18 +00:00
|
|
|
class TableView extends StatelessWidget {
|
2022-09-19 20:39:18 +00:00
|
|
|
const TableView({
|
|
|
|
Key? key,
|
|
|
|
required this.rows,
|
|
|
|
this.rowSpacing = 10.0,
|
2022-09-25 19:53:08 +00:00
|
|
|
this.shrinkWrap = false,
|
2022-09-19 20:39:18 +00:00
|
|
|
}) : super(key: key);
|
2022-09-19 17:37:27 +00:00
|
|
|
|
2022-11-15 22:44:23 +00:00
|
|
|
final List<Widget> rows;
|
2022-09-19 20:39:18 +00:00
|
|
|
final double rowSpacing;
|
2022-09-25 19:53:08 +00:00
|
|
|
final bool shrinkWrap;
|
2022-12-05 22:10:18 +00:00
|
|
|
//
|
|
|
|
// @override
|
|
|
|
// State<TableView> createState() => _TableViewState();
|
|
|
|
// }
|
|
|
|
//
|
|
|
|
// class _TableViewState extends State<TableView> {
|
2022-09-19 17:37:27 +00:00
|
|
|
@override
|
|
|
|
Widget build(BuildContext context) {
|
2022-12-05 22:10:18 +00:00
|
|
|
debugPrint("BUILD: $runtimeType");
|
2022-09-19 20:39:18 +00:00
|
|
|
return ListView(
|
2022-12-05 22:10:18 +00:00
|
|
|
shrinkWrap: shrinkWrap,
|
2022-09-19 20:39:18 +00:00
|
|
|
children: [
|
2022-12-05 22:10:18 +00:00
|
|
|
for (int i = 0; i < rows.length; i++)
|
2022-09-19 20:39:18 +00:00
|
|
|
Column(
|
|
|
|
children: [
|
|
|
|
if (i != 0)
|
|
|
|
SizedBox(
|
2022-12-05 22:10:18 +00:00
|
|
|
height: rowSpacing,
|
2022-09-19 20:39:18 +00:00
|
|
|
),
|
2022-12-05 22:10:18 +00:00
|
|
|
rows[i],
|
2022-09-19 20:39:18 +00:00
|
|
|
],
|
|
|
|
)
|
|
|
|
],
|
2022-09-19 17:37:27 +00:00
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|