Language Change
Dictionary has been modified, all texts are being translated now
This commit is contained in:
+117
-114
@@ -4,6 +4,7 @@ import 'package:mensaapp/modules/fetchMenu.dart';
|
||||
import 'package:mensaapp/modules/ratingEmote.dart';
|
||||
import 'package:mensaapp/modules/ratingStars.dart';
|
||||
import 'package:mensaapp/providers/essenProvider.dart';
|
||||
import 'package:mensaapp/providers/languageProvider.dart';
|
||||
import 'package:mensaapp/providers/pageProvider.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
|
||||
@@ -12,126 +13,128 @@ class PageEssen extends StatelessWidget {
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
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,
|
||||
return Consumer<LanguageProvider>(builder: (context, languageProvider, child){
|
||||
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,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
// Vordergrundinhalte
|
||||
// Vordergrundinhalte
|
||||
|
||||
Center(
|
||||
child: SingleChildScrollView(
|
||||
child: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Consumer<PageProvider>(
|
||||
builder: (context, pageProvider, child) {
|
||||
return Text(
|
||||
pageProvider.selectedEssenName,
|
||||
style: const TextStyle(fontSize: 40),
|
||||
);
|
||||
},
|
||||
),
|
||||
const SizedBox(
|
||||
height: 30,
|
||||
),
|
||||
Container(
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.white.withOpacity(0.8),
|
||||
borderRadius: const 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<EssenProvider>(
|
||||
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<EssenProvider>(
|
||||
builder: (context, essenProvider, child) {
|
||||
return RatingStars(
|
||||
onRate: (value) {
|
||||
essenProvider.setRatingQuali(value);
|
||||
},
|
||||
initRating: essenProvider.ratingQuali,
|
||||
);
|
||||
},
|
||||
)
|
||||
],
|
||||
),
|
||||
const SizedBox(
|
||||
height: 50,
|
||||
),
|
||||
Consumer<EssenProvider>(
|
||||
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),
|
||||
);
|
||||
},
|
||||
),
|
||||
],
|
||||
Center(
|
||||
child: SingleChildScrollView(
|
||||
child: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Consumer<PageProvider>(
|
||||
builder: (context, pageProvider, child) {
|
||||
return Text(
|
||||
pageProvider.selectedEssenName,
|
||||
style: const TextStyle(fontSize: 40),
|
||||
);
|
||||
},
|
||||
),
|
||||
),
|
||||
],
|
||||
const SizedBox(
|
||||
height: 30,
|
||||
),
|
||||
Container(
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.white.withOpacity(0.8),
|
||||
borderRadius: const 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: [
|
||||
Text(
|
||||
Provider.of<LanguageProvider>(context).languageData[Provider.of<LanguageProvider>(context).language]["pageEssen"]["question1"],
|
||||
style: TextStyle(fontSize: 35),
|
||||
),
|
||||
Consumer<EssenProvider>(
|
||||
builder: (context, essenProvider, child) {
|
||||
return RatingStars(
|
||||
onRate: (value) {
|
||||
essenProvider.setRatingGeschmack(value);
|
||||
},
|
||||
initRating: essenProvider.ratingGeschmack,
|
||||
);
|
||||
},
|
||||
)
|
||||
],
|
||||
),
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Text(
|
||||
Provider.of<LanguageProvider>(context).languageData[Provider.of<LanguageProvider>(context).language]["pageEssen"]["question2"],
|
||||
style: TextStyle(fontSize: 35),
|
||||
),
|
||||
Consumer<EssenProvider>(
|
||||
builder: (context, essenProvider, child) {
|
||||
return RatingStars(
|
||||
onRate: (value) {
|
||||
essenProvider.setRatingQuali(value);
|
||||
},
|
||||
initRating: essenProvider.ratingQuali,
|
||||
);
|
||||
},
|
||||
)
|
||||
],
|
||||
),
|
||||
const SizedBox(
|
||||
height: 50,
|
||||
),
|
||||
Consumer<EssenProvider>(
|
||||
builder: (context, essenProvider, child) {
|
||||
return TextFormField(
|
||||
initialValue: essenProvider.freiText,
|
||||
onChanged: (value) {
|
||||
essenProvider.setFreiText(value);
|
||||
},
|
||||
autofocus: false,
|
||||
maxLength: 500,
|
||||
maxLines: 4,
|
||||
decoration: InputDecoration(
|
||||
labelText: Provider.of<LanguageProvider>(context).languageData[Provider.of<LanguageProvider>(context).language]["textfield"],
|
||||
labelStyle: const TextStyle(fontSize: 20),
|
||||
border: OutlineInputBorder(
|
||||
borderRadius: BorderRadius.circular(15),
|
||||
),
|
||||
),
|
||||
style: TextStyle(fontSize: 20),
|
||||
);
|
||||
},
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
],
|
||||
),
|
||||
);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user