Fix Image Scaling Issue
+ on click outside textfield, close keyboard
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
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
|
final FocusNode _focus = FocusNode();
|
||||||
|
|
||||||
return Consumer<LanguageProvider>(builder: (context, languageProvider, child){
|
return Consumer<LanguageProvider>(builder: (context, languageProvider, child){
|
||||||
return Scaffold(
|
return GestureDetector(
|
||||||
|
onTap: () {
|
||||||
|
_focus.unfocus();
|
||||||
|
},
|
||||||
|
child: Scaffold(
|
||||||
body: Stack(
|
body: Stack(
|
||||||
children: [
|
children: [
|
||||||
// Hintergrundbild
|
// Hintergrundbild
|
||||||
Container(
|
Center(
|
||||||
width: 1600,
|
child: Container(
|
||||||
height: 750,
|
width: MediaQuery.of(context).size.width * 0.8,
|
||||||
|
height: MediaQuery.of(context).size.height,
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
image: DecorationImage(
|
image: DecorationImage(
|
||||||
image: AssetImage("assets/backgrounds/Essen.jpg"),
|
image: AssetImage("assets/backgrounds/Essen.jpg"),
|
||||||
fit: BoxFit.cover, // Deckt den gesamten Bildschirm ab
|
fit: BoxFit.cover, // Deckt den gesamten Bildschirm ab
|
||||||
colorFilter: ColorFilter.mode(
|
colorFilter: ColorFilter.mode(
|
||||||
Colors.white.withOpacity(0.2),
|
Colors.white.withOpacity(0.6),
|
||||||
BlendMode.dstATop,
|
BlendMode.dstATop,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
),
|
||||||
// Vordergrundinhalte
|
// Vordergrundinhalte
|
||||||
|
|
||||||
Center(
|
Center(
|
||||||
@@ -43,7 +51,7 @@ class PageEssen extends StatelessWidget {
|
|||||||
builder: (context, pageProvider, child) {
|
builder: (context, pageProvider, child) {
|
||||||
return Text(
|
return Text(
|
||||||
pageProvider.selectedEssenName,
|
pageProvider.selectedEssenName,
|
||||||
style: const TextStyle(fontSize: 40),
|
style: TextStyle(fontSize: 40, fontWeight: FontWeight.bold),
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
@@ -52,7 +60,7 @@ class PageEssen extends StatelessWidget {
|
|||||||
),
|
),
|
||||||
Container(
|
Container(
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
color: Colors.white.withOpacity(0.8),
|
color: Colors.white.withOpacity(0.9),
|
||||||
borderRadius: const BorderRadius.only(
|
borderRadius: const BorderRadius.only(
|
||||||
topLeft: Radius.circular(80),
|
topLeft: Radius.circular(80),
|
||||||
bottomRight: Radius.circular(80))),
|
bottomRight: Radius.circular(80))),
|
||||||
@@ -114,6 +122,7 @@ class PageEssen extends StatelessWidget {
|
|||||||
autofocus: false,
|
autofocus: false,
|
||||||
maxLength: 500,
|
maxLength: 500,
|
||||||
maxLines: 4,
|
maxLines: 4,
|
||||||
|
focusNode: _focus,
|
||||||
decoration: InputDecoration(
|
decoration: InputDecoration(
|
||||||
labelText: Provider.of<LanguageProvider>(context).languageData[Provider.of<LanguageProvider>(context).language]["textfield"],
|
labelText: Provider.of<LanguageProvider>(context).languageData[Provider.of<LanguageProvider>(context).language]["textfield"],
|
||||||
labelStyle: const TextStyle(fontSize: 20),
|
labelStyle: const TextStyle(fontSize: 20),
|
||||||
@@ -121,6 +130,9 @@ class PageEssen extends StatelessWidget {
|
|||||||
borderRadius: BorderRadius.circular(15),
|
borderRadius: BorderRadius.circular(15),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
onFieldSubmitted: (value) {
|
||||||
|
Navigator.pop(context);
|
||||||
|
},
|
||||||
style: TextStyle(fontSize: 20),
|
style: TextStyle(fontSize: 20),
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
@@ -134,6 +146,7 @@ class PageEssen extends StatelessWidget {
|
|||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
),
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -21,20 +21,22 @@ class PageEssenSelect extends StatelessWidget {
|
|||||||
return Scaffold(
|
return Scaffold(
|
||||||
body: Stack(
|
body: Stack(
|
||||||
children: [
|
children: [
|
||||||
Container(
|
Center(
|
||||||
width: 1600,
|
child: Container(
|
||||||
height: 750,
|
width: MediaQuery.of(context).size.width * 0.8,
|
||||||
|
height: MediaQuery.of(context).size.height,
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
image: DecorationImage(
|
image: DecorationImage(
|
||||||
image: AssetImage("assets/backgrounds/Essen.jpg"),
|
image: AssetImage("assets/backgrounds/Essen.jpg"),
|
||||||
fit: BoxFit.cover, // Deckt den gesamten Bildschirm ab
|
fit: BoxFit.cover, // Deckt den gesamten Bildschirm ab
|
||||||
colorFilter: ColorFilter.mode(
|
colorFilter: ColorFilter.mode(
|
||||||
Colors.white.withOpacity(0.2),
|
Colors.white.withOpacity(0.6),
|
||||||
BlendMode.dstATop,
|
BlendMode.dstATop,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
),
|
||||||
Center(
|
Center(
|
||||||
child: Container(
|
child: Container(
|
||||||
child: Wrap(
|
child: Wrap(
|
||||||
|
|||||||
@@ -10,29 +10,37 @@ class PageService extends StatelessWidget {
|
|||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
|
final FocusNode _focus = FocusNode();
|
||||||
|
|
||||||
return Consumer<LanguageProvider>(builder: (context, languageProvider, child){
|
return Consumer<LanguageProvider>(builder: (context, languageProvider, child){
|
||||||
return Scaffold(
|
return GestureDetector(
|
||||||
|
onTap: () {
|
||||||
|
_focus.unfocus();
|
||||||
|
},
|
||||||
|
child: Scaffold(
|
||||||
body: Stack(
|
body: Stack(
|
||||||
children: [
|
children: [
|
||||||
Container(
|
Center(
|
||||||
width: 1600,
|
child: Container(
|
||||||
height: 750,
|
width: MediaQuery.of(context).size.width * 0.8,
|
||||||
|
height: MediaQuery.of(context).size.height,
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
image: DecorationImage(
|
image: DecorationImage(
|
||||||
image: AssetImage("assets/backgrounds/Service.jpg"),
|
image: AssetImage("assets/backgrounds/Service.jpg"),
|
||||||
fit: BoxFit.cover,
|
fit: BoxFit.cover,
|
||||||
colorFilter: ColorFilter.mode(
|
colorFilter: ColorFilter.mode(
|
||||||
Colors.white.withOpacity(0.2),
|
Colors.white.withOpacity(0.6),
|
||||||
BlendMode.dstATop
|
BlendMode.dstATop
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
),
|
||||||
Center(
|
Center(
|
||||||
child: SingleChildScrollView(
|
child: SingleChildScrollView(
|
||||||
child: Container(
|
child: Container(
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
color: Colors.white.withOpacity(0.8),
|
color: Colors.white.withOpacity(0.9),
|
||||||
borderRadius: BorderRadius.only(
|
borderRadius: BorderRadius.only(
|
||||||
topLeft: Radius.circular(80),
|
topLeft: Radius.circular(80),
|
||||||
bottomRight: Radius.circular(80)
|
bottomRight: Radius.circular(80)
|
||||||
@@ -90,6 +98,7 @@ class PageService extends StatelessWidget {
|
|||||||
autofocus: false,
|
autofocus: false,
|
||||||
maxLength: 500,
|
maxLength: 500,
|
||||||
maxLines: 4,
|
maxLines: 4,
|
||||||
|
focusNode: _focus,
|
||||||
decoration: InputDecoration(
|
decoration: InputDecoration(
|
||||||
labelText: Provider.of<LanguageProvider>(context).languageData[Provider.of<LanguageProvider>(context).language]["textfield"],
|
labelText: Provider.of<LanguageProvider>(context).languageData[Provider.of<LanguageProvider>(context).language]["textfield"],
|
||||||
labelStyle: const TextStyle(fontSize: 20),
|
labelStyle: const TextStyle(fontSize: 20),
|
||||||
@@ -108,6 +117,7 @@ class PageService extends StatelessWidget {
|
|||||||
)
|
)
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
),
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -12,26 +12,34 @@ class PageSpezielleErnaehrung extends StatelessWidget {
|
|||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
|
final FocusNode _focus = FocusNode();
|
||||||
|
|
||||||
return Consumer<LanguageProvider>(builder: (context, languageProvider, child) {
|
return Consumer<LanguageProvider>(builder: (context, languageProvider, child) {
|
||||||
return Scaffold(
|
return GestureDetector(
|
||||||
|
onTap: () {
|
||||||
|
_focus.unfocus();
|
||||||
|
},
|
||||||
|
child: Scaffold(
|
||||||
body: Stack(
|
body: Stack(
|
||||||
children: [
|
children: [
|
||||||
Container(
|
Center(
|
||||||
width: 1600,
|
child: Container(
|
||||||
height: 750,
|
width: MediaQuery.of(context).size.width * 0.8,
|
||||||
|
height: MediaQuery.of(context).size.height,
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
image: DecorationImage(
|
image: DecorationImage(
|
||||||
image: AssetImage("assets/backgrounds/Speziell.jpg"),
|
image: AssetImage("assets/backgrounds/Anmerkungen.jpg"),
|
||||||
fit: BoxFit.cover,
|
fit: BoxFit.cover,
|
||||||
colorFilter: ColorFilter.mode(
|
colorFilter: ColorFilter.mode(
|
||||||
Colors.white.withOpacity(0.2), BlendMode.dstATop),
|
Colors.white.withOpacity(0.6), BlendMode.dstATop),
|
||||||
)),
|
)),
|
||||||
),
|
),
|
||||||
|
),
|
||||||
Center(
|
Center(
|
||||||
child: SingleChildScrollView(
|
child: SingleChildScrollView(
|
||||||
child: Container(
|
child: Container(
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
color: Colors.white.withOpacity(0.8),
|
color: Colors.white.withOpacity(0.9),
|
||||||
borderRadius: BorderRadius.only(
|
borderRadius: BorderRadius.only(
|
||||||
topLeft: Radius.circular(80),
|
topLeft: Radius.circular(80),
|
||||||
bottomRight: Radius.circular(80))),
|
bottomRight: Radius.circular(80))),
|
||||||
@@ -99,6 +107,7 @@ class PageSpezielleErnaehrung extends StatelessWidget {
|
|||||||
autofocus: false,
|
autofocus: false,
|
||||||
maxLength: 500,
|
maxLength: 500,
|
||||||
maxLines: 5,
|
maxLines: 5,
|
||||||
|
focusNode: _focus,
|
||||||
decoration: InputDecoration(
|
decoration: InputDecoration(
|
||||||
labelText: Provider.of<LanguageProvider>(context).languageData[Provider.of<LanguageProvider>(context).language]["textfield"],
|
labelText: Provider.of<LanguageProvider>(context).languageData[Provider.of<LanguageProvider>(context).language]["textfield"],
|
||||||
labelStyle: const TextStyle(fontSize: 20),
|
labelStyle: const TextStyle(fontSize: 20),
|
||||||
@@ -116,6 +125,7 @@ class PageSpezielleErnaehrung extends StatelessWidget {
|
|||||||
)
|
)
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
),
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -12,9 +12,7 @@ class PageProvider extends ChangeNotifier {
|
|||||||
String selectedEssenName = "";
|
String selectedEssenName = "";
|
||||||
List<Widget> pages = [
|
List<Widget> pages = [
|
||||||
const PageEssenSelect(),
|
const PageEssenSelect(),
|
||||||
const PageAmbiente(),
|
|
||||||
const PageService(),
|
const PageService(),
|
||||||
const PageAnmerkungen(),
|
|
||||||
const PageSpezielleErnaehrung()
|
const PageSpezielleErnaehrung()
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|||||||
@@ -246,25 +246,12 @@ class SpaceRate extends StatelessWidget {
|
|||||||
Provider.of<LanguageProvider>(context).language]
|
Provider.of<LanguageProvider>(context).language]
|
||||||
["navBar"]["0"],
|
["navBar"]["0"],
|
||||||
),
|
),
|
||||||
GButton(
|
|
||||||
icon: Icons.chair,
|
|
||||||
/* prev: landscape*/
|
|
||||||
text: Provider.of<LanguageProvider>(context).languageData[
|
|
||||||
Provider.of<LanguageProvider>(context).language]
|
|
||||||
["navBar"]["1"],
|
|
||||||
),
|
|
||||||
GButton(
|
GButton(
|
||||||
icon: Icons.mood,
|
icon: Icons.mood,
|
||||||
text: Provider.of<LanguageProvider>(context).languageData[
|
text: Provider.of<LanguageProvider>(context).languageData[
|
||||||
Provider.of<LanguageProvider>(context).language]
|
Provider.of<LanguageProvider>(context).language]
|
||||||
["navBar"]["2"],
|
["navBar"]["2"],
|
||||||
),
|
),
|
||||||
GButton(
|
|
||||||
icon: Icons.feedback,
|
|
||||||
text: Provider.of<LanguageProvider>(context).languageData[
|
|
||||||
Provider.of<LanguageProvider>(context).language]
|
|
||||||
["navBar"]["3"],
|
|
||||||
),
|
|
||||||
GButton(
|
GButton(
|
||||||
icon: Icons.grass,
|
icon: Icons.grass,
|
||||||
text: Provider.of<LanguageProvider>(context).languageData[
|
text: Provider.of<LanguageProvider>(context).languageData[
|
||||||
|
|||||||
Reference in New Issue
Block a user