From c1906abc5b8a9470f817a9c1cb4cf8746358e309 Mon Sep 17 00:00:00 2001 From: JMARyA Date: Wed, 18 Sep 2024 13:56:40 +0200 Subject: [PATCH] flow view --- lib/main.dart | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/lib/main.dart b/lib/main.dart index 0417cfd..1f079ec 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -86,7 +86,22 @@ class FlowsPage extends StatelessWidget { // todo : add flow list // todo : flows by item produced // todo : flow page - return const Scaffold(); + return Scaffold( + appBar: AppBar(title: const Text("Flows")), + body: FutureBuilder( + future: API().getFlows(), + builder: (ctx, snap) { + if (!snap.hasData) { + return const CircularProgressIndicator(); + } + + var data = snap.data!; + + return ListView( + children: data.values.map((x) { + return ListTile(title: Text(x.name)); + }).toList()); + })); } }