This commit is contained in:
JMARyA 2024-09-23 13:57:08 +02:00
parent 0defbd90df
commit bb2e0e72c5
Signed by: jmarya
GPG key ID: 901B2ADDF27C2263

View file

@ -130,29 +130,31 @@ class _FlowsPageState extends State<FlowsPage> {
return const CircularProgressIndicator(); return const CircularProgressIndicator();
} }
return Scaffold( return DefaultTabController(
appBar: AppBar( length: 4,
title: const Text("Flows"), child: Scaffold(
bottom: TabBar( appBar: AppBar(
tabs: const [ title: const Text("Flows"),
Tab(text: "All"), bottom: TabBar(
Tab(text: "Produces"), tabs: const [
Tab(text: "Depends"), Tab(text: "All"),
Tab(text: "Active") Tab(text: "Produces"),
], Tab(text: "Depends"),
onTap: (value) { Tab(text: "Active")
setState(() { ],
tabSelection = value; onTap: (value) {
}); setState(() {
}, tabSelection = value;
)), });
body: switch (tabSelection) { },
0 => listAllFlowInfos(context, flowInfos!), )),
1 => listFlowInfoByProduced(context, flowInfos!), body: switch (tabSelection) {
2 => listFlowInfoByDependant(context, flowInfos!), 0 => listAllFlowInfos(context, flowInfos!),
3 => listFlowInfoByActive(context, flowInfos!), 1 => listFlowInfoByProduced(context, flowInfos!),
_ => const Text("..."), 2 => listFlowInfoByDependant(context, flowInfos!),
}); 3 => listFlowInfoByActive(context, flowInfos!),
_ => const Text("..."),
}));
} }
} }