From c4160118647a4d617ba819c385a2e9e1399356a7 Mon Sep 17 00:00:00 2001 From: Supermjork Date: Wed, 27 Dec 2023 16:45:42 +0200 Subject: [PATCH] Reversing fetched list (New to Old) --- lib/fetcher.dart | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/lib/fetcher.dart b/lib/fetcher.dart index 94a3d26..288367f 100644 --- a/lib/fetcher.dart +++ b/lib/fetcher.dart @@ -17,6 +17,15 @@ class _FetchAPIState extends State { return Scaffold( appBar: AppBar( title: const Text("Fetching API"), + actions: [ + IconButton( + onPressed: () { + setState(() { + fetchedArrivals = fetchArrivals(); + }); + }, + icon: const Icon(Icons.refresh_rounded)) + ], ), body: Column( mainAxisAlignment: MainAxisAlignment.start,