Compare commits

..

No commits in common. "c9d62743f622880629528671e5fa6765a036181e" and "dcd05b53b482f4b3a95916413164a901749caf81" have entirely different histories.

4 changed files with 6 additions and 53 deletions

View file

@ -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<AppDatabase>(context)
.select(Provider.of<AppDatabase>(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,
);
},
);
}

View file

@ -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),

View file

@ -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

View file

@ -33,8 +33,6 @@ dependencies:
blobs:
shimmer:
flutter_colorpicker:
hexcolor: