Dleeted unused files
This commit is contained in:
parent
be170e429b
commit
3857d46953
|
|
@ -1,245 +0,0 @@
|
|||
import 'package:flutter/material.dart';
|
||||
import 'package:Emma_home/screens/details_db.dart';
|
||||
import 'package:Emma_home/utils/data.dart';
|
||||
import 'package:Emma_home/screens/subheader_Datepicker.dart';
|
||||
|
||||
class HomePage extends StatelessWidget {
|
||||
const HomePage({super.key});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
var body = SafeArea(
|
||||
child: Column(
|
||||
children: <Widget>[
|
||||
//Header Container
|
||||
HeaderSection(),
|
||||
|
||||
//Body Container
|
||||
Expanded(
|
||||
child: NestedScrollView(
|
||||
headerSliverBuilder:
|
||||
(BuildContext context, bool innerBoxIsScrolled) {
|
||||
return [
|
||||
SliverToBoxAdapter(
|
||||
child: Container(
|
||||
height: 35,
|
||||
padding: const EdgeInsets.all(0),
|
||||
child: TimeButtonSection(), // Dein Button-Bereich
|
||||
),
|
||||
),
|
||||
];
|
||||
},
|
||||
body: Column(
|
||||
children: [
|
||||
GridView.builder(
|
||||
shrinkWrap:
|
||||
true, // Damit der GridView korrekt in die Column passt
|
||||
//physics: NeverScrollableScrollPhysics(), // Deaktiviert das Scrolling des GridView
|
||||
gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(
|
||||
crossAxisCount: 2, // Anzahl der Spalten im Grid
|
||||
),
|
||||
itemCount:
|
||||
Data.recipes.length, // Anzahl der Elemente im Grid
|
||||
itemBuilder: (BuildContext context, int index) {
|
||||
return Padding(
|
||||
padding: const EdgeInsets.all(6.0),
|
||||
child: InkWell(
|
||||
onTap: () {
|
||||
Navigator.push(
|
||||
context,
|
||||
MaterialPageRoute(
|
||||
builder: (context) => DetailsPage(
|
||||
//recipe: Data.recipes[index],
|
||||
)));
|
||||
},
|
||||
child: Card(
|
||||
color: Color.fromARGB(255, 249, 171, 21),
|
||||
//color: Color.fromARGB(255, 253, 73, 73), //FD4949 //Nachtleben
|
||||
//color: Color.fromARGB(255, 80, 168, 250), //50A8FA//Kunst
|
||||
//color: Color.fromARGB(255, 80, 240, 250), //50F0FA //Sport
|
||||
//color: Color.fromARGB(255, 130, 73, 253), //8249FD //Gesundheit
|
||||
//color: Color.fromARGB(255, 253, 73, 73), //FD4949//Essen
|
||||
//color: Color.fromARGB(255, 255, 0, 199), //FF00C7//Soziales
|
||||
//color: Color.fromARGB(255, 66, 255, 0), //42FF00//Familie
|
||||
shape: RoundedRectangleBorder(
|
||||
borderRadius: BorderRadius.circular(6.0),
|
||||
),
|
||||
child: Container(
|
||||
width: MediaQuery.of(context).size.width / 2.5,
|
||||
height: 20,
|
||||
child: Column(
|
||||
children: <Widget>[
|
||||
Expanded(
|
||||
child: ClipRRect(
|
||||
borderRadius: BorderRadius.only(
|
||||
topLeft: Radius.circular(6.0),
|
||||
topRight: Radius.circular(6.0),
|
||||
),
|
||||
child: Hero(
|
||||
tag: Data.recipes[index].id,
|
||||
child: FadeInImage(
|
||||
image: AssetImage(
|
||||
Data.recipes[index].imageUrl,
|
||||
),
|
||||
fit: BoxFit.cover,
|
||||
placeholder: AssetImage(
|
||||
'assets/images/loading.gif',
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
Text(
|
||||
Data.recipes[index].title,
|
||||
style: TextStyle(
|
||||
color: Colors.white,
|
||||
fontSize: 20,
|
||||
fontWeight: FontWeight.bold),
|
||||
),
|
||||
Padding(
|
||||
padding: const EdgeInsets.all(1.0),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
},
|
||||
),
|
||||
Image.asset(
|
||||
'assets/images/FooterFooter.png', // Pfad zum Bild
|
||||
height: 127, // Höhe des Bildes
|
||||
width: 390, // Breite des Bildes
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
|
||||
/* Expanded(
|
||||
child: Column(
|
||||
children:[
|
||||
Container(
|
||||
padding: const EdgeInsets.fromLTRB(0, 0, 0, 0),
|
||||
height: 35,
|
||||
child: ButtonSection(),
|
||||
),
|
||||
Expanded(
|
||||
child:GridView.builder(
|
||||
shrinkWrap: false,
|
||||
itemCount: Data.recipes.length,
|
||||
gridDelegate:
|
||||
const SliverGridDelegateWithFixedCrossAxisCount(
|
||||
crossAxisCount: 2),
|
||||
itemBuilder: (BuildContext context, int index) {
|
||||
return Padding(
|
||||
padding: const EdgeInsets.all(6.0),
|
||||
child: InkWell(
|
||||
onTap: () {
|
||||
Navigator.push(
|
||||
context,
|
||||
MaterialPageRoute(
|
||||
builder: (context) => DetailsPage(
|
||||
//recipe: Data.recipes[index],
|
||||
)));
|
||||
},
|
||||
child: Card(
|
||||
color: Color.fromARGB(255, 249, 171, 21),
|
||||
//color: Color.fromARGB(255, 253, 73, 73), //FD4949 //Nachtleben
|
||||
//color: Color.fromARGB(255, 80, 168, 250), //50A8FA//Kunst
|
||||
//color: Color.fromARGB(255, 80, 240, 250), //50F0FA //Sport
|
||||
//color: Color.fromARGB(255, 130, 73, 253), //8249FD //Gesundheit
|
||||
//color: Color.fromARGB(255, 253, 73, 73), //FD4949//Essen
|
||||
//color: Color.fromARGB(255, 255, 0, 199), //FF00C7//Soziales
|
||||
//color: Color.fromARGB(255, 66, 255, 0), //42FF00//Familie
|
||||
shape: RoundedRectangleBorder(
|
||||
borderRadius: BorderRadius.circular(6.0),
|
||||
),
|
||||
child: Container(
|
||||
width: MediaQuery.of(context).size.width / 2,
|
||||
height: 50,
|
||||
child: Column(
|
||||
children: <Widget>[
|
||||
Expanded(
|
||||
child: ClipRRect(
|
||||
borderRadius: BorderRadius.only(
|
||||
topLeft: Radius.circular(6.0),
|
||||
topRight: Radius.circular(6.0),
|
||||
),
|
||||
child: Hero(
|
||||
tag: Data.recipes[index].id,
|
||||
child: FadeInImage(
|
||||
image: AssetImage(
|
||||
Data.recipes[index].imageUrl),
|
||||
fit: BoxFit.cover,
|
||||
placeholder: AssetImage(
|
||||
'assets/images/loading.gif'),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
Text(
|
||||
Data.recipes[index].title,
|
||||
style: TextStyle(
|
||||
color: Colors.white,
|
||||
fontSize: 20,
|
||||
fontWeight: FontWeight.bold),
|
||||
),
|
||||
Padding(
|
||||
padding: const EdgeInsets.all(2.0),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
}),
|
||||
),Image.asset(
|
||||
'assets/images/FooterFooter.png', // Pfad zum Bild
|
||||
height: 127, // Höhe des Bildes
|
||||
width: 390, // Breite des Bildes
|
||||
),],
|
||||
|
||||
),
|
||||
|
||||
), */
|
||||
|
||||
//Footer Container
|
||||
//Here you will get unexpected behaviour when keyboard pops-up.
|
||||
//So its better to use `bottomNavigationBar` to avoid this.
|
||||
/* Container(
|
||||
padding: const EdgeInsets.all(8.0),
|
||||
color: Colors.white,
|
||||
alignment: Alignment.center,
|
||||
child:
|
||||
Image.asset(
|
||||
'assets/images/FooterFooter.png', // Pfad zum Bild
|
||||
height: 127, // Höhe des Bildes
|
||||
width: 390, // Breite des Bildes
|
||||
),
|
||||
), */
|
||||
],
|
||||
),
|
||||
);
|
||||
|
||||
return Scaffold(
|
||||
/* appBar: AppBar(
|
||||
centerTitle: true,
|
||||
title: Text('Recipes'),
|
||||
titleTextStyle: TextStyle(
|
||||
color: Colors.white, fontWeight: FontWeight.bold, fontSize: 20),
|
||||
backgroundColor: Color(0xff263341),
|
||||
actions: <Widget>[
|
||||
IconButton(
|
||||
icon: Icon(Icons.search),
|
||||
onPressed: () {},
|
||||
)
|
||||
],
|
||||
), */
|
||||
backgroundColor: Colors.white,
|
||||
body: body,
|
||||
);
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue