diff --git a/lib/screens/wool.dart b/lib/screens/wool.dart index fcdb26c..53195a5 100644 --- a/lib/screens/wool.dart +++ b/lib/screens/wool.dart @@ -1,10 +1,8 @@ import 'package:flutter/material.dart'; import 'package:provider/provider.dart'; -import 'package:shimmer/shimmer.dart'; import 'package:temperaturdecke/database.dart'; import 'package:temperaturdecke/screens/add_wool_modal.dart'; import 'package:temperaturdecke/widgets/cards/wool_card.dart'; -import 'package:temperaturdecke/widgets/custom_card.dart'; class WoolScreen extends StatelessWidget { WoolScreen({super.key}); @@ -12,48 +10,19 @@ 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) { - child = Center( - child: Shimmer.fromColors( - baseColor: Theme.of(context).colorScheme.secondaryContainer, - highlightColor: Theme.of(context) - .colorScheme - .onSecondaryContainer - .withOpacity(.3), - child: ListView.builder( - itemBuilder: (BuildContext context, int index) { - return Padding( - padding: const EdgeInsets.symmetric(horizontal: 10), - child: Column( - children: [ - CustomCard( - SizedBox( - height: 70, - ), - ), - const SizedBox( - height: 15, - ) - ], - ), - ); - }, - itemCount: 6, - ), - ), + return const Center( + child: CircularProgressIndicator(), ); } else { // Hier können Sie den Inhalt basierend auf den geladenen Daten anzeigen - child = Scaffold( - floatingActionButton: FloatingActionButton.extended( - label: Text("Hinzufügen"), + return Scaffold( + floatingActionButton: FloatingActionButton( onPressed: () { showModalBottomSheet( isScrollControlled: true, @@ -64,7 +33,7 @@ class WoolScreen extends StatelessWidget { }, ); }, - icon: Icon(Icons.add), + child: Icon(Icons.add), ), body: Column( children: [ @@ -95,12 +64,6 @@ class WoolScreen extends StatelessWidget { ), ); } - return AnimatedSwitcher( - duration: Duration(milliseconds: 500), - switchInCurve: Curves.easeOut, - switchOutCurve: Curves.ease, - child: child, - ); }, ); } diff --git a/lib/widgets/modal_wrapper.dart b/lib/widgets/modal_wrapper.dart index 170ff7a..6cbcc56 100644 --- a/lib/widgets/modal_wrapper.dart +++ b/lib/widgets/modal_wrapper.dart @@ -14,7 +14,7 @@ class ModalWrapper extends StatelessWidget { child: Wrap( children: [ SizedBox( - width: 750, + width: 500, height: MediaQuery.of(context).size.height - 100, child: Padding( padding: EdgeInsets.symmetric(horizontal: 25, vertical: 10), diff --git a/pubspec.lock b/pubspec.lock index 7737e2d..26d6386 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -584,14 +584,6 @@ packages: url: "https://pub.dev" source: hosted version: "1.0.4" - shimmer: - dependency: "direct main" - description: - name: shimmer - sha256: "5f88c883a22e9f9f299e5ba0e4f7e6054857224976a5d9f839d4ebdc94a14ac9" - url: "https://pub.dev" - source: hosted - version: "3.0.0" sky_engine: dependency: transitive description: flutter diff --git a/pubspec.yaml b/pubspec.yaml index 0f920b0..cc4d040 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -33,8 +33,6 @@ dependencies: blobs: - shimmer: - flutter_colorpicker: hexcolor: