2022-09-19 17:37:27 +00:00
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
import 'package:stackwallet/widgets/table_view/table_view_row.dart';
|
|
|
|
|
|
|
|
class TableView extends StatefulWidget {
|
2022-09-19 20:39:18 +00:00
|
|
|
const TableView({
|
|
|
|
Key? key,
|
|
|
|
required this.rows,
|
|
|
|
this.rowSpacing = 10.0,
|
|
|
|
}) : super(key: key);
|
2022-09-19 17:37:27 +00:00
|
|
|
|
|
|
|
final List<TableViewRow> rows;
|
2022-09-19 20:39:18 +00:00
|
|
|
final double rowSpacing;
|
2022-09-19 17:37:27 +00:00
|
|
|
|
|
|
|
@override
|
|
|
|
State<TableView> createState() => _TableViewState();
|
|
|
|
}
|
|
|
|
|
|
|
|
class _TableViewState extends State<TableView> {
|
|
|
|
@override
|
|
|
|
Widget build(BuildContext context) {
|
2022-09-19 20:39:18 +00:00
|
|
|
return ListView(
|
|
|
|
children: [
|
|
|
|
for (int i = 0; i < widget.rows.length; i++)
|
|
|
|
Column(
|
|
|
|
children: [
|
|
|
|
if (i != 0)
|
|
|
|
SizedBox(
|
|
|
|
height: widget.rowSpacing,
|
|
|
|
),
|
|
|
|
widget.rows[i],
|
|
|
|
],
|
|
|
|
)
|
|
|
|
],
|
2022-09-19 17:37:27 +00:00
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|