Missing Event Seite mal initial gestartet

This commit is contained in:
Niklas 2024-11-02 02:29:02 +01:00
parent 4de7af80ad
commit 593f1d9bbd
3 changed files with 380 additions and 5 deletions

View File

@ -225,10 +225,10 @@ class _HomePage extends State<HomePage> {
onToggle: toggleExpanded), // Dein Button-Bereich
),
GridView.builder(
controller: _scrollController,
/* controller: _scrollController,
physics: isScrollable
? AlwaysScrollableScrollPhysics()
: NeverScrollableScrollPhysics(),
: NeverScrollableScrollPhysics(), */
shrinkWrap:
true, // Damit der GridView korrekt in die Column passt
//physics: NeverScrollableScrollPhysics(), // Deaktiviert das Scrolling des GridView

View File

@ -0,0 +1,374 @@
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';
import 'package:Emma_home/screens/detail_widget.dart';
import 'package:provider/provider.dart';
import 'package:supabase_flutter/supabase_flutter.dart';
import 'package:Emma_home/main.dart';
import 'package:Emma_home/utils/data.dart';
import 'dart:math';
class MissingEvent extends StatelessWidget {
@override
Widget build(BuildContext context) {
var size = MediaQuery.of(context).size;
/*24 is for notification bar on Android*/
// ScrollController und Status-Variable
ScrollController _scrollController = ScrollController();
// Verfügbarer Bereich auf dem Bildschirm
final screenWidth = MediaQuery.of(context).size.width;
final screenHeight = MediaQuery.of(context).size.height;
double statusBarHeight = MediaQuery.of(context).padding.top;
double HeaderHeight = 60;
double TimeButtonHeight = 35;
double TimeButtonpadding = 20;
double FooterHeight = 91;
double bottomPadding = MediaQuery.of(context).padding.bottom;
final staticContentheight = statusBarHeight +
HeaderHeight +
TimeButtonHeight +
TimeButtonpadding +
FooterHeight +
bottomPadding;
double amaountOfCategoryLines = 4; //singleCategories.categories.length/2;
double paddingHeight = 10;
double shaddowHeight = 10;
final dynamicContentHeight =
((amaountOfCategoryLines + 1) * paddingHeight) +
(amaountOfCategoryLines * shaddowHeight);
final resultHeightRemove = staticContentheight + dynamicContentHeight;
final int itemHeight =
((screenHeight - resultHeightRemove) / 4).toInt(); //240-90) / 4;
final double itemWidth = (size.width - 40) / 2;
MediaQueryData queryData;
queryData = MediaQuery.of(context);
var appBar = AppBar(
leading: SizedBox(
height: 60,
width: 63,
child: IconButton(
icon: Image.asset('assets/images/logo.png'),
onPressed: () {
// Open drawer or perform action
},
),
),
title: Row(
children: [
const 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: const InputDecoration(
border: UnderlineInputBorder(),
),
),
),
],
),
actions: [
IconButton(
icon: const Icon(Icons.search),
onPressed: () {
// Perform search action
},
),
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: () {},
),
),
],
bottom: PreferredSize(
preferredSize: const Size.fromHeight(1.0),
child: Container(
color: Colors.black,
height: 1.0,
),
),
flexibleSpace: Container(),
);
var body = Container(
padding: EdgeInsets.all(22.0),
width: double.infinity,
//height: 952,
//clipBehavior: Clip.antiAlias,
child: Column(
children: [
const SizedBox(height: 10),
Align(
alignment: Alignment.centerLeft,
child: Text(
'Fehlendes Event bei uns?',
style: TextStyle(
color: Colors.black,
fontSize: 24,
fontFamily: 'Inter',
fontWeight: FontWeight.w800,
height: 0,
),
),
),
const SizedBox(height: 10),
Align(
alignment: Alignment.centerLeft,
child: SizedBox(
width: 329,
height: 144,
child: RichText(
text: TextSpan(
text:
'Du hast unterwegs ein Event gesehen, \nwelches noch nicht bei uns in der Liste \nsteht? Schicke uns das Foto von dem Event\nzu. Wir werden diese, wenn nicht schon \ngeschehen den Events hinzufügen. \nDanke für deine Unterstützung!',
style: TextStyle(
color: Colors.black,
fontSize: 16,
fontFamily: 'Inter',
fontWeight: FontWeight.w400,
height: 1.5, // Ein vernünftigerer Zeilenabstand
),
),
),
),
),
const SizedBox(height: 10),
Container(
width: 329,
height: 155,
padding: const EdgeInsets.symmetric(horizontal: 95, vertical: 35),
decoration: ShapeDecoration(
color: Color(0xFFEDEDED),
shape: RoundedRectangleBorder(
side: BorderSide(
width: 1,
strokeAlign: BorderSide.strokeAlignOutside,
),
borderRadius: BorderRadius.circular(10),
),
),
child: Row(
mainAxisSize: MainAxisSize.min,
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Container(
child: Column(
mainAxisSize: MainAxisSize.min,
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
/* Container(
width: 36,
height: 36,
clipBehavior: Clip.antiAlias,
decoration: BoxDecoration(),
child: FlutterLogo(),
), */
const SizedBox(height: 10),
Text(
'Bild hochladen',
style: TextStyle(
color: Colors.black,
fontSize: 18,
fontFamily: 'Inter',
fontWeight: FontWeight.w500,
height: 0,
),
),
],
),
),
],
),
),
const SizedBox(height: 10),
Row(
mainAxisSize: MainAxisSize.min,
mainAxisAlignment: MainAxisAlignment.end,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Container(
child: Text(
'Bild aufnehmen',
style: TextStyle(
color: Colors.black,
fontSize: 18,
fontFamily: 'Inter',
fontWeight: FontWeight.w500,
height: 0,
),
),
),
SizedBox(
width: 10,
),
Container(
width: 85,
height: 37,
padding:
const EdgeInsets.symmetric(horizontal: 15, vertical: 5),
clipBehavior: Clip.antiAlias,
decoration: ShapeDecoration(
shape: RoundedRectangleBorder(
side: BorderSide(width: 2),
borderRadius: BorderRadius.circular(10),
),
),
child: Column(
mainAxisSize: MainAxisSize.min,
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Container(
width: 23,
height: 20.70,
child: Stack(),
),
],
),
),
],
),
const SizedBox(height: 10),
Row(
children: [
Container(
width: 160,
height: 44,
padding: const EdgeInsets.all(10),
decoration: ShapeDecoration(
shape: RoundedRectangleBorder(
side: BorderSide(width: 2),
borderRadius: BorderRadius.circular(10),
),
),
child: Row(
mainAxisSize: MainAxisSize.min,
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Text(
'Abrechen',
style: TextStyle(
color: Colors.black,
fontSize: 18,
fontFamily: 'Inter',
fontWeight: FontWeight.w500,
height: 0.07,
),
),
],
),
),
SizedBox(
width: 10,
),
Container(
width: 160,
height: 44,
padding: const EdgeInsets.all(10),
decoration: ShapeDecoration(
color: Colors.black,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(10),
),
),
child: Row(
mainAxisSize: MainAxisSize.min,
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Text(
'Senden',
style: TextStyle(
color: Colors.white,
fontSize: 18,
fontFamily: 'Inter',
fontWeight: FontWeight.w500,
height: 0.07,
),
),
],
),
),
],
),
const SizedBox(height: 10),
Text(
'Bock dein Event bei uns zu \npräsentieren? ',
style: TextStyle(
color: Colors.black,
fontSize: 24,
fontFamily: 'Inter',
fontWeight: FontWeight.w800,
height: 0,
),
),
const SizedBox(height: 10),
SizedBox(
width: 328,
height: 48,
child: Text.rich(
TextSpan(
children: [
TextSpan(
text:
'Melde dich hier bei uns als Host an.\nWir freuen uns auf dich! ',
style: TextStyle(
color: Colors.black,
fontSize: 18,
fontFamily: 'Inter',
fontWeight: FontWeight.w500,
height: 0.09,
),
),
TextSpan(
text: '>>Link hier',
style: TextStyle(
color: Color(0xFF3985CC),
fontSize: 18,
fontFamily: 'Inter',
fontWeight: FontWeight.w500,
height: 0.07,
),
),
],
),
),
),
],
),
);
return Scaffold(
backgroundColor: Colors.white,
appBar: appBar,
body: body,
);
}
}

View File

@ -1,6 +1,7 @@
import 'package:flutter/material.dart';
import 'package:Emma_home/utils/helper_functions.dart';
import 'package:font_awesome_flutter/font_awesome_flutter.dart';
import 'package:Emma_home/screens/missing_event.dart';
class TimeButtonSection extends StatefulWidget {
const TimeButtonSection({required this.onToggle, Key? key}) : super(key: key);
@ -1561,12 +1562,12 @@ class LostEvents extends StatelessWidget {
Widget build(BuildContext context) {
return InkWell(
onTap: () {
/* Navigator.push(
Navigator.push(
context,
MaterialPageRoute(
builder: (context) =>
ZielSeite()), // Die Seite, zu der du navigieren möchtest
); */
MissingEvent()), // Die Seite, zu der du navigieren möchtest
);
},
child: Container(
width: 350,