Merge branch 'Fixes' into 'main'
Fix Image Scaling Issue See merge request brausjonas/mensaapp!14
This commit is contained in:
@@ -0,0 +1,3 @@
|
||||
description: This file stores settings for Dart & Flutter DevTools.
|
||||
documentation: https://docs.flutter.dev/tools/devtools/extensions#configure-extension-enablement-states
|
||||
extensions:
|
||||
@@ -13,25 +13,33 @@ class PageEssen extends StatelessWidget {
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final FocusNode _focus = FocusNode();
|
||||
|
||||
return Consumer<LanguageProvider>(builder: (context, languageProvider, child){
|
||||
return Scaffold(
|
||||
return GestureDetector(
|
||||
onTap: () {
|
||||
_focus.unfocus();
|
||||
},
|
||||
child: Scaffold(
|
||||
body: Stack(
|
||||
children: [
|
||||
// Hintergrundbild
|
||||
Container(
|
||||
width: 1600,
|
||||
height: 750,
|
||||
Center(
|
||||
child: Container(
|
||||
width: MediaQuery.of(context).size.width * 0.8,
|
||||
height: MediaQuery.of(context).size.height,
|
||||
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),
|
||||
Colors.white.withOpacity(0.6),
|
||||
BlendMode.dstATop,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
// Vordergrundinhalte
|
||||
|
||||
Center(
|
||||
@@ -43,7 +51,7 @@ class PageEssen extends StatelessWidget {
|
||||
builder: (context, pageProvider, child) {
|
||||
return Text(
|
||||
pageProvider.selectedEssenName,
|
||||
style: const TextStyle(fontSize: 40),
|
||||
style: TextStyle(fontSize: 40, fontWeight: FontWeight.bold),
|
||||
);
|
||||
},
|
||||
),
|
||||
@@ -52,7 +60,7 @@ class PageEssen extends StatelessWidget {
|
||||
),
|
||||
Container(
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.white.withOpacity(0.8),
|
||||
color: Colors.white.withOpacity(0.9),
|
||||
borderRadius: const BorderRadius.only(
|
||||
topLeft: Radius.circular(80),
|
||||
bottomRight: Radius.circular(80))),
|
||||
@@ -114,6 +122,7 @@ class PageEssen extends StatelessWidget {
|
||||
autofocus: false,
|
||||
maxLength: 500,
|
||||
maxLines: 4,
|
||||
focusNode: _focus,
|
||||
decoration: InputDecoration(
|
||||
labelText: Provider.of<LanguageProvider>(context).languageData[Provider.of<LanguageProvider>(context).language]["textfield"],
|
||||
labelStyle: const TextStyle(fontSize: 20),
|
||||
@@ -121,6 +130,9 @@ class PageEssen extends StatelessWidget {
|
||||
borderRadius: BorderRadius.circular(15),
|
||||
),
|
||||
),
|
||||
onFieldSubmitted: (value) {
|
||||
Navigator.pop(context);
|
||||
},
|
||||
style: TextStyle(fontSize: 20),
|
||||
);
|
||||
},
|
||||
@@ -134,6 +146,7 @@ class PageEssen extends StatelessWidget {
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
});
|
||||
}
|
||||
|
||||
@@ -21,20 +21,22 @@ class PageEssenSelect extends StatelessWidget {
|
||||
return Scaffold(
|
||||
body: Stack(
|
||||
children: [
|
||||
Container(
|
||||
width: 1600,
|
||||
height: 750,
|
||||
Center(
|
||||
child: Container(
|
||||
width: MediaQuery.of(context).size.width * 0.8,
|
||||
height: MediaQuery.of(context).size.height,
|
||||
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),
|
||||
Colors.white.withOpacity(0.6),
|
||||
BlendMode.dstATop,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
Center(
|
||||
child: Container(
|
||||
child: Wrap(
|
||||
|
||||
@@ -10,29 +10,37 @@ class PageService extends StatelessWidget {
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final FocusNode _focus = FocusNode();
|
||||
|
||||
return Consumer<LanguageProvider>(builder: (context, languageProvider, child){
|
||||
return Scaffold(
|
||||
return GestureDetector(
|
||||
onTap: () {
|
||||
_focus.unfocus();
|
||||
},
|
||||
child: Scaffold(
|
||||
body: Stack(
|
||||
children: [
|
||||
Container(
|
||||
width: 1600,
|
||||
height: 750,
|
||||
Center(
|
||||
child: Container(
|
||||
width: MediaQuery.of(context).size.width * 0.8,
|
||||
height: MediaQuery.of(context).size.height,
|
||||
decoration: BoxDecoration(
|
||||
image: DecorationImage(
|
||||
image: AssetImage("assets/backgrounds/Service.jpg"),
|
||||
fit: BoxFit.cover,
|
||||
colorFilter: ColorFilter.mode(
|
||||
Colors.white.withOpacity(0.2),
|
||||
Colors.white.withOpacity(0.6),
|
||||
BlendMode.dstATop
|
||||
),
|
||||
)
|
||||
),
|
||||
),
|
||||
),
|
||||
Center(
|
||||
child: SingleChildScrollView(
|
||||
child: Container(
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.white.withOpacity(0.8),
|
||||
color: Colors.white.withOpacity(0.9),
|
||||
borderRadius: BorderRadius.only(
|
||||
topLeft: Radius.circular(80),
|
||||
bottomRight: Radius.circular(80)
|
||||
@@ -90,6 +98,7 @@ class PageService extends StatelessWidget {
|
||||
autofocus: false,
|
||||
maxLength: 500,
|
||||
maxLines: 4,
|
||||
focusNode: _focus,
|
||||
decoration: InputDecoration(
|
||||
labelText: Provider.of<LanguageProvider>(context).languageData[Provider.of<LanguageProvider>(context).language]["textfield"],
|
||||
labelStyle: const TextStyle(fontSize: 20),
|
||||
@@ -108,6 +117,7 @@ class PageService extends StatelessWidget {
|
||||
)
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
});
|
||||
}
|
||||
|
||||
@@ -12,26 +12,34 @@ class PageSpezielleErnaehrung extends StatelessWidget {
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final FocusNode _focus = FocusNode();
|
||||
|
||||
return Consumer<LanguageProvider>(builder: (context, languageProvider, child) {
|
||||
return Scaffold(
|
||||
return GestureDetector(
|
||||
onTap: () {
|
||||
_focus.unfocus();
|
||||
},
|
||||
child: Scaffold(
|
||||
body: Stack(
|
||||
children: [
|
||||
Container(
|
||||
width: 1600,
|
||||
height: 750,
|
||||
Center(
|
||||
child: Container(
|
||||
width: MediaQuery.of(context).size.width * 0.8,
|
||||
height: MediaQuery.of(context).size.height,
|
||||
decoration: BoxDecoration(
|
||||
image: DecorationImage(
|
||||
image: AssetImage("assets/backgrounds/Speziell.jpg"),
|
||||
image: AssetImage("assets/backgrounds/Anmerkungen.jpg"),
|
||||
fit: BoxFit.cover,
|
||||
colorFilter: ColorFilter.mode(
|
||||
Colors.white.withOpacity(0.2), BlendMode.dstATop),
|
||||
Colors.white.withOpacity(0.6), BlendMode.dstATop),
|
||||
)),
|
||||
),
|
||||
),
|
||||
Center(
|
||||
child: SingleChildScrollView(
|
||||
child: Container(
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.white.withOpacity(0.8),
|
||||
color: Colors.white.withOpacity(0.9),
|
||||
borderRadius: BorderRadius.only(
|
||||
topLeft: Radius.circular(80),
|
||||
bottomRight: Radius.circular(80))),
|
||||
@@ -99,6 +107,7 @@ class PageSpezielleErnaehrung extends StatelessWidget {
|
||||
autofocus: false,
|
||||
maxLength: 500,
|
||||
maxLines: 5,
|
||||
focusNode: _focus,
|
||||
decoration: InputDecoration(
|
||||
labelText: Provider.of<LanguageProvider>(context).languageData[Provider.of<LanguageProvider>(context).language]["textfield"],
|
||||
labelStyle: const TextStyle(fontSize: 20),
|
||||
@@ -116,6 +125,7 @@ class PageSpezielleErnaehrung extends StatelessWidget {
|
||||
)
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
});
|
||||
}
|
||||
|
||||
@@ -39,10 +39,8 @@ class LanguageProvider extends ChangeNotifier {
|
||||
"navBar":
|
||||
{
|
||||
"0": "Essen",
|
||||
"1": "Ambiente",
|
||||
"2": "Service",
|
||||
"3": "Anmerkungen",
|
||||
"4": "Spezielle Ernährung"
|
||||
"1": "Service",
|
||||
"2": "Spezielle Ernährung"
|
||||
},
|
||||
"floating":
|
||||
{
|
||||
@@ -85,10 +83,8 @@ class LanguageProvider extends ChangeNotifier {
|
||||
},
|
||||
"navBar": {
|
||||
"0": "Food",
|
||||
"1": "Ambience",
|
||||
"2": "Service",
|
||||
"3": "Remarks",
|
||||
"4": "Special Diet"
|
||||
"1": "Service",
|
||||
"2": "Special Diet"
|
||||
},
|
||||
"floating": {
|
||||
"info": "* Required field",
|
||||
@@ -130,10 +126,8 @@ class LanguageProvider extends ChangeNotifier {
|
||||
},
|
||||
"navBar": {
|
||||
"0": "Nourriture",
|
||||
"1": "Ambiance",
|
||||
"2": "Service",
|
||||
"3": "Remarques",
|
||||
"4": "Régime spécial"
|
||||
"1": "Service",
|
||||
"2": "Régime spécial"
|
||||
},
|
||||
"floating": {
|
||||
"info": "* Champ obligatoire",
|
||||
|
||||
@@ -12,9 +12,7 @@ class PageProvider extends ChangeNotifier {
|
||||
String selectedEssenName = "";
|
||||
List<Widget> pages = [
|
||||
const PageEssenSelect(),
|
||||
const PageAmbiente(),
|
||||
const PageService(),
|
||||
const PageAnmerkungen(),
|
||||
const PageSpezielleErnaehrung()
|
||||
];
|
||||
|
||||
|
||||
@@ -84,7 +84,7 @@ class SpaceRate extends StatelessWidget {
|
||||
appBar: AppBar(
|
||||
leading: IconButton(
|
||||
icon: Icon(
|
||||
Icons.home,
|
||||
Icons.home_rounded,
|
||||
size: 36,
|
||||
color: Theme.of(context).colorScheme.onPrimary,
|
||||
),
|
||||
@@ -247,29 +247,16 @@ class SpaceRate extends StatelessWidget {
|
||||
["navBar"]["0"],
|
||||
),
|
||||
GButton(
|
||||
icon: Icons.chair,
|
||||
/* prev: landscape*/
|
||||
icon: Icons.mood,
|
||||
text: Provider.of<LanguageProvider>(context).languageData[
|
||||
Provider.of<LanguageProvider>(context).language]
|
||||
["navBar"]["1"],
|
||||
),
|
||||
GButton(
|
||||
icon: Icons.mood,
|
||||
text: Provider.of<LanguageProvider>(context).languageData[
|
||||
Provider.of<LanguageProvider>(context).language]
|
||||
["navBar"]["2"],
|
||||
),
|
||||
GButton(
|
||||
icon: Icons.feedback,
|
||||
text: Provider.of<LanguageProvider>(context).languageData[
|
||||
Provider.of<LanguageProvider>(context).language]
|
||||
["navBar"]["3"],
|
||||
),
|
||||
GButton(
|
||||
icon: Icons.grass,
|
||||
text: Provider.of<LanguageProvider>(context).languageData[
|
||||
Provider.of<LanguageProvider>(context).language]
|
||||
["navBar"]["4"],
|
||||
["navBar"]["2"],
|
||||
),
|
||||
],
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user