first commit
This commit is contained in:
commit
39e38f931f
382 changed files with 520450 additions and 0 deletions
54
lib/screens/wool.dart
Normal file
54
lib/screens/wool.dart
Normal file
|
|
@ -0,0 +1,54 @@
|
|||
import 'package:flutter/material.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
import 'package:temperaturdecke/database.dart';
|
||||
import 'package:temperaturdecke/widgets/cards/wool_card.dart';
|
||||
|
||||
class WoolScreen extends StatelessWidget {
|
||||
WoolScreen({super.key});
|
||||
int currentScreen = 1;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return FutureBuilder(
|
||||
future: Provider.of<AppDatabase>(context)
|
||||
.select(Provider.of<AppDatabase>(context).wolle)
|
||||
.get(),
|
||||
builder: (BuildContext context, AsyncSnapshot snapshot) {
|
||||
if (snapshot.connectionState == ConnectionState.waiting) {
|
||||
return const Center(
|
||||
child: CircularProgressIndicator(),
|
||||
);
|
||||
} else {
|
||||
// Hier können Sie den Inhalt basierend auf den geladenen Daten anzeigen
|
||||
return Column(
|
||||
children: [
|
||||
Expanded(
|
||||
child: ListView.builder(
|
||||
itemBuilder: (BuildContext context, int index) {
|
||||
return Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 10),
|
||||
child: Column(
|
||||
children: [
|
||||
Woolcard(
|
||||
index,
|
||||
snapshot.data[index].manufacture,
|
||||
snapshot.data[index].title,
|
||||
snapshot.data[index].color,
|
||||
),
|
||||
const SizedBox(
|
||||
height: 15,
|
||||
)
|
||||
],
|
||||
),
|
||||
);
|
||||
},
|
||||
itemCount: snapshot.data.length,
|
||||
),
|
||||
),
|
||||
],
|
||||
);
|
||||
}
|
||||
},
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in a new issue