Detailpage updated aber noch nicht automatisch.
This commit is contained in:
parent
993c8fe488
commit
1b44798ef0
Binary file not shown.
|
After Width: | Height: | Size: 21 KiB |
|
|
@ -39,10 +39,10 @@ SPEC CHECKSUMS:
|
|||
app_links: e70ca16b4b0f88253b3b3660200d4a10b4ea9795
|
||||
Flutter: e0871f40cf51350855a761d2e70bf5af5b9b5de7
|
||||
image_picker_ios: c560581cceedb403a6ff17f2f816d7fea1421fc1
|
||||
path_provider_foundation: 3784922295ac71e43754bd15e0653ccfd36a147c
|
||||
shared_preferences_foundation: b4c3b4cddf1c21f02770737f147a3f5da9d39695
|
||||
url_launcher_ios: 6116280ddcfe98ab8820085d8d76ae7449447586
|
||||
path_provider_foundation: 2b6b4c569c0fb62ec74538f866245ac84301af46
|
||||
shared_preferences_foundation: fcdcbc04712aee1108ac7fda236f363274528f78
|
||||
url_launcher_ios: 5334b05cef931de560670eeae103fd3e431ac3fe
|
||||
|
||||
PODFILE CHECKSUM: 819463e6a0290f5a72f145ba7cde16e8b6ef0796
|
||||
|
||||
COCOAPODS: 1.14.3
|
||||
COCOAPODS: 1.15.2
|
||||
|
|
|
|||
|
|
@ -0,0 +1,597 @@
|
|||
import 'package:flutter/material.dart';
|
||||
import 'package:learn_project/screens/subheader_Datepicker.dart';
|
||||
|
||||
|
||||
class Frame28 extends StatelessWidget {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
var body = SafeArea(
|
||||
child: Column(
|
||||
children: <Widget>[
|
||||
//Header Container
|
||||
HeaderSection(),
|
||||
Container(
|
||||
height: 35,
|
||||
padding: const EdgeInsets.all(0),
|
||||
child: ButtonSection(), // Dein Button-Bereich
|
||||
),
|
||||
Container(height: 10,),
|
||||
Column(
|
||||
children: [
|
||||
Container(
|
||||
width: 380,
|
||||
//height: 259,
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Container(
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
// TODO: muss noch angepasst werden jedes mal wenn ein neuer Tag ist wieder diesen Text anzeigen
|
||||
Text(
|
||||
'Heute',
|
||||
style: TextStyle(
|
||||
color: Color(0xFF171717),
|
||||
fontSize: 12,
|
||||
fontFamily: 'Inter',
|
||||
fontWeight: FontWeight.w600,
|
||||
height: 0,
|
||||
),
|
||||
),
|
||||
//Kurze Zwischenbereich zum trennen
|
||||
const SizedBox(height: 4),
|
||||
|
||||
Container(
|
||||
width: 379,
|
||||
height: 120,
|
||||
child: Stack(
|
||||
children: [
|
||||
Positioned(
|
||||
left: 0,
|
||||
top: 0,
|
||||
child: Container(
|
||||
width: 360,
|
||||
height: 110,
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.white,
|
||||
borderRadius: BorderRadius.circular(10),
|
||||
border: Border(
|
||||
left: BorderSide(width: 1, color: Color(0xFFBFBCBC)),
|
||||
top: BorderSide(width: 1, color: Color(0xFFBFBCBC)),
|
||||
right: BorderSide(color: Color(0xFFBFBCBC)),
|
||||
bottom: BorderSide(color: Color(0xFFBFBCBC)),
|
||||
),
|
||||
boxShadow: [
|
||||
BoxShadow(
|
||||
color: Color(0xFFF8AB14),
|
||||
blurRadius: 0,
|
||||
offset: Offset(0, 10),
|
||||
spreadRadius: 0,
|
||||
)
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
Positioned(
|
||||
left: 230,
|
||||
top: 1,
|
||||
child: Image.asset(
|
||||
'assets/images/Vector01.png', // Pfad zum Bild
|
||||
height: 110, // Höhe des Bildes
|
||||
width: 130, // Breite des Bildes
|
||||
),
|
||||
),
|
||||
Positioned(
|
||||
right: 30,
|
||||
top: 12,
|
||||
child: Container(
|
||||
width: 32,
|
||||
height: 32,
|
||||
child: Row(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Container(
|
||||
width: 32,
|
||||
height: 32,
|
||||
decoration: BoxDecoration(
|
||||
color: Color.fromARGB(196, 171, 170, 170), // Hintergrundfarbe des Buttons
|
||||
shape: BoxShape.circle, // Runde Form
|
||||
),
|
||||
child: IconButton(
|
||||
padding: EdgeInsets.zero, // Entfernt zusätzlichen Abstand
|
||||
icon: Icon(Icons.bookmark_border_outlined),
|
||||
color: Colors.white, // Icon-Farbe
|
||||
iconSize: 16, // Größe des Icons
|
||||
onPressed: () {
|
||||
// Aktion beim Drücken des Buttons
|
||||
},
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
|
||||
Positioned(
|
||||
left: 15,
|
||||
top: 14,
|
||||
child: SizedBox(
|
||||
//width: 55,
|
||||
//height: 24,
|
||||
child: Text(
|
||||
'Suxul',
|
||||
style: TextStyle(
|
||||
color: Color(0xFF0A0A0A),
|
||||
fontSize: 18,
|
||||
fontFamily: 'Inter',
|
||||
fontWeight: FontWeight.w800,
|
||||
height: 0,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
Positioned(
|
||||
left: 92,
|
||||
top: 14,
|
||||
child: Text(
|
||||
'Weiberfasching',
|
||||
style: TextStyle(
|
||||
color: Color(0xFF0A0A0A),
|
||||
fontSize: 18,
|
||||
fontFamily: 'Inter',
|
||||
fontWeight: FontWeight.w400,
|
||||
height: 0,
|
||||
),
|
||||
),
|
||||
),
|
||||
Positioned(
|
||||
left: 15,
|
||||
top: 90,
|
||||
child: SizedBox(
|
||||
//width: 196,
|
||||
//height: 15,
|
||||
child: Text(
|
||||
'Eintritt: Bis 21 Uhr frei',
|
||||
style: TextStyle(
|
||||
color: Color(0xFF0A0A0A),
|
||||
fontSize: 12,
|
||||
fontFamily: 'Inter',
|
||||
fontWeight: FontWeight.w400,
|
||||
height: 0,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
Positioned(
|
||||
left: 15,
|
||||
top: 70,
|
||||
child: SizedBox(
|
||||
width: 72.79,
|
||||
height: 44.40,
|
||||
child: Text.rich(
|
||||
TextSpan(
|
||||
children: [
|
||||
TextSpan(
|
||||
text: '20:30',
|
||||
style: TextStyle(
|
||||
color: Color(0xFF0A0A0A),
|
||||
fontSize: 18,
|
||||
fontFamily: 'Inter',
|
||||
fontWeight: FontWeight.w800,
|
||||
height: 0.06,
|
||||
),
|
||||
),
|
||||
])))),
|
||||
Positioned(
|
||||
left: 15,
|
||||
top: 45,
|
||||
child: SizedBox(
|
||||
width: 72.79,
|
||||
height: 44.40,
|
||||
child: Text.rich(
|
||||
TextSpan(
|
||||
children: [
|
||||
TextSpan(
|
||||
text: 'Beginn\n',
|
||||
style: TextStyle(
|
||||
color: Color(0xFF0A0A0A),
|
||||
fontSize: 12,
|
||||
fontFamily: 'Inter',
|
||||
fontWeight: FontWeight.w200,
|
||||
height: 0.14,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
const SizedBox(height: 20),
|
||||
Container(
|
||||
width: 379,
|
||||
height: 120,
|
||||
child: Stack(
|
||||
children: [
|
||||
Positioned(
|
||||
left: 0,
|
||||
top: 0,
|
||||
child: Container(
|
||||
width: 360,
|
||||
height: 110,
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.white,
|
||||
borderRadius: BorderRadius.circular(10),
|
||||
border: Border(
|
||||
left: BorderSide(width: 1, color: Color(0xFFBFBCBC)),
|
||||
top: BorderSide(width: 1, color: Color(0xFFBFBCBC)),
|
||||
right: BorderSide(color: Color(0xFFBFBCBC)),
|
||||
bottom: BorderSide(color: Color(0xFFBFBCBC)),
|
||||
),
|
||||
boxShadow: [
|
||||
BoxShadow(
|
||||
color: Color(0xFFF8AB14),
|
||||
blurRadius: 0,
|
||||
offset: Offset(0, 10),
|
||||
spreadRadius: 0,
|
||||
)
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
Positioned(
|
||||
left: 230,
|
||||
top: 1,
|
||||
child: Image.asset(
|
||||
'assets/images/Vector01.png', // Pfad zum Bild
|
||||
height: 110, // Höhe des Bildes
|
||||
width: 130, // Breite des Bildes
|
||||
),
|
||||
),
|
||||
Positioned(
|
||||
right: 30,
|
||||
top: 12,
|
||||
child: Container(
|
||||
width: 32,
|
||||
height: 32,
|
||||
child: Row(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Container(
|
||||
width: 32,
|
||||
height: 32,
|
||||
decoration: BoxDecoration(
|
||||
color: Color.fromARGB(196, 171, 170, 170), // Hintergrundfarbe des Buttons
|
||||
shape: BoxShape.circle, // Runde Form
|
||||
),
|
||||
child: IconButton(
|
||||
padding: EdgeInsets.zero, // Entfernt zusätzlichen Abstand
|
||||
icon: Icon(Icons.bookmark_border_outlined),
|
||||
color: Colors.white, // Icon-Farbe
|
||||
iconSize: 16, // Größe des Icons
|
||||
onPressed: () {
|
||||
// Aktion beim Drücken des Buttons
|
||||
},
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
|
||||
Positioned(
|
||||
left: 15,
|
||||
top: 14,
|
||||
child: SizedBox(
|
||||
//width: 55,
|
||||
//height: 24,
|
||||
child: Text(
|
||||
'Suxul',
|
||||
style: TextStyle(
|
||||
color: Color(0xFF0A0A0A),
|
||||
fontSize: 18,
|
||||
fontFamily: 'Inter',
|
||||
fontWeight: FontWeight.w800,
|
||||
height: 0,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
Positioned(
|
||||
left: 92,
|
||||
top: 14,
|
||||
child: Text(
|
||||
'Weiberfasching',
|
||||
style: TextStyle(
|
||||
color: Color(0xFF0A0A0A),
|
||||
fontSize: 18,
|
||||
fontFamily: 'Inter',
|
||||
fontWeight: FontWeight.w400,
|
||||
height: 0,
|
||||
),
|
||||
),
|
||||
),
|
||||
Positioned(
|
||||
left: 15,
|
||||
top: 90,
|
||||
child: SizedBox(
|
||||
//width: 196,
|
||||
//height: 15,
|
||||
child: Text(
|
||||
'Eintritt: Bis 21 Uhr frei',
|
||||
style: TextStyle(
|
||||
color: Color(0xFF0A0A0A),
|
||||
fontSize: 12,
|
||||
fontFamily: 'Inter',
|
||||
fontWeight: FontWeight.w400,
|
||||
height: 0,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
Positioned(
|
||||
left: 15,
|
||||
top: 70,
|
||||
child: SizedBox(
|
||||
width: 72.79,
|
||||
height: 44.40,
|
||||
child: Text.rich(
|
||||
TextSpan(
|
||||
children: [
|
||||
TextSpan(
|
||||
text: '20:30',
|
||||
style: TextStyle(
|
||||
color: Color(0xFF0A0A0A),
|
||||
fontSize: 18,
|
||||
fontFamily: 'Inter',
|
||||
fontWeight: FontWeight.w800,
|
||||
height: 0.06,
|
||||
),
|
||||
),
|
||||
])))),
|
||||
Positioned(
|
||||
left: 15,
|
||||
top: 45,
|
||||
child: SizedBox(
|
||||
width: 72.79,
|
||||
height: 44.40,
|
||||
child: Text.rich(
|
||||
TextSpan(
|
||||
children: [
|
||||
TextSpan(
|
||||
text: 'Beginn\n',
|
||||
style: TextStyle(
|
||||
color: Color(0xFF0A0A0A),
|
||||
fontSize: 12,
|
||||
fontFamily: 'Inter',
|
||||
fontWeight: FontWeight.w200,
|
||||
height: 0.14,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
|
||||
],
|
||||
),
|
||||
),
|
||||
const SizedBox(height: 20),
|
||||
Container(
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
// TODO: muss noch angepasst werden jedes mal wenn ein neuer Tag ist wieder diesen Text anzeigen
|
||||
Text(
|
||||
'Morgen',
|
||||
style: TextStyle(
|
||||
color: Color(0xFF171717),
|
||||
fontSize: 12,
|
||||
fontFamily: 'Inter',
|
||||
fontWeight: FontWeight.w600,
|
||||
height: 0,
|
||||
),
|
||||
),
|
||||
//Kurze Zwischenbereich zum trennen
|
||||
const SizedBox(height: 4),
|
||||
|
||||
Container(
|
||||
width: 379,
|
||||
height: 120,
|
||||
child: Stack(
|
||||
children: [
|
||||
Positioned(
|
||||
left: 0,
|
||||
top: 0,
|
||||
child: Container(
|
||||
width: 360,
|
||||
height: 110,
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.white,
|
||||
borderRadius: BorderRadius.circular(10),
|
||||
border: Border(
|
||||
left: BorderSide(width: 1, color: Color(0xFFBFBCBC)),
|
||||
top: BorderSide(width: 1, color: Color(0xFFBFBCBC)),
|
||||
right: BorderSide(color: Color(0xFFBFBCBC)),
|
||||
bottom: BorderSide(color: Color(0xFFBFBCBC)),
|
||||
),
|
||||
boxShadow: [
|
||||
BoxShadow(
|
||||
color: Color(0xFFF8AB14),
|
||||
blurRadius: 0,
|
||||
offset: Offset(0, 10),
|
||||
spreadRadius: 0,
|
||||
)
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
Positioned(
|
||||
left: 230,
|
||||
top: 1,
|
||||
child: Image.asset(
|
||||
'assets/images/Vector01.png', // Pfad zum Bild
|
||||
height: 110, // Höhe des Bildes
|
||||
width: 130, // Breite des Bildes
|
||||
),
|
||||
),
|
||||
Positioned(
|
||||
right: 30,
|
||||
top: 12,
|
||||
child: Container(
|
||||
width: 32,
|
||||
height: 32,
|
||||
child: Row(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Container(
|
||||
width: 32,
|
||||
height: 32,
|
||||
decoration: BoxDecoration(
|
||||
color: Color.fromARGB(196, 171, 170, 170), // Hintergrundfarbe des Buttons
|
||||
shape: BoxShape.circle, // Runde Form
|
||||
),
|
||||
child: IconButton(
|
||||
padding: EdgeInsets.zero, // Entfernt zusätzlichen Abstand
|
||||
icon: Icon(Icons.bookmark_border_outlined),
|
||||
color: Colors.white, // Icon-Farbe
|
||||
iconSize: 16, // Größe des Icons
|
||||
onPressed: () {
|
||||
// Aktion beim Drücken des Buttons
|
||||
},
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
|
||||
Positioned(
|
||||
left: 15,
|
||||
top: 14,
|
||||
child: SizedBox(
|
||||
//width: 55,
|
||||
//height: 24,
|
||||
child: Text(
|
||||
'Suxul',
|
||||
style: TextStyle(
|
||||
color: Color(0xFF0A0A0A),
|
||||
fontSize: 18,
|
||||
fontFamily: 'Inter',
|
||||
fontWeight: FontWeight.w800,
|
||||
height: 0,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
Positioned(
|
||||
left: 92,
|
||||
top: 14,
|
||||
child: Text(
|
||||
'Weiberfasching',
|
||||
style: TextStyle(
|
||||
color: Color(0xFF0A0A0A),
|
||||
fontSize: 18,
|
||||
fontFamily: 'Inter',
|
||||
fontWeight: FontWeight.w400,
|
||||
height: 0,
|
||||
),
|
||||
),
|
||||
),
|
||||
Positioned(
|
||||
left: 15,
|
||||
top: 90,
|
||||
child: SizedBox(
|
||||
//width: 196,
|
||||
//height: 15,
|
||||
child: Text(
|
||||
'Eintritt: Bis 21 Uhr frei',
|
||||
style: TextStyle(
|
||||
color: Color(0xFF0A0A0A),
|
||||
fontSize: 12,
|
||||
fontFamily: 'Inter',
|
||||
fontWeight: FontWeight.w400,
|
||||
height: 0,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
Positioned(
|
||||
left: 15,
|
||||
top: 70,
|
||||
child: SizedBox(
|
||||
width: 72.79,
|
||||
height: 44.40,
|
||||
child: Text.rich(
|
||||
TextSpan(
|
||||
children: [
|
||||
TextSpan(
|
||||
text: '20:30',
|
||||
style: TextStyle(
|
||||
color: Color(0xFF0A0A0A),
|
||||
fontSize: 18,
|
||||
fontFamily: 'Inter',
|
||||
fontWeight: FontWeight.w800,
|
||||
height: 0.06,
|
||||
),
|
||||
),
|
||||
])))),
|
||||
Positioned(
|
||||
left: 15,
|
||||
top: 45,
|
||||
child: SizedBox(
|
||||
width: 72.79,
|
||||
height: 44.40,
|
||||
child: Text.rich(
|
||||
TextSpan(
|
||||
children: [
|
||||
TextSpan(
|
||||
text: 'Beginn\n',
|
||||
style: TextStyle(
|
||||
color: Color(0xFF0A0A0A),
|
||||
fontSize: 12,
|
||||
fontFamily: 'Inter',
|
||||
fontWeight: FontWeight.w200,
|
||||
height: 0.14,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
)],),);
|
||||
return Scaffold(backgroundColor: Colors.white,
|
||||
body: body,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
@ -12,6 +12,9 @@ class DetailsPage extends StatelessWidget {
|
|||
final _future2 = Supabase.instance.client
|
||||
.from('events')
|
||||
.select();
|
||||
// 1. Daten anahdn von Filter einstellungen abrufen
|
||||
// 2. Frontend asynchron diesbezüglich aufbauen
|
||||
// 3. testen ob durchs scrollen daten nachgeladen werden können?
|
||||
|
||||
return Scaffold(
|
||||
body: FutureBuilder(
|
||||
|
|
|
|||
|
|
@ -0,0 +1,244 @@
|
|||
import 'package:flutter/material.dart';
|
||||
import 'package:learn_project/screens/details_db.dart';
|
||||
import 'package:learn_project/utils/data.dart';
|
||||
import 'package:learn_project/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: ButtonSection(), // 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,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
@ -2,7 +2,7 @@ import 'package:flutter/material.dart';
|
|||
import 'package:learn_project/screens/details_db.dart';
|
||||
import 'package:learn_project/utils/data.dart';
|
||||
import 'package:learn_project/screens/subheader_Datepicker.dart';
|
||||
|
||||
import 'package:learn_project/screens/detail_widget.dart';
|
||||
class HomePage extends StatelessWidget {
|
||||
const HomePage({super.key});
|
||||
|
||||
|
|
@ -12,101 +12,25 @@ class HomePage extends StatelessWidget {
|
|||
child: Column(
|
||||
children: <Widget>[
|
||||
//Header Container
|
||||
Container(
|
||||
padding: const EdgeInsets.fromLTRB(5, 10, 5, 5),
|
||||
height: 80,
|
||||
color: Colors.white,
|
||||
alignment: Alignment.bottomLeft,
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
const SizedBox(height: 10),
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: <Widget>[
|
||||
SizedBox(
|
||||
height: 50, //height of button
|
||||
//width of button
|
||||
child: IconButton(
|
||||
icon: Image.asset('assets/images/logo.png'),
|
||||
onPressed: () {},
|
||||
),
|
||||
),
|
||||
const SizedBox(
|
||||
//width of button
|
||||
width: 10,
|
||||
),
|
||||
SizedBox(
|
||||
height: 10, //height of button
|
||||
width: 20, //width of button
|
||||
child: Icon(Icons.keyboard_arrow_down),
|
||||
),
|
||||
const SizedBox(
|
||||
//width of button
|
||||
width: 10,
|
||||
),
|
||||
SizedBox(
|
||||
width: 100.0,
|
||||
child: TextField(
|
||||
controller: TextEditingController(text: "Ingolstadt"),
|
||||
decoration: InputDecoration(
|
||||
border: UnderlineInputBorder(),
|
||||
),
|
||||
),
|
||||
),
|
||||
// const SizedBox(
|
||||
// //width of button
|
||||
// width: 40,
|
||||
// ),
|
||||
Spacer(),
|
||||
SizedBox(
|
||||
height: 41, //height of button
|
||||
//width of button
|
||||
child: IconButton(
|
||||
icon: const Icon(Icons.search),
|
||||
onPressed: () {},
|
||||
),
|
||||
),
|
||||
const SizedBox(
|
||||
height: 40,
|
||||
child: VerticalDivider(
|
||||
thickness: 1,
|
||||
width: 20,
|
||||
color: Colors.black,
|
||||
),
|
||||
),
|
||||
SizedBox(
|
||||
height: 50, //height of button
|
||||
//width of button
|
||||
child: IconButton(
|
||||
icon: Image.asset('assets/images/Login.png'),
|
||||
onPressed: () {},
|
||||
),
|
||||
),
|
||||
]),
|
||||
const Divider(
|
||||
height: 1,
|
||||
thickness: 1,
|
||||
indent: 0,
|
||||
endIndent: 0,
|
||||
color: Colors.black,
|
||||
),
|
||||
|
||||
],
|
||||
),
|
||||
),
|
||||
HeaderSection(),
|
||||
|
||||
//Body Container
|
||||
Expanded(
|
||||
child: SingleChildScrollView(
|
||||
child: Column(
|
||||
children: [
|
||||
Container(
|
||||
padding: const EdgeInsets.all(0),
|
||||
height: 35,
|
||||
child: ButtonSection(),
|
||||
),
|
||||
GridView.builder(
|
||||
child: NestedScrollView(
|
||||
headerSliverBuilder: (BuildContext context, bool innerBoxIsScrolled) {
|
||||
return [
|
||||
SliverToBoxAdapter(
|
||||
child: Container(
|
||||
height: 35,
|
||||
padding: const EdgeInsets.all(0),
|
||||
child: ButtonSection(), // 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(
|
||||
|
|
@ -121,7 +45,7 @@ class HomePage extends StatelessWidget {
|
|||
Navigator.push(
|
||||
context,
|
||||
MaterialPageRoute(
|
||||
builder: (context) => DetailsPage(
|
||||
builder: (context) => Frame28(
|
||||
//recipe: Data.recipes[index],
|
||||
)));
|
||||
},
|
||||
|
|
@ -138,8 +62,8 @@ class HomePage extends StatelessWidget {
|
|||
borderRadius: BorderRadius.circular(6.0),
|
||||
),
|
||||
child: Container(
|
||||
width: MediaQuery.of(context).size.width / 2,
|
||||
height: 50,
|
||||
width: MediaQuery.of(context).size.width / 2.5,
|
||||
height: 20,
|
||||
child: Column(
|
||||
children: <Widget>[
|
||||
Expanded(
|
||||
|
|
@ -152,10 +76,11 @@ class HomePage extends StatelessWidget {
|
|||
tag: Data.recipes[index].id,
|
||||
child: FadeInImage(
|
||||
image: AssetImage(
|
||||
Data.recipes[index].imageUrl),
|
||||
Data.recipes[index].imageUrl,
|
||||
),
|
||||
fit: BoxFit.cover,
|
||||
placeholder: AssetImage(
|
||||
'assets/images/loading.gif'),
|
||||
'assets/images/loading.gif', ),
|
||||
),
|
||||
),
|
||||
),
|
||||
|
|
@ -168,7 +93,7 @@ class HomePage extends StatelessWidget {
|
|||
fontWeight: FontWeight.bold),
|
||||
),
|
||||
Padding(
|
||||
padding: const EdgeInsets.all(2.0),
|
||||
padding: const EdgeInsets.all(1.0),
|
||||
),
|
||||
],
|
||||
),
|
||||
|
|
@ -178,10 +103,16 @@ class HomePage extends StatelessWidget {
|
|||
);
|
||||
},
|
||||
),
|
||||
Image.asset(
|
||||
'assets/images/FooterFooter.png', // Pfad zum Bild
|
||||
height: 127, // Höhe des Bildes
|
||||
width: 390, // Breite des Bildes
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
|
||||
|
||||
/* Expanded(
|
||||
child: Column(
|
||||
|
|
|
|||
|
|
@ -55,6 +55,93 @@ class ButtonSection extends StatelessWidget {
|
|||
}
|
||||
}
|
||||
|
||||
class HeaderSection extends StatelessWidget {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Container(
|
||||
padding: const EdgeInsets.fromLTRB(5, 2, 5, 5),
|
||||
height: 76,
|
||||
color: Colors.white,
|
||||
alignment: Alignment.bottomLeft,
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
const SizedBox(height: 10),
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: <Widget>[
|
||||
SizedBox(
|
||||
height: 50, //height of button
|
||||
//width of button
|
||||
child: IconButton(
|
||||
icon: Image.asset('assets/images/logo.png'),
|
||||
onPressed: () {},
|
||||
),
|
||||
),
|
||||
const SizedBox(
|
||||
//width of button
|
||||
width: 10,
|
||||
),
|
||||
SizedBox(
|
||||
height: 10, //height of button
|
||||
width: 20, //width of button
|
||||
child: Icon(Icons.keyboard_arrow_down),
|
||||
),
|
||||
const SizedBox(
|
||||
//width of button
|
||||
width: 10,
|
||||
),
|
||||
SizedBox(
|
||||
width: 100.0,
|
||||
child: TextField(
|
||||
controller: TextEditingController(text: "Ingolstadt"),
|
||||
decoration: InputDecoration(
|
||||
border: UnderlineInputBorder(),
|
||||
),
|
||||
),
|
||||
),
|
||||
// const SizedBox(
|
||||
// //width of button
|
||||
// width: 40,
|
||||
// ),
|
||||
SizedBox(width:3),
|
||||
Spacer(),
|
||||
SizedBox(
|
||||
height: 41, //height of button
|
||||
//width of button
|
||||
child: IconButton(
|
||||
icon: const Icon(Icons.search),
|
||||
onPressed: () {},
|
||||
),
|
||||
),
|
||||
const SizedBox(
|
||||
height: 40,
|
||||
child: VerticalDivider(
|
||||
thickness: 1,
|
||||
width: 20,
|
||||
color: Colors.black,
|
||||
),
|
||||
),
|
||||
SizedBox(
|
||||
height: 50, //height of button
|
||||
//width of button
|
||||
child: IconButton(
|
||||
icon: Image.asset('assets/images/Login.png'),
|
||||
onPressed: () {},
|
||||
),
|
||||
),
|
||||
]),
|
||||
const Divider(
|
||||
height: 1,
|
||||
thickness: 1,
|
||||
indent: 0,
|
||||
endIndent: 0,
|
||||
color: Colors.black,
|
||||
),
|
||||
|
||||
],
|
||||
),
|
||||
);}}
|
||||
/* child: SingleChildScrollView(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 30.0),
|
||||
child: Column(
|
||||
|
|
|
|||
Loading…
Reference in New Issue