diff --git a/lib/screens/wool.dart b/lib/screens/wool.dart index b13c0a1..fcdb26c 100644 --- a/lib/screens/wool.dart +++ b/lib/screens/wool.dart @@ -12,13 +12,15 @@ class WoolScreen extends StatelessWidget { @override Widget build(BuildContext context) { + Widget child; + return FutureBuilder( future: Provider.of(context) .select(Provider.of(context).wolle) .get(), builder: (BuildContext context, AsyncSnapshot snapshot) { if (snapshot.connectionState == ConnectionState.waiting) { - return Center( + child = Center( child: Shimmer.fromColors( baseColor: Theme.of(context).colorScheme.secondaryContainer, highlightColor: Theme.of(context) @@ -49,7 +51,7 @@ class WoolScreen extends StatelessWidget { ); } else { // Hier können Sie den Inhalt basierend auf den geladenen Daten anzeigen - return Scaffold( + child = Scaffold( floatingActionButton: FloatingActionButton.extended( label: Text("Hinzufügen"), onPressed: () { @@ -93,6 +95,12 @@ class WoolScreen extends StatelessWidget { ), ); } + return AnimatedSwitcher( + duration: Duration(milliseconds: 500), + switchInCurve: Curves.easeOut, + switchOutCurve: Curves.ease, + child: child, + ); }, ); }