From 3cdc1dc1690d6ed4e11972c05506f198a11a015e Mon Sep 17 00:00:00 2001 From: Ali Date: Sat, 23 Nov 2024 17:52:12 +0100 Subject: [PATCH 1/2] delete all kinda stuff delete function implemented on pressed -> pop up => are you sure about that? yes: all rating from all pages will be cleared no: nothing happens, pop closes --- lib/main.dart | 54 ++++++++++++++++--- lib/providers/ambienteProvider.dart | 7 +++ lib/providers/anmerkungProvider.dart | 7 +++ lib/providers/essenProvider.dart | 7 +++ lib/providers/serviceProvider.dart | 7 +++ .../spezielleErnaehrungProvider.dart | 7 +++ 6 files changed, 83 insertions(+), 6 deletions(-) diff --git a/lib/main.dart b/lib/main.dart index a08e2bd..5176890 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -63,6 +63,45 @@ class MyApp extends StatelessWidget { class MyHome extends StatelessWidget { const MyHome({super.key}); + void _showDeleteDialog(BuildContext context) { + showDialog( + context: context, + builder: (BuildContext context) { + return AlertDialog( + shape: RoundedRectangleBorder( + borderRadius: BorderRadius.circular(20), + ), + title: const Text("Bewertungen löschen"), + content: const Text("Möchtest du alle Eingaben entfernen?", + style: TextStyle(fontSize: 18),), + actions: [ + ElevatedButton( + onPressed: () { + Navigator.of(context).pop(); + }, + child: Text("Behalten"), + style: ElevatedButton.styleFrom( + backgroundColor: Theme.of(context).colorScheme.secondary + ), + ), + ElevatedButton( + onPressed: () { + Provider.of(context, listen: false).resetAllFields(); + Provider.of(context, listen: false).resetAllFields(); + Provider.of(context, listen: false).resetAllFields(); + Provider.of(context, listen: false).resetAllFields(); + Provider.of(context, listen: false).resetAllFields(); + + // Hier Aktion für Löschen ausführen + Navigator.of(context).pop(); // Dialog schließen + }, + child: Text("Löschen"), + ) + ], + ); + }, + ); + } @override Widget build(BuildContext context) { @@ -146,17 +185,20 @@ class MyHome extends StatelessWidget { bottom: 10, child: IconButton.filled( padding: const EdgeInsets.all(15), - onPressed: () {}, + onPressed: () { + _showDeleteDialog(context); // Dialog anzeigen + }, icon: const Icon( Icons.delete, size: 30, ), style: ButtonStyle( - shape: WidgetStateProperty.all(RoundedRectangleBorder( - borderRadius: BorderRadius.circular(17))), - backgroundColor: WidgetStateProperty.all( - Theme.of(context).colorScheme.primary, - )), + shape: WidgetStateProperty.all(RoundedRectangleBorder( + borderRadius: BorderRadius.circular(17))), + backgroundColor: WidgetStateProperty.all( + Theme.of(context).colorScheme.primary, + ), + ), ), ) ], diff --git a/lib/providers/ambienteProvider.dart b/lib/providers/ambienteProvider.dart index ffff5cf..8295fc8 100644 --- a/lib/providers/ambienteProvider.dart +++ b/lib/providers/ambienteProvider.dart @@ -19,4 +19,11 @@ class AmbienteProvider extends ChangeNotifier { freiText = text; notifyListeners(); } + + void resetAllFields(){ + freiText = ""; + ratingFrage1 = 0; + ratingFrage2 = 0; + notifyListeners(); + } } \ No newline at end of file diff --git a/lib/providers/anmerkungProvider.dart b/lib/providers/anmerkungProvider.dart index 3fef7f9..3446628 100644 --- a/lib/providers/anmerkungProvider.dart +++ b/lib/providers/anmerkungProvider.dart @@ -19,4 +19,11 @@ class AnmerkungProvider extends ChangeNotifier { freiText = text; notifyListeners(); } + + void resetAllFields(){ + freiText = ""; + ratingFrage1 = 0; + ratingFrage2 = 0; + notifyListeners(); + } } \ No newline at end of file diff --git a/lib/providers/essenProvider.dart b/lib/providers/essenProvider.dart index c37a28a..dd6ce53 100644 --- a/lib/providers/essenProvider.dart +++ b/lib/providers/essenProvider.dart @@ -19,4 +19,11 @@ class EssenProvider extends ChangeNotifier { freiText = text; notifyListeners(); } + + void resetAllFields(){ + freiText = ""; + ratingGeschmack = 0; + ratingQuali = 0; + notifyListeners(); + } } \ No newline at end of file diff --git a/lib/providers/serviceProvider.dart b/lib/providers/serviceProvider.dart index 5620c0d..37d3f47 100644 --- a/lib/providers/serviceProvider.dart +++ b/lib/providers/serviceProvider.dart @@ -19,4 +19,11 @@ class ServiceProvider extends ChangeNotifier { freiText = text; notifyListeners(); } + + void resetAllFields(){ + freiText = ""; + ratingFrage1 = 0; + ratingFrage2 = 0; + notifyListeners(); + } } \ No newline at end of file diff --git a/lib/providers/spezielleErnaehrungProvider.dart b/lib/providers/spezielleErnaehrungProvider.dart index 8ef98a1..6512324 100644 --- a/lib/providers/spezielleErnaehrungProvider.dart +++ b/lib/providers/spezielleErnaehrungProvider.dart @@ -20,4 +20,11 @@ class SpezielleErnaehrungProvider extends ChangeNotifier { freiText = text; notifyListeners(); } + + void resetAllFields(){ + freiText = ""; + ratingSitzmoeglichkeit = 0; + ratingKeineAhnung = 0; + notifyListeners(); + } } \ No newline at end of file From 9a737c2328a76c6f8715b7bff902404d552fd10d Mon Sep 17 00:00:00 2001 From: Ali Date: Sat, 23 Nov 2024 19:32:49 +0100 Subject: [PATCH 2/2] Pages Updated All Pages updated to the new Design Ambiente Icon Changes --- lib/main.dart | 2 +- lib/pages/pageAmbiente.dart | 163 ++++++++++++----------- lib/pages/pageAnmerkungen.dart | 166 ++++++++++++----------- lib/pages/pageEssen.dart | 175 ++++++++++++++----------- lib/pages/pageService.dart | 167 ++++++++++++----------- lib/pages/pageSpezielleErnaehrung.dart | 110 ++++++++++++++-- 6 files changed, 476 insertions(+), 307 deletions(-) diff --git a/lib/main.dart b/lib/main.dart index 5176890..ab2e6eb 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -246,7 +246,7 @@ class MyHome extends StatelessWidget { text: "Essen", ), GButton( - icon: Icons.landscape, + icon: Icons.chair, /* prev: landscape*/ text: "Ambiente", ), GButton( diff --git a/lib/pages/pageAmbiente.dart b/lib/pages/pageAmbiente.dart index 28abd95..886645d 100644 --- a/lib/pages/pageAmbiente.dart +++ b/lib/pages/pageAmbiente.dart @@ -9,81 +9,98 @@ class PageAmbiente extends StatelessWidget { @override Widget build(BuildContext context) { - return Center( - child: Container( - decoration: BoxDecoration( - image: DecorationImage( - image: AssetImage("assets/backgrounds/Ambiente.jpg"), - fit: BoxFit.cover, - colorFilter: ColorFilter.mode( - Colors.white.withOpacity(0.2), - BlendMode.dstATop + return Scaffold( + body: Stack( + children: [ + Container( + decoration: BoxDecoration( + image: DecorationImage( + image: AssetImage("assets/backgrounds/Ambiente.jpg"), + fit: BoxFit.cover, + colorFilter: ColorFilter.mode( + Colors.white.withOpacity(0.2), + BlendMode.dstATop + ), + ) + ), + ), + Center( + child: Container( + decoration: BoxDecoration( + color: Colors.white.withOpacity(0.8), + borderRadius: BorderRadius.only( + topLeft: Radius.circular(80), + bottomRight: Radius.circular(80) + ) + ), + width: 600, + height: 400, + padding: EdgeInsets.symmetric(horizontal: 20), + child: Column( + crossAxisAlignment: CrossAxisAlignment.center, + mainAxisAlignment: MainAxisAlignment.center, + children: [ + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + const Text( + "Frage1*", + style: TextStyle(fontSize: 35), + ), + Consumer( + builder: (context, essenProvider, child) { + return RatingStars(onRate: (value) { + essenProvider.setRatingFrage1(value); + }, initRating: essenProvider.ratingFrage1,); + }, + ) + ], + ), + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + const Text( + "Frage2*", + style: TextStyle(fontSize: 35), + ), + Consumer( + builder: (context, essenProvider, child) { + return RatingStars(onRate: (value) { + essenProvider.setRatingFrage2(value); + }, initRating: essenProvider.ratingFrage2,); + }, + ) + ], + ), + const SizedBox( + height: 50, + ), + Consumer( + builder: (context, essenProvider, child) { + return TextFormField( + initialValue: essenProvider.freiText, + onChanged: (value) { + essenProvider.setFreiText(value); + }, + autofocus: false, + maxLength: 500, + maxLines: 4, + decoration: InputDecoration( + labelText: "Dein Feedback (optional)", + labelStyle: const TextStyle(fontSize: 20), + border: OutlineInputBorder( + borderRadius: BorderRadius.circular(15) + ), + ), + style: TextStyle(fontSize: 20), + ); + }, + ) + ], + ), ), ) - ), - width: 600, - child: Column( - crossAxisAlignment: CrossAxisAlignment.center, - mainAxisAlignment: MainAxisAlignment.center, - children: [ - Row( - mainAxisAlignment: MainAxisAlignment.spaceBetween, - children: [ - const Text( - "Frage1*", - style: TextStyle(fontSize: 35), - ), - Consumer( - builder: (context, essenProvider, child) { - return RatingStars(onRate: (value) { - essenProvider.setRatingFrage1(value); - }, initRating: essenProvider.ratingFrage1,); - }, - ) - ], - ), - Row( - mainAxisAlignment: MainAxisAlignment.spaceBetween, - children: [ - const Text( - "Frage2*", - style: TextStyle(fontSize: 35), - ), - Consumer( - builder: (context, essenProvider, child) { - return RatingStars(onRate: (value) { - essenProvider.setRatingFrage2(value); - }, initRating: essenProvider.ratingFrage2,); - }, - ) - ], - ), - const SizedBox( - height: 50, - ), - Consumer( - builder: (context, essenProvider, child) { - return TextFormField( - initialValue: essenProvider.freiText, - onChanged: (value) { - essenProvider.setFreiText(value); - }, - autofocus: false, - maxLength: 500, - maxLines: 4, - decoration: InputDecoration( - labelText: "Dein Feedback (optional)", - labelStyle: const TextStyle(fontSize: 20), - border: OutlineInputBorder( - borderRadius: BorderRadius.circular(15) - ), - ), - style: TextStyle(fontSize: 20), - ); - }, - ) - ], - ), + ], ), ); } diff --git a/lib/pages/pageAnmerkungen.dart b/lib/pages/pageAnmerkungen.dart index 94c7135..6460322 100644 --- a/lib/pages/pageAnmerkungen.dart +++ b/lib/pages/pageAnmerkungen.dart @@ -9,81 +9,99 @@ class PageAnmerkungen extends StatelessWidget { @override Widget build(BuildContext context) { - return Center( - child: Container( - decoration: BoxDecoration( - image: DecorationImage( - image: AssetImage("assets/backgrounds/Anmerkungen.jpg"), - fit: BoxFit.cover, - colorFilter: ColorFilter.mode( - Colors.white.withOpacity(0.2), - BlendMode.dstATop - ), - ) - ), - width: 600, - child: Column( - crossAxisAlignment: CrossAxisAlignment.center, - mainAxisAlignment: MainAxisAlignment.center, - children: [ - Row( - mainAxisAlignment: MainAxisAlignment.spaceBetween, - children: [ - const Text( - "Frage1*", - style: TextStyle(fontSize: 35), - ), - Consumer( - builder: (context, essenProvider, child) { - return RatingStars(onRate: (value) { - essenProvider.setRatingFrage1(value); - }, initRating: essenProvider.ratingFrage1,); - }, - ) - ], - ), - Row( - mainAxisAlignment: MainAxisAlignment.spaceBetween, - children: [ - const Text( - "Frage2*", - style: TextStyle(fontSize: 35), - ), - Consumer( - builder: (context, essenProvider, child) { - return RatingStars(onRate: (value) { - essenProvider.setRatingFrage2(value); - }, initRating: essenProvider.ratingFrage2,); - }, - ) - ], - ), - const SizedBox( - height: 50, - ), - Consumer( - builder: (context, essenProvider, child) { - return TextFormField( - initialValue: essenProvider.freiText, - onChanged: (value) { - essenProvider.setFreiText(value); - }, - autofocus: false, - maxLength: 500, - maxLines: 4, - decoration: InputDecoration( - labelText: "Dein Feedback (optional)", - labelStyle: const TextStyle(fontSize: 20), - border: OutlineInputBorder( - borderRadius: BorderRadius.circular(15) - ), + return Scaffold( + body: Stack( + children: [ + Container( + width: 1600, + height: 800, + decoration: BoxDecoration( + image: DecorationImage( + image: AssetImage("assets/backgrounds/Anmerkungen.jpg"), + fit: BoxFit.cover, + colorFilter: ColorFilter.mode( + Colors.white.withOpacity(0.2), + BlendMode.dstATop ), - style: TextStyle(fontSize: 20), - ); - }, - ) - ], - ), + ) + ), + ), + Center( + child: Container( + decoration: BoxDecoration( + color: Colors.white.withOpacity(0.8), + borderRadius: BorderRadius.only( + topLeft: Radius.circular(80), + bottomRight: Radius.circular(80) + ) + ), + padding: EdgeInsets.symmetric(horizontal: 20), + height: 400, + width: 600, + child: Column( + crossAxisAlignment: CrossAxisAlignment.center, + mainAxisAlignment: MainAxisAlignment.center, + children: [ + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + const Text( + "Frage1*", + style: TextStyle(fontSize: 35), + ), + Consumer( + builder: (context, essenProvider, child) { + return RatingStars(onRate: (value) { + essenProvider.setRatingFrage1(value); + }, initRating: essenProvider.ratingFrage1,); + }, + ) + ], + ), + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + const Text( + "Frage2*", + style: TextStyle(fontSize: 35), + ), + Consumer( + builder: (context, essenProvider, child) { + return RatingStars(onRate: (value) { + essenProvider.setRatingFrage2(value); + }, initRating: essenProvider.ratingFrage2,); + }, + ) + ], + ), + const SizedBox( + height: 50, + ), + Consumer( + builder: (context, essenProvider, child) { + return TextFormField( + initialValue: essenProvider.freiText, + onChanged: (value) { + essenProvider.setFreiText(value); + }, + autofocus: false, + maxLength: 500, + maxLines: 4, + decoration: InputDecoration( + labelText: "Dein Feedback (optional)", + labelStyle: const TextStyle(fontSize: 20), + border: OutlineInputBorder( + borderRadius: BorderRadius.circular(15) + ), + ), + style: TextStyle(fontSize: 20), + ); + }, + ) + ], + ), + ), + )], ), ); } diff --git a/lib/pages/pageEssen.dart b/lib/pages/pageEssen.dart index 14b4918..deb1292 100644 --- a/lib/pages/pageEssen.dart +++ b/lib/pages/pageEssen.dart @@ -10,81 +10,108 @@ class PageEssen extends StatelessWidget { @override Widget build(BuildContext context) { - return Center( - child: Container( - decoration: BoxDecoration( - image: DecorationImage( - image: AssetImage("assets/backgrounds/Essen.jpg"), - fit: BoxFit.cover, - colorFilter: ColorFilter.mode( - Colors.white.withOpacity(0.2), - BlendMode.dstATop - ), - ) - ), - width: 600, - child: Column( - crossAxisAlignment: CrossAxisAlignment.center, - mainAxisAlignment: MainAxisAlignment.center, - children: [ - Row( - mainAxisAlignment: MainAxisAlignment.spaceBetween, - children: [ - const Text( - "Geschmack*", - style: TextStyle(fontSize: 35), - ), - Consumer( - builder: (context, essenProvider, child) { - return RatingStars(onRate: (value) { - essenProvider.setRatingGeschmack(value); - }, initRating: essenProvider.ratingGeschmack,); - }, - ) - ], - ), - Row( - mainAxisAlignment: MainAxisAlignment.spaceBetween, - children: [ - const Text( - "Qualität*", - style: TextStyle(fontSize: 35), - ), - Consumer( - builder: (context, essenProvider, child) { - return RatingStars(onRate: (value) { - essenProvider.setRatingQuali(value); - }, initRating: essenProvider.ratingQuali,); - }, - ) - ], - ), - const SizedBox( - height: 50, - ), - Consumer( - builder: (context, essenProvider, child) { - return TextFormField( - initialValue: essenProvider.freiText, - onChanged: (value) { - essenProvider.setFreiText(value); - }, - autofocus: false, - maxLength: 500, - maxLines: 4, - decoration: InputDecoration( - labelText: "Dein Feedback (optional)", - labelStyle: const TextStyle(fontSize: 20), - border: OutlineInputBorder( - borderRadius: BorderRadius.circular(15) - ), + return Scaffold( + body: Stack( + children: [ + // Hintergrundbild + Container( + width: 1600, + height: 750, + decoration: BoxDecoration( + image: DecorationImage( + image: AssetImage("assets/backgrounds/Essen.jpg"), + fit: BoxFit.cover, // Deckt den gesamten Bildschirm ab + colorFilter: ColorFilter.mode( + Colors.white.withOpacity(0.2), + BlendMode.dstATop, ), - style: TextStyle(fontSize: 20), - ); - }, - ) - ], - ), + ), + ), + ), + // Vordergrundinhalte + Center( + child: Container( + decoration: BoxDecoration( + color: Colors.white.withOpacity(0.8), + borderRadius: BorderRadius.only( + topLeft: Radius.circular(80), + bottomRight: Radius.circular(80) + ) + ), + height: 400, + width: 600, + padding: EdgeInsets.symmetric(horizontal: 20), + child: Column( + crossAxisAlignment: CrossAxisAlignment.center, + mainAxisAlignment: MainAxisAlignment.center, + children: [ + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + const Text( + "Geschmack*", + style: TextStyle(fontSize: 35), + ), + Consumer( + builder: (context, essenProvider, child) { + return RatingStars( + onRate: (value) { + essenProvider.setRatingGeschmack(value); + }, + initRating: essenProvider.ratingGeschmack, + ); + }, + ) + ], + ), + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + const Text( + "Qualität*", + style: TextStyle(fontSize: 35), + ), + Consumer( + builder: (context, essenProvider, child) { + return RatingStars( + onRate: (value) { + essenProvider.setRatingQuali(value); + }, + initRating: essenProvider.ratingQuali, + ); + }, + ) + ], + ), + const SizedBox( + height: 50, + ), + Consumer( + builder: (context, essenProvider, child) { + return TextFormField( + initialValue: essenProvider.freiText, + onChanged: (value) { + essenProvider.setFreiText(value); + }, + autofocus: false, + maxLength: 500, + maxLines: 4, + decoration: InputDecoration( + labelText: "Dein Feedback (optional)", + labelStyle: const TextStyle(fontSize: 20), + border: OutlineInputBorder( + borderRadius: BorderRadius.circular(15), + ), + ), + style: TextStyle(fontSize: 20), + ); + }, + ), + ], + ), + ), + ), + ], ), ); } diff --git a/lib/pages/pageService.dart b/lib/pages/pageService.dart index 1894d66..857b896 100644 --- a/lib/pages/pageService.dart +++ b/lib/pages/pageService.dart @@ -9,81 +9,100 @@ class PageService extends StatelessWidget { @override Widget build(BuildContext context) { - return Center( - child: Container( - decoration: BoxDecoration( - image: DecorationImage( - image: AssetImage("assets/backgrounds/Service.jpg"), - fit: BoxFit.cover, - colorFilter: ColorFilter.mode( - Colors.white.withOpacity(0.2), - BlendMode.dstATop - ), - ) - ), - width: 600, - child: Column( - crossAxisAlignment: CrossAxisAlignment.center, - mainAxisAlignment: MainAxisAlignment.center, - children: [ - Row( - mainAxisAlignment: MainAxisAlignment.spaceBetween, - children: [ - const Text( - "Frage1*", - style: TextStyle(fontSize: 35), - ), - Consumer( - builder: (context, essenProvider, child) { - return RatingStars(onRate: (value) { - essenProvider.setRatingFrage1(value); - }, initRating: essenProvider.ratingFrage1,); - }, - ) - ], - ), - Row( - mainAxisAlignment: MainAxisAlignment.spaceBetween, - children: [ - const Text( - "Frage2*", - style: TextStyle(fontSize: 35), - ), - Consumer( - builder: (context, essenProvider, child) { - return RatingStars(onRate: (value) { - essenProvider.setRatingFrage2(value); - }, initRating: essenProvider.ratingFrage2,); - }, - ) - ], - ), - const SizedBox( - height: 50, - ), - Consumer( - builder: (context, essenProvider, child) { - return TextFormField( - initialValue: essenProvider.freiText, - onChanged: (value) { - essenProvider.setFreiText(value); - }, - autofocus: false, - maxLength: 500, - maxLines: 4, - decoration: InputDecoration( - labelText: "Dein Feedback (optional)", - labelStyle: const TextStyle(fontSize: 20), - border: OutlineInputBorder( - borderRadius: BorderRadius.circular(15) - ), + return Scaffold( + body: Stack( + children: [ + Container( + width: 1600, + height: 750, + decoration: BoxDecoration( + image: DecorationImage( + image: AssetImage("assets/backgrounds/Service.jpg"), + fit: BoxFit.cover, + colorFilter: ColorFilter.mode( + Colors.white.withOpacity(0.2), + BlendMode.dstATop ), - style: TextStyle(fontSize: 20), - ); - }, - ) - ], - ), + ) + ), + ), + Center( + child: Container( + decoration: BoxDecoration( + color: Colors.white.withOpacity(0.8), + borderRadius: BorderRadius.only( + topLeft: Radius.circular(80), + bottomRight: Radius.circular(80) + ) + ), + width: 600, + height: 400, + padding: EdgeInsets.symmetric(horizontal: 20), + child: Column( + crossAxisAlignment: CrossAxisAlignment.center, + mainAxisAlignment: MainAxisAlignment.center, + children: [ + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + const Text( + "Frage1*", + style: TextStyle(fontSize: 35), + ), + Consumer( + builder: (context, essenProvider, child) { + return RatingStars(onRate: (value) { + essenProvider.setRatingFrage1(value); + }, initRating: essenProvider.ratingFrage1,); + }, + ) + ], + ), + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + const Text( + "Frage2*", + style: TextStyle(fontSize: 35), + ), + Consumer( + builder: (context, essenProvider, child) { + return RatingStars(onRate: (value) { + essenProvider.setRatingFrage2(value); + }, initRating: essenProvider.ratingFrage2,); + }, + ) + ], + ), + const SizedBox( + height: 50, + ), + Consumer( + builder: (context, essenProvider, child) { + return TextFormField( + initialValue: essenProvider.freiText, + onChanged: (value) { + essenProvider.setFreiText(value); + }, + autofocus: false, + maxLength: 500, + maxLines: 4, + decoration: InputDecoration( + labelText: "Dein Feedback (optional)", + labelStyle: const TextStyle(fontSize: 20), + border: OutlineInputBorder( + borderRadius: BorderRadius.circular(15) + ), + ), + style: TextStyle(fontSize: 20), + ); + }, + ) + ], + ), + ), + ) + ], ), ); } diff --git a/lib/pages/pageSpezielleErnaehrung.dart b/lib/pages/pageSpezielleErnaehrung.dart index 676c331..801d156 100644 --- a/lib/pages/pageSpezielleErnaehrung.dart +++ b/lib/pages/pageSpezielleErnaehrung.dart @@ -11,18 +11,106 @@ class PageSpezielleErnaehrung extends StatelessWidget { @override Widget build(BuildContext context) { - return Center( - child: Container( - decoration: BoxDecoration( - image: DecorationImage( - image: AssetImage("assets/backgrounds/Speziell.jpg"), - fit: BoxFit.cover, - colorFilter: ColorFilter.mode( - Colors.white.withOpacity(0.2), - BlendMode.dstATop + return Scaffold( + body: Stack( + children: [ + Container( + width: 1600, + height: 750, + decoration: BoxDecoration( + image: DecorationImage( + image: AssetImage("assets/backgrounds/Speziell.jpg"), + fit: BoxFit.cover, + colorFilter: ColorFilter.mode( + Colors.white.withOpacity(0.2), + BlendMode.dstATop + ), + ) + ), + ), + Center( + child: Container( + decoration: BoxDecoration( + color: Colors.white.withOpacity(0.8), + borderRadius: BorderRadius.only( + topLeft: Radius.circular(80), + bottomRight: Radius.circular(80) + ) ), - ) - ), + width: 650, + height: 450, + padding: EdgeInsets.symmetric(horizontal: 20), + child: Column( + crossAxisAlignment: CrossAxisAlignment.center, + mainAxisAlignment: MainAxisAlignment.center, + children: [ + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + const Text( + "Vegan?*", + style: TextStyle(fontSize: 35), + ), + Consumer( + builder: (context, spezielleErnaehrungProvider, child) { + return RatingStars(onRate: (value) { + spezielleErnaehrungProvider.setRatingSitzmoeglichkeit(value); + }, initRating: spezielleErnaehrungProvider.ratingSitzmoeglichkeit,); + }, + ) + ], + ), + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + const Text( + "Keine Ahnung*", + style: TextStyle(fontSize: 35), + ), + Consumer( + builder: (context, spezielleErnaehrungProvider, child) { + return RatingStars(onRate: (value) { + spezielleErnaehrungProvider.setRatingKeineAhnung(value); + }, initRating: spezielleErnaehrungProvider.ratingKeineAhnung,); + }, + ), + + ], + ), + const SizedBox( + height: 50, + ), + Consumer( + builder: (context, spezielleErnaehrungProvider, child) { + return TextFormField( + initialValue: spezielleErnaehrungProvider.freiText, + onChanged: (value) { + spezielleErnaehrungProvider.setFreiText(value); + }, + autofocus: false, + maxLength: 500, + maxLines: 5, + decoration: InputDecoration( + labelText: "Dein Feedback (optional)", + labelStyle: const TextStyle(fontSize: 20), + border: OutlineInputBorder( + borderRadius: BorderRadius.circular(15) + ), + ), + style: TextStyle(fontSize: 20), + ); + }, + ) + ], + ), + ), + ) + ], + ), + ); + + Center( + child: Container( width: 800, child: Column( crossAxisAlignment: CrossAxisAlignment.center,