redesigned / search by submit / fixes

This commit is contained in:
2021-01-25 18:58:00 +01:00
parent 66d35d272c
commit 87e23d3df7
30 changed files with 564 additions and 169 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.2 KiB

After

Width:  |  Height:  |  Size: 4.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.6 KiB

After

Width:  |  Height:  |  Size: 3.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.9 KiB

After

Width:  |  Height:  |  Size: 6.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 10 KiB

After

Width:  |  Height:  |  Size: 9.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 13 KiB

BIN
img/bg.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 663 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 104 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.6 KiB

After

Width:  |  Height:  |  Size: 5.3 KiB

View File

@@ -1,6 +1,7 @@
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import '../services.dart'; import '../services.dart';
import 'dishCard.dart'; import 'dishCard.dart';
import 'package:menui_mobile/localizations.dart';
class DishList extends StatelessWidget { class DishList extends StatelessWidget {
final String id; final String id;
@@ -68,14 +69,14 @@ class DishList extends StatelessWidget {
elevation: 5, elevation: 5,
shape: RoundedRectangleBorder( shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(25)), borderRadius: BorderRadius.circular(25)),
color: Colors.grey[900], color: Colors.orange,
icon: Icon( icon: Icon(
Icons.keyboard_arrow_down_rounded, Icons.keyboard_arrow_down_rounded,
color: Colors.orange, color: Colors.grey[900],
), ),
label: Text( label: Text(
"Zwiń", AppLocalizations.instance.text("hideDishes"),
style: TextStyle(color: Colors.white), style: TextStyle(color: Colors.grey[900]),
), ),
onPressed: () => Navigator.pop(context), onPressed: () => Navigator.pop(context),
))) )))

View File

@@ -8,6 +8,7 @@ import '../settings.dart';
import 'homeScreen.dart'; import 'homeScreen.dart';
import 'package:share/share.dart'; import 'package:share/share.dart';
import 'menuiButton.dart'; import 'menuiButton.dart';
import 'package:menui_mobile/localizations.dart';
class DishView extends StatelessWidget { class DishView extends StatelessWidget {
final Dish dish; final Dish dish;
@@ -19,7 +20,7 @@ class DishView extends StatelessWidget {
duration: Duration(seconds: 2), duration: Duration(seconds: 2),
behavior: SnackBarBehavior.floating, behavior: SnackBarBehavior.floating,
content: Text( content: Text(
"Dodano do zamówienia :)", AppLocalizations.instance.text("addedToOrder"),
style: TextStyle(color: Colors.grey[850]), style: TextStyle(color: Colors.grey[850]),
), ),
); );
@@ -86,7 +87,7 @@ class DishView extends StatelessWidget {
if (dish.allergens.hasAllergens()) SizedBox(height: 8), if (dish.allergens.hasAllergens()) SizedBox(height: 8),
if (dish.allergens.hasAllergens()) if (dish.allergens.hasAllergens())
Text( Text(
'Może zawierać', AppLocalizations.instance.text("mayContain"),
style: TextStyle(color: Colors.orange, fontSize: 14), style: TextStyle(color: Colors.orange, fontSize: 14),
), ),
Allergens(allergens: dish.allergens), Allergens(allergens: dish.allergens),
@@ -110,7 +111,7 @@ class DishView extends StatelessWidget {
height: 6, height: 6,
), ),
Text( Text(
'Składniki', AppLocalizations.instance.text("ingredients"),
style: TextStyle(color: Colors.orange, fontSize: 14), style: TextStyle(color: Colors.orange, fontSize: 14),
), ),
SizedBox( SizedBox(
@@ -139,7 +140,7 @@ class DishView extends StatelessWidget {
children: <Widget>[ children: <Widget>[
IconChip( IconChip(
icon: Icons.battery_charging_full, icon: Icons.battery_charging_full,
leading: "Wartość energetyczna", leading: AppLocalizations.instance.text("energy"),
value: (() { value: (() {
if (dish.kCal != "") { if (dish.kCal != "") {
return dish.kCal + " kcal"; return dish.kCal + " kcal";
@@ -149,7 +150,8 @@ class DishView extends StatelessWidget {
}())), }())),
IconChip( IconChip(
icon: Icons.cake, icon: Icons.cake,
leading: "Indeks glikemiczny", leading:
AppLocalizations.instance.text("glicemicIndex"),
value: dish.glicemicIndex), value: dish.glicemicIndex),
], ],
), ),
@@ -158,7 +160,7 @@ class DishView extends StatelessWidget {
), ),
if (dish.notes != "") if (dish.notes != "")
Text( Text(
'Uwagi', AppLocalizations.instance.text("notes"),
style: TextStyle(color: Colors.orange, fontSize: 14), style: TextStyle(color: Colors.orange, fontSize: 14),
), ),
SizedBox( SizedBox(
@@ -181,7 +183,7 @@ class DishView extends StatelessWidget {
width: 6, width: 6,
), ),
Text( Text(
'Danie wegańskie', AppLocalizations.instance.text("dishVegan"),
style: style:
TextStyle(color: Colors.grey[200], fontSize: 12), TextStyle(color: Colors.grey[200], fontSize: 12),
), ),
@@ -199,17 +201,17 @@ class DishView extends StatelessWidget {
width: 6, width: 6,
), ),
Text( Text(
'Danie wegetariańskie', AppLocalizations.instance.text("dishVegetarian"),
style: style:
TextStyle(color: Colors.grey[200], fontSize: 12), TextStyle(color: Colors.grey[200], fontSize: 12),
), ),
], ],
), ),
SizedBox(
height: 120,
)
], ],
), ),
SizedBox(
height: 28,
)
], ],
)), )),
floatingActionButtonLocation: FloatingActionButtonLocation.centerDocked, floatingActionButtonLocation: FloatingActionButtonLocation.centerDocked,
@@ -221,28 +223,28 @@ class DishView extends StatelessWidget {
MenuiButton( MenuiButton(
color: Colors.orange, color: Colors.orange,
icon: Icons.home_rounded, icon: Icons.home_rounded,
text: "Szukaj", text: AppLocalizations.instance.text("search"),
onPressed: () => Navigator.push( onPressed: () => Navigator.push(
context, MaterialPageRoute(builder: (context) => HomePage())), context, MaterialPageRoute(builder: (context) => HomePage())),
), ),
MenuiButton( MenuiButton(
color: Colors.orange, color: Colors.orange,
icon: Icons.note_rounded, icon: Icons.note_rounded,
text: "Zamównienie", text: AppLocalizations.instance.text("order"),
onPressed: () => Navigator.push(context, onPressed: () => Navigator.push(context,
MaterialPageRoute(builder: (context) => OrderView())), MaterialPageRoute(builder: (context) => OrderView())),
), ),
MenuiButton( MenuiButton(
color: Colors.orange, color: Colors.orange,
icon: Icons.favorite_rounded, icon: Icons.favorite_rounded,
text: "Ulubione", text: AppLocalizations.instance.text("favorites"),
onPressed: () => Navigator.push(context, onPressed: () => Navigator.push(context,
MaterialPageRoute(builder: (context) => FavoritesView())), MaterialPageRoute(builder: (context) => FavoritesView())),
), ),
MenuiButton( MenuiButton(
color: Colors.orange, color: Colors.orange,
icon: Icons.settings, icon: Icons.settings,
text: "Ustawienia", text: AppLocalizations.instance.text("settings"),
onPressed: () { onPressed: () {
showSettings(context, settings); showSettings(context, settings);
}, },
@@ -263,14 +265,14 @@ class DishView extends StatelessWidget {
MenuiButton( MenuiButton(
color: Colors.grey, color: Colors.grey,
icon: Icons.share_rounded, icon: Icons.share_rounded,
text: "Udostępnij", text: AppLocalizations.instance.text("share"),
onPressed: () => Share.share('https://www.menui.pl/dish/${dish.id}', onPressed: () => Share.share('https://www.menui.pl/dish/${dish.id}',
subject: '${dish.name}'), subject: '${dish.name}'),
), ),
MenuiButton( MenuiButton(
color: Colors.grey, color: Colors.grey,
icon: Icons.note_add_rounded, icon: Icons.note_add_rounded,
text: "Do zamówienia", text: AppLocalizations.instance.text("addToOrder"),
onPressed: () { onPressed: () {
showDialog( showDialog(
context: context, context: context,
@@ -319,7 +321,7 @@ class AddToOrderDialogState extends State<AddToOrderDialog> {
Widget build(BuildContext context) { Widget build(BuildContext context) {
return SimpleDialog( return SimpleDialog(
title: Text( title: Text(
'Dodaj do zamówienia', AppLocalizations.instance.text("addToOrder"),
style: TextStyle(color: Colors.white, fontSize: 16), style: TextStyle(color: Colors.white, fontSize: 16),
textAlign: TextAlign.center, textAlign: TextAlign.center,
), ),
@@ -327,7 +329,7 @@ class AddToOrderDialogState extends State<AddToOrderDialog> {
backgroundColor: Colors.grey[850], backgroundColor: Colors.grey[850],
children: [ children: [
Text( Text(
'Ilość', AppLocalizations.instance.text("quantity"),
textAlign: TextAlign.center, textAlign: TextAlign.center,
style: TextStyle(color: Colors.grey), style: TextStyle(color: Colors.grey),
), ),
@@ -370,7 +372,7 @@ class AddToOrderDialogState extends State<AddToOrderDialog> {
Padding( Padding(
padding: EdgeInsets.only(bottom: 8), padding: EdgeInsets.only(bottom: 8),
child: Text( child: Text(
'Wariant', AppLocalizations.instance.text("variant"),
textAlign: TextAlign.center, textAlign: TextAlign.center,
style: TextStyle(color: Colors.grey), style: TextStyle(color: Colors.grey),
), ),
@@ -521,7 +523,9 @@ class AddToOrderDialogState extends State<AddToOrderDialog> {
priceName: priceName)); priceName: priceName));
widget.onSubmit(); widget.onSubmit();
}, },
child: Text('Dodaj'), child: Text(
AppLocalizations.instance.text("add"),
),
), ),
), ),
) )

View File

@@ -1,6 +1,7 @@
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import '../settings.dart'; import '../settings.dart';
import 'menuiButton.dart'; import 'menuiButton.dart';
import 'package:menui_mobile/localizations.dart';
class FavoriteButton extends StatefulWidget { class FavoriteButton extends StatefulWidget {
final String id; final String id;
@@ -33,7 +34,7 @@ class _FavoriteButtonState extends State<FavoriteButton> {
return MenuiButton( return MenuiButton(
color: Colors.orange, color: Colors.orange,
icon: Icons.favorite_rounded, icon: Icons.favorite_rounded,
text: "Usuń", text: AppLocalizations.instance.text("remove"),
onPressed: () { onPressed: () {
settings.addToFavorites(widget.id); settings.addToFavorites(widget.id);
setState(() { setState(() {
@@ -45,7 +46,7 @@ class _FavoriteButtonState extends State<FavoriteButton> {
return MenuiButton( return MenuiButton(
color: Colors.grey, color: Colors.grey,
icon: Icons.favorite_rounded, icon: Icons.favorite_rounded,
text: "Dodaj", text: AppLocalizations.instance.text("add"),
onPressed: () { onPressed: () {
settings.addToFavorites(widget.id); settings.addToFavorites(widget.id);
setState(() { setState(() {
@@ -58,7 +59,7 @@ class _FavoriteButtonState extends State<FavoriteButton> {
return MenuiButton( return MenuiButton(
color: Colors.grey, color: Colors.grey,
icon: Icons.favorite_rounded, icon: Icons.favorite_rounded,
text: "Dodaj", text: AppLocalizations.instance.text("add"),
onPressed: () {}, onPressed: () {},
); );
} }

View File

@@ -1,5 +1,6 @@
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:menui_mobile/components/restaurantCardAsync.dart'; import 'package:menui_mobile/components/restaurantCardAsync.dart';
import 'package:menui_mobile/localizations.dart';
import '../settings.dart'; import '../settings.dart';
import 'homeScreen.dart'; import 'homeScreen.dart';
import 'orderView.dart'; import 'orderView.dart';
@@ -28,7 +29,7 @@ class _FavoritesViewState extends State<FavoritesView> {
body: Container( body: Container(
decoration: BoxDecoration( decoration: BoxDecoration(
image: DecorationImage( image: DecorationImage(
image: AssetImage("img/bg_tile.jpg"), fit: BoxFit.cover)), image: AssetImage("img/bg.png"), fit: BoxFit.cover)),
child: FutureBuilder( child: FutureBuilder(
future: favorites, future: favorites,
builder: (context, snapshot) { builder: (context, snapshot) {
@@ -59,27 +60,27 @@ class _FavoritesViewState extends State<FavoritesView> {
MenuiButton( MenuiButton(
color: Colors.orange, color: Colors.orange,
icon: Icons.home_rounded, icon: Icons.home_rounded,
text: "Szukaj", text: AppLocalizations.instance.text('search'),
onPressed: () => Navigator.push(context, onPressed: () => Navigator.push(context,
MaterialPageRoute(builder: (context) => HomePage())), MaterialPageRoute(builder: (context) => HomePage())),
), ),
MenuiButton( MenuiButton(
color: Colors.orange, color: Colors.orange,
icon: Icons.note_rounded, icon: Icons.note_rounded,
text: "Zamównienie", text: AppLocalizations.instance.text('order'),
onPressed: () => Navigator.push(context, onPressed: () => Navigator.push(context,
MaterialPageRoute(builder: (context) => OrderView())), MaterialPageRoute(builder: (context) => OrderView())),
), ),
MenuiButton( MenuiButton(
color: Colors.orange, color: Colors.orange,
icon: Icons.favorite_rounded, icon: Icons.favorite_rounded,
text: "Ulubione", text: AppLocalizations.instance.text('favorites'),
onPressed: () {}, onPressed: () {},
), ),
MenuiButton( MenuiButton(
color: Colors.orange, color: Colors.orange,
icon: Icons.settings, icon: Icons.settings,
text: "Ustawienia", text: AppLocalizations.instance.text('settings'),
onPressed: () { onPressed: () {
showSettings(context, settings); showSettings(context, settings);
}, },
@@ -89,7 +90,7 @@ class _FavoritesViewState extends State<FavoritesView> {
), ),
appBar: AppBar( appBar: AppBar(
title: Text( title: Text(
'Ulubione', AppLocalizations.instance.text('favorites'),
style: TextStyle(color: Colors.white, fontWeight: FontWeight.w400), style: TextStyle(color: Colors.white, fontWeight: FontWeight.w400),
), ),
backgroundColor: Colors.grey[900], backgroundColor: Colors.grey[900],

View File

@@ -1,5 +1,6 @@
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:menui_mobile/services.dart'; import 'package:menui_mobile/services.dart';
import 'package:menui_mobile/localizations.dart';
enum Tags { enum Tags {
cardPayments, cardPayments,
@@ -96,7 +97,7 @@ class RestaurantFilters extends StatelessWidget {
Padding( Padding(
padding: EdgeInsets.all(8), padding: EdgeInsets.all(8),
child: Text( child: Text(
'Rodzaj kuchni', AppLocalizations.instance.text('typeOfFood'),
style: TextStyle(color: Colors.orange), style: TextStyle(color: Colors.orange),
), ),
), ),
@@ -132,7 +133,7 @@ class RestaurantFilters extends StatelessWidget {
Padding( Padding(
padding: EdgeInsets.all(8), padding: EdgeInsets.all(8),
child: Text( child: Text(
'Tagi', AppLocalizations.instance.text('tags'),
style: TextStyle(color: Colors.orange), style: TextStyle(color: Colors.orange),
), ),
), ),
@@ -141,49 +142,49 @@ class RestaurantFilters extends StatelessWidget {
runSpacing: -12, runSpacing: -12,
children: [ children: [
RestaurantTag( RestaurantTag(
name: "Płatność kartą", name: AppLocalizations.instance.text('cardPayments'),
img: 'img/i_card_black.png', img: 'img/i_card_black.png',
onTapped: () => onSelectTag(Tags.cardPayments), onTapped: () => onSelectTag(Tags.cardPayments),
filters: filters, filters: filters,
filterTag: Tags.cardPayments, filterTag: Tags.cardPayments,
), ),
RestaurantTag( RestaurantTag(
name: "Lubimy zwierzaki", name: AppLocalizations.instance.text('pets'),
img: 'img/i_pets_black.png', img: 'img/i_pets_black.png',
onTapped: () => onSelectTag(Tags.petFriendly), onTapped: () => onSelectTag(Tags.petFriendly),
filters: filters, filters: filters,
filterTag: Tags.petFriendly, filterTag: Tags.petFriendly,
), ),
RestaurantTag( RestaurantTag(
name: "Bez glutenu", name: AppLocalizations.instance.text('glutenFree'),
img: 'img/i_glutenFree_black.png', img: 'img/i_glutenFree_black.png',
onTapped: () => onSelectTag(Tags.glutenFree), onTapped: () => onSelectTag(Tags.glutenFree),
filters: filters, filters: filters,
filterTag: Tags.glutenFree, filterTag: Tags.glutenFree,
), ),
RestaurantTag( RestaurantTag(
name: "Wegańskie", name: AppLocalizations.instance.text('vegan'),
img: 'img/i_vegan_black.png', img: 'img/i_vegan_black.png',
onTapped: () => onSelectTag(Tags.vegan), onTapped: () => onSelectTag(Tags.vegan),
filters: filters, filters: filters,
filterTag: Tags.vegan, filterTag: Tags.vegan,
), ),
RestaurantTag( RestaurantTag(
name: "Wegetariańskie", name: AppLocalizations.instance.text('vegetarian'),
img: 'img/i_vegetarian_black.png', img: 'img/i_vegetarian_black.png',
onTapped: () => onSelectTag(Tags.vegetarian), onTapped: () => onSelectTag(Tags.vegetarian),
filters: filters, filters: filters,
filterTag: Tags.vegetarian, filterTag: Tags.vegetarian,
), ),
RestaurantTag( RestaurantTag(
name: "Alkohol", name: AppLocalizations.instance.text('alcohol'),
img: 'img/i_alcohol_black.png', img: 'img/i_alcohol_black.png',
onTapped: () => onSelectTag(Tags.alcohol), onTapped: () => onSelectTag(Tags.alcohol),
filters: filters, filters: filters,
filterTag: Tags.alcohol, filterTag: Tags.alcohol,
), ),
RestaurantTag( RestaurantTag(
name: "Dowozimy", name: AppLocalizations.instance.text('delivery'),
img: 'img/i_delivery_black.png', img: 'img/i_delivery_black.png',
onTapped: () => onSelectTag(Tags.delivery), onTapped: () => onSelectTag(Tags.delivery),
filters: filters, filters: filters,

View File

@@ -1,4 +1,5 @@
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:menui_mobile/localizations.dart';
import 'searchBar.dart'; import 'searchBar.dart';
import '../settings.dart'; import '../settings.dart';
import 'mapView.dart'; import 'mapView.dart';
@@ -11,11 +12,12 @@ class HomePage extends StatelessWidget {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
settings.initLanguage(context);
return Scaffold( return Scaffold(
body: Container( body: Container(
decoration: BoxDecoration( decoration: BoxDecoration(
image: DecorationImage( image: DecorationImage(
image: AssetImage("img/bg_tile.jpg"), fit: BoxFit.cover)), image: AssetImage("img/bg.png"), fit: BoxFit.cover)),
child: Center( child: Center(
child: Column( child: Column(
mainAxisAlignment: MainAxisAlignment.center, mainAxisAlignment: MainAxisAlignment.center,
@@ -26,7 +28,7 @@ class HomePage extends StatelessWidget {
), ),
MenuiSearchBar(''), MenuiSearchBar(''),
Text( Text(
'lub', AppLocalizations.instance.text('or'),
style: TextStyle(color: Colors.grey[500]), style: TextStyle(color: Colors.grey[500]),
), ),
RaisedButton.icon( RaisedButton.icon(
@@ -38,7 +40,7 @@ class HomePage extends StatelessWidget {
color: Colors.orange, color: Colors.orange,
), ),
label: Text( label: Text(
'Pokaż w pobliżu', AppLocalizations.instance.text('geosearch'),
style: TextStyle(color: Colors.grey[300]), style: TextStyle(color: Colors.grey[300]),
), ),
shape: RoundedRectangleBorder( shape: RoundedRectangleBorder(
@@ -57,27 +59,27 @@ class HomePage extends StatelessWidget {
MenuiButton( MenuiButton(
color: Colors.orange, color: Colors.orange,
icon: Icons.home_rounded, icon: Icons.home_rounded,
text: "Szukaj", text: AppLocalizations.instance.text('search'),
onPressed: () {}, onPressed: () {},
), ),
MenuiButton( MenuiButton(
color: Colors.orange, color: Colors.orange,
icon: Icons.note_rounded, icon: Icons.note_rounded,
text: "Zamównienie", text: AppLocalizations.instance.text('order'),
onPressed: () => Navigator.push(context, onPressed: () => Navigator.push(context,
MaterialPageRoute(builder: (context) => OrderView())), MaterialPageRoute(builder: (context) => OrderView())),
), ),
MenuiButton( MenuiButton(
color: Colors.orange, color: Colors.orange,
icon: Icons.favorite_rounded, icon: Icons.favorite_rounded,
text: "Ulubione", text: AppLocalizations.instance.text('favorites'),
onPressed: () => Navigator.push(context, onPressed: () => Navigator.push(context,
MaterialPageRoute(builder: (context) => FavoritesView())), MaterialPageRoute(builder: (context) => FavoritesView())),
), ),
MenuiButton( MenuiButton(
color: Colors.orange, color: Colors.orange,
icon: Icons.settings, icon: Icons.settings,
text: "Ustawienia", text: AppLocalizations.instance.text('settings'),
onPressed: () { onPressed: () {
showSettings(context, settings); showSettings(context, settings);
}, },

View File

@@ -1,5 +1,6 @@
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import '../services.dart'; import '../services.dart';
import 'package:menui_mobile/localizations.dart';
class Allergens extends StatelessWidget { class Allergens extends StatelessWidget {
final MenuiAllergens allergens; final MenuiAllergens allergens;
@@ -32,7 +33,7 @@ class Allergens extends StatelessWidget {
height: 26, height: 26,
), ),
Text( Text(
'Jaja', AppLocalizations.instance.text('eggs'),
style: style:
TextStyle(fontSize: fontSize, color: Colors.grey[300]), TextStyle(fontSize: fontSize, color: Colors.grey[300]),
) )
@@ -53,7 +54,7 @@ class Allergens extends StatelessWidget {
height: 26, height: 26,
), ),
Text( Text(
'Gluten', AppLocalizations.instance.text('gluten'),
style: style:
TextStyle(fontSize: fontSize, color: Colors.grey[300]), TextStyle(fontSize: fontSize, color: Colors.grey[300]),
) )
@@ -74,7 +75,7 @@ class Allergens extends StatelessWidget {
height: 26, height: 26,
), ),
Text( Text(
'Laktoza', AppLocalizations.instance.text('lactose'),
style: style:
TextStyle(fontSize: fontSize, color: Colors.grey[300]), TextStyle(fontSize: fontSize, color: Colors.grey[300]),
) )
@@ -95,7 +96,7 @@ class Allergens extends StatelessWidget {
height: 26, height: 26,
), ),
Text( Text(
'Orzechy', AppLocalizations.instance.text('peanuts'),
style: style:
TextStyle(fontSize: fontSize, color: Colors.grey[300]), TextStyle(fontSize: fontSize, color: Colors.grey[300]),
) )
@@ -116,7 +117,7 @@ class Allergens extends StatelessWidget {
height: 26, height: 26,
), ),
Text( Text(
'Owoce morza', AppLocalizations.instance.text('seaFood'),
style: style:
TextStyle(fontSize: fontSize, color: Colors.grey[300]), TextStyle(fontSize: fontSize, color: Colors.grey[300]),
) )
@@ -137,7 +138,7 @@ class Allergens extends StatelessWidget {
height: 26, height: 26,
), ),
Text( Text(
'Sezam', AppLocalizations.instance.text('sesame'),
style: style:
TextStyle(fontSize: fontSize, color: Colors.grey[300]), TextStyle(fontSize: fontSize, color: Colors.grey[300]),
) )
@@ -158,7 +159,7 @@ class Allergens extends StatelessWidget {
height: 26, height: 26,
), ),
Text( Text(
'Soja', AppLocalizations.instance.text('soy'),
style: style:
TextStyle(fontSize: fontSize, color: Colors.grey[300]), TextStyle(fontSize: fontSize, color: Colors.grey[300]),
) )

View File

@@ -1,5 +1,6 @@
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'filters.dart'; import 'filters.dart';
import 'package:menui_mobile/localizations.dart';
class LineOfIcons extends StatelessWidget { class LineOfIcons extends StatelessWidget {
final List<Tags> tags; final List<Tags> tags;
@@ -32,7 +33,7 @@ class LineOfIcons extends StatelessWidget {
height: 26, height: 26,
), ),
Text( Text(
'Alkohol', AppLocalizations.instance.text('alcohol'),
style: style:
TextStyle(fontSize: fontSize, color: Colors.grey[300]), TextStyle(fontSize: fontSize, color: Colors.grey[300]),
) )
@@ -54,12 +55,12 @@ class LineOfIcons extends StatelessWidget {
height: 26, height: 26,
), ),
Text( Text(
'Płatność', AppLocalizations.instance.text('cardPayments1'),
style: style:
TextStyle(fontSize: fontSize, color: Colors.grey[300]), TextStyle(fontSize: fontSize, color: Colors.grey[300]),
), ),
Text( Text(
'kar', AppLocalizations.instance.text('cardPayments2'),
style: style:
TextStyle(fontSize: fontSize, color: Colors.grey[300]), TextStyle(fontSize: fontSize, color: Colors.grey[300]),
) )
@@ -80,7 +81,7 @@ class LineOfIcons extends StatelessWidget {
height: 26, height: 26,
), ),
Text( Text(
'Dowozimy', AppLocalizations.instance.text('delivery'),
style: style:
TextStyle(fontSize: fontSize, color: Colors.grey[300]), TextStyle(fontSize: fontSize, color: Colors.grey[300]),
) )
@@ -101,7 +102,7 @@ class LineOfIcons extends StatelessWidget {
height: 26, height: 26,
), ),
Text( Text(
'Bezglutenowe', AppLocalizations.instance.text('glutenFree'),
style: style:
TextStyle(fontSize: fontSize, color: Colors.grey[300]), TextStyle(fontSize: fontSize, color: Colors.grey[300]),
) )
@@ -122,12 +123,12 @@ class LineOfIcons extends StatelessWidget {
height: 26, height: 26,
), ),
Text( Text(
'Lubimy', AppLocalizations.instance.text('pets1'),
style: style:
TextStyle(fontSize: fontSize, color: Colors.grey[300]), TextStyle(fontSize: fontSize, color: Colors.grey[300]),
), ),
Text( Text(
'zwierzaczki', AppLocalizations.instance.text('pets2'),
style: style:
TextStyle(fontSize: fontSize, color: Colors.grey[300]), TextStyle(fontSize: fontSize, color: Colors.grey[300]),
) )
@@ -148,7 +149,7 @@ class LineOfIcons extends StatelessWidget {
height: 26, height: 26,
), ),
Text( Text(
'Wegańskie', AppLocalizations.instance.text('vegan'),
style: style:
TextStyle(fontSize: fontSize, color: Colors.grey[300]), TextStyle(fontSize: fontSize, color: Colors.grey[300]),
) )
@@ -169,7 +170,7 @@ class LineOfIcons extends StatelessWidget {
height: 26, height: 26,
), ),
Text( Text(
'Wegetariańskie', AppLocalizations.instance.text('vegetarian'),
style: style:
TextStyle(fontSize: fontSize, color: Colors.grey[300]), TextStyle(fontSize: fontSize, color: Colors.grey[300]),
) )

View File

@@ -9,6 +9,7 @@ import 'restaurantView.dart';
import 'menuiButton.dart'; import 'menuiButton.dart';
import 'orderView.dart'; import 'orderView.dart';
import 'favoritesView.dart'; import 'favoritesView.dart';
import 'package:menui_mobile/localizations.dart';
class MapView extends StatefulWidget { class MapView extends StatefulWidget {
@override @override
@@ -78,7 +79,8 @@ class MapViewState extends State<MapView> with SingleTickerProviderStateMixin {
builder: (context) => builder: (context) =>
RestaurantView(id: thisRestaurant.id))), RestaurantView(id: thisRestaurant.id))),
title: '${thisRestaurant.name}', title: '${thisRestaurant.name}',
snippet: 'Kuchnia: ${thisRestaurant.type}')); snippet:
'${AppLocalizations.instance.text('type')} ${thisRestaurant.type}'));
markers[markerId] = marker; markers[markerId] = marker;
} }
} }
@@ -157,7 +159,7 @@ class MapViewState extends State<MapView> with SingleTickerProviderStateMixin {
color: Colors.orange, color: Colors.orange,
), ),
Text( Text(
'Promień', AppLocalizations.instance.text("radius"),
style: TextStyle( style: TextStyle(
color: Colors.grey[200], color: Colors.grey[200],
fontSize: 11, fontSize: 11,
@@ -198,7 +200,7 @@ class MapViewState extends State<MapView> with SingleTickerProviderStateMixin {
color: Colors.orange, color: Colors.orange,
), ),
Text( Text(
'Filtry', AppLocalizations.instance.text("filter"),
style: TextStyle( style: TextStyle(
color: Colors.grey[200], color: Colors.grey[200],
fontSize: 11, fontSize: 11,
@@ -254,7 +256,7 @@ class MapViewState extends State<MapView> with SingleTickerProviderStateMixin {
color: Colors.orange, color: Colors.orange,
), ),
Text( Text(
'Znaleziono: ${data.markers.length}', '${AppLocalizations.instance.text('foundCounter')} ${data.markers.length}',
style: style:
TextStyle(color: Colors.white, fontSize: 12), TextStyle(color: Colors.white, fontSize: 12),
), ),
@@ -282,13 +284,13 @@ class MapViewState extends State<MapView> with SingleTickerProviderStateMixin {
MenuiButton( MenuiButton(
color: Colors.orange, color: Colors.orange,
icon: Icons.home_rounded, icon: Icons.home_rounded,
text: "Szukaj", text: AppLocalizations.instance.text("search"),
onPressed: () => Navigator.pop(context), onPressed: () => Navigator.pop(context),
), ),
MenuiButton( MenuiButton(
color: Colors.orange, color: Colors.orange,
icon: Icons.note_rounded, icon: Icons.note_rounded,
text: "Zamównienie", text: AppLocalizations.instance.text("order"),
onPressed: () => Navigator.push( onPressed: () => Navigator.push(
context, context,
MaterialPageRoute( MaterialPageRoute(
@@ -297,7 +299,7 @@ class MapViewState extends State<MapView> with SingleTickerProviderStateMixin {
MenuiButton( MenuiButton(
color: Colors.orange, color: Colors.orange,
icon: Icons.favorite_rounded, icon: Icons.favorite_rounded,
text: "Ulubione", text: AppLocalizations.instance.text("favorites"),
onPressed: () => Navigator.push( onPressed: () => Navigator.push(
context, context,
MaterialPageRoute( MaterialPageRoute(
@@ -306,7 +308,7 @@ class MapViewState extends State<MapView> with SingleTickerProviderStateMixin {
MenuiButton( MenuiButton(
color: Colors.orange, color: Colors.orange,
icon: Icons.settings, icon: Icons.settings,
text: "Ustawienia", text: AppLocalizations.instance.text("settings"),
onPressed: () { onPressed: () {
showSettings(context, settings); showSettings(context, settings);
}, },
@@ -321,7 +323,7 @@ class MapViewState extends State<MapView> with SingleTickerProviderStateMixin {
child: Column( child: Column(
mainAxisAlignment: MainAxisAlignment.center, mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.center, crossAxisAlignment: CrossAxisAlignment.center,
children: [Text("Błąd...")], children: [Text(AppLocalizations.instance.text("error"))],
), ),
); );
} else { } else {
@@ -342,7 +344,7 @@ class MapViewState extends State<MapView> with SingleTickerProviderStateMixin {
Padding( Padding(
padding: EdgeInsets.only(top: 16), padding: EdgeInsets.only(top: 16),
child: Text( child: Text(
'Szukam restauracji...', AppLocalizations.instance.text("searching"),
style: TextStyle(color: Colors.grey[200]), style: TextStyle(color: Colors.grey[200]),
), ),
) )

View File

@@ -4,6 +4,7 @@ import '../settings.dart';
import 'homeScreen.dart'; import 'homeScreen.dart';
import 'favoritesView.dart'; import 'favoritesView.dart';
import 'menuiButton.dart'; import 'menuiButton.dart';
import 'package:menui_mobile/localizations.dart';
class OrderView extends StatefulWidget { class OrderView extends StatefulWidget {
final settings = new MenuiSettings(); final settings = new MenuiSettings();
@@ -19,7 +20,7 @@ class OrderViewState extends State<OrderView> {
body: Container( body: Container(
decoration: BoxDecoration( decoration: BoxDecoration(
image: DecorationImage( image: DecorationImage(
image: AssetImage("img/bg_tile.jpg"), fit: BoxFit.cover)), image: AssetImage("img/bg.png"), fit: BoxFit.cover)),
child: Column( child: Column(
children: <Widget>[ children: <Widget>[
FutureBuilder( FutureBuilder(
@@ -48,7 +49,7 @@ class OrderViewState extends State<OrderView> {
child: Padding( child: Padding(
padding: EdgeInsets.only(top: 50), padding: EdgeInsets.only(top: 50),
child: Text( child: Text(
"Zamówienie jest puste.", AppLocalizations.instance.text('orderEmpty'),
style: TextStyle(color: Colors.grey), style: TextStyle(color: Colors.grey),
), ),
)), )),
@@ -75,27 +76,27 @@ class OrderViewState extends State<OrderView> {
MenuiButton( MenuiButton(
color: Colors.orange, color: Colors.orange,
icon: Icons.home_rounded, icon: Icons.home_rounded,
text: "Szukaj", text: AppLocalizations.instance.text('search'),
onPressed: () => Navigator.push(context, onPressed: () => Navigator.push(context,
MaterialPageRoute(builder: (context) => HomePage())), MaterialPageRoute(builder: (context) => HomePage())),
), ),
MenuiButton( MenuiButton(
color: Colors.orange, color: Colors.orange,
icon: Icons.note_rounded, icon: Icons.note_rounded,
text: "Zamównienie", text: AppLocalizations.instance.text('order'),
onPressed: () {}, onPressed: () {},
), ),
MenuiButton( MenuiButton(
color: Colors.orange, color: Colors.orange,
icon: Icons.favorite_rounded, icon: Icons.favorite_rounded,
text: "Ulubione", text: AppLocalizations.instance.text('favorites'),
onPressed: () => Navigator.push(context, onPressed: () => Navigator.push(context,
MaterialPageRoute(builder: (context) => FavoritesView())), MaterialPageRoute(builder: (context) => FavoritesView())),
), ),
MenuiButton( MenuiButton(
color: Colors.orange, color: Colors.orange,
icon: Icons.settings, icon: Icons.settings,
text: "Ustawienia", text: AppLocalizations.instance.text('settings'),
onPressed: () { onPressed: () {
showSettings(context, widget.settings); showSettings(context, widget.settings);
}, },
@@ -105,7 +106,7 @@ class OrderViewState extends State<OrderView> {
), ),
appBar: AppBar( appBar: AppBar(
title: Text( title: Text(
'Zamówienie', AppLocalizations.instance.text('order'),
style: TextStyle(color: Colors.white, fontWeight: FontWeight.w400), style: TextStyle(color: Colors.white, fontWeight: FontWeight.w400),
), ),
backgroundColor: Colors.grey[900], backgroundColor: Colors.grey[900],
@@ -123,7 +124,7 @@ class OrderViewState extends State<OrderView> {
widget.settings.clearOrder(); widget.settings.clearOrder();
setState(() {}); setState(() {});
}, },
text: "Wyczyść", text: AppLocalizations.instance.text('clear'),
icon: Icons.delete_forever_rounded, icon: Icons.delete_forever_rounded,
), ),
], ],

View File

@@ -6,6 +6,7 @@ import 'orderView.dart';
import 'favoritesView.dart'; import 'favoritesView.dart';
import 'homeScreen.dart'; import 'homeScreen.dart';
import 'menuiButton.dart'; import 'menuiButton.dart';
import 'package:menui_mobile/localizations.dart';
class RestaurantMapView extends StatefulWidget { class RestaurantMapView extends StatefulWidget {
final List coordinates; final List coordinates;
@@ -35,7 +36,9 @@ class RestaurantMapViewState extends State<RestaurantMapView> {
markerId: markerId, markerId: markerId,
position: LatLng(widget.coordinates[0], widget.coordinates[1]), position: LatLng(widget.coordinates[0], widget.coordinates[1]),
infoWindow: InfoWindow( infoWindow: InfoWindow(
title: '${widget.name}', snippet: 'Kuchnia: ${widget.type}')); title: '${widget.name}',
snippet:
'${AppLocalizations.instance.text('type')} ${widget.type}'));
setState(() { setState(() {
markers[MarkerId("restaurant-marker")] = marker; markers[MarkerId("restaurant-marker")] = marker;
}); });
@@ -58,28 +61,28 @@ class RestaurantMapViewState extends State<RestaurantMapView> {
MenuiButton( MenuiButton(
color: Colors.orange, color: Colors.orange,
icon: Icons.home_rounded, icon: Icons.home_rounded,
text: "Szukaj", text: AppLocalizations.instance.text('search'),
onPressed: () => Navigator.push( onPressed: () => Navigator.push(
context, MaterialPageRoute(builder: (context) => HomePage())), context, MaterialPageRoute(builder: (context) => HomePage())),
), ),
MenuiButton( MenuiButton(
color: Colors.orange, color: Colors.orange,
icon: Icons.note_rounded, icon: Icons.note_rounded,
text: "Zamównienie", text: AppLocalizations.instance.text('order'),
onPressed: () => Navigator.push(context, onPressed: () => Navigator.push(context,
MaterialPageRoute(builder: (context) => OrderView())), MaterialPageRoute(builder: (context) => OrderView())),
), ),
MenuiButton( MenuiButton(
color: Colors.orange, color: Colors.orange,
icon: Icons.favorite_rounded, icon: Icons.favorite_rounded,
text: "Ulubione", text: AppLocalizations.instance.text('favorites'),
onPressed: () => Navigator.push(context, onPressed: () => Navigator.push(context,
MaterialPageRoute(builder: (context) => FavoritesView())), MaterialPageRoute(builder: (context) => FavoritesView())),
), ),
MenuiButton( MenuiButton(
color: Colors.orange, color: Colors.orange,
icon: Icons.settings, icon: Icons.settings,
text: "Ustawienia", text: AppLocalizations.instance.text('settings'),
onPressed: () { onPressed: () {
showSettings(context, settings); showSettings(context, settings);
}, },

View File

@@ -11,6 +11,7 @@ import 'homeScreen.dart';
import 'package:share/share.dart'; import 'package:share/share.dart';
import 'favoriteButton.dart'; import 'favoriteButton.dart';
import 'menuiButton.dart'; import 'menuiButton.dart';
import 'package:menui_mobile/localizations.dart';
class RestaurantView extends StatefulWidget { class RestaurantView extends StatefulWidget {
final String id; final String id;
@@ -118,7 +119,7 @@ class _RestaurantViewState extends State<RestaurantView> {
height: 8, height: 8,
), ),
Text( Text(
'Informacje', AppLocalizations.instance.text('info'),
style: TextStyle( style: TextStyle(
color: Colors.orange, fontSize: 14), color: Colors.orange, fontSize: 14),
), ),
@@ -126,23 +127,26 @@ class _RestaurantViewState extends State<RestaurantView> {
height: 6, height: 6,
), ),
MenuiDoubleColorText( MenuiDoubleColorText(
leading: 'Kuchnia: ', leading:
'${AppLocalizations.instance.text('type')} ',
following: '${restaurant.type}', following: '${restaurant.type}',
), ),
MenuiDoubleColorText( MenuiDoubleColorText(
leading: 'Adres: ', leading:
'${AppLocalizations.instance.text('adress')} ',
following: following:
'${restaurant.city}, ${restaurant.adress}', '${restaurant.city}, ${restaurant.adress}',
), ),
MenuiDoubleColorText( MenuiDoubleColorText(
leading: 'Kontakt: ', leading:
'${AppLocalizations.instance.text('contact')} ',
following: '${restaurant.phone}', following: '${restaurant.phone}',
), ),
SizedBox( SizedBox(
height: 12, height: 12,
), ),
Text( Text(
'Godziny otwarcia', AppLocalizations.instance.text('hours'),
style: TextStyle( style: TextStyle(
color: Colors.orange, fontSize: 14), color: Colors.orange, fontSize: 14),
), ),
@@ -155,7 +159,7 @@ class _RestaurantViewState extends State<RestaurantView> {
height: 12, height: 12,
), ),
Text( Text(
'Social media', AppLocalizations.instance.text('social'),
style: TextStyle( style: TextStyle(
color: Colors.orange, fontSize: 14), color: Colors.orange, fontSize: 14),
), ),
@@ -170,7 +174,7 @@ class _RestaurantViewState extends State<RestaurantView> {
), ),
), ),
SizedBox( SizedBox(
height: 80, height: 120,
) )
], ],
) )
@@ -192,14 +196,14 @@ class _RestaurantViewState extends State<RestaurantView> {
elevation: 5, elevation: 5,
shape: RoundedRectangleBorder( shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(25)), borderRadius: BorderRadius.circular(25)),
color: Colors.grey[900], color: Colors.orange,
icon: Icon( icon: Icon(
Icons.keyboard_arrow_up_rounded, Icons.keyboard_arrow_up_rounded,
color: Colors.orange, color: Colors.grey[900],
), ),
label: Text( label: Text(
"Karta dań", AppLocalizations.instance.text('showDishes'),
style: TextStyle(color: Colors.white), style: TextStyle(color: Colors.grey[900]),
), ),
onPressed: () => onPressed: () =>
showMenu(context, restaurant.categories), showMenu(context, restaurant.categories),
@@ -215,7 +219,7 @@ class _RestaurantViewState extends State<RestaurantView> {
MenuiButton( MenuiButton(
color: Colors.orange, color: Colors.orange,
icon: Icons.home_rounded, icon: Icons.home_rounded,
text: "Szukaj", text: AppLocalizations.instance.text('search'),
onPressed: () => Navigator.push( onPressed: () => Navigator.push(
context, context,
MaterialPageRoute( MaterialPageRoute(
@@ -224,7 +228,7 @@ class _RestaurantViewState extends State<RestaurantView> {
MenuiButton( MenuiButton(
color: Colors.orange, color: Colors.orange,
icon: Icons.note_rounded, icon: Icons.note_rounded,
text: "Zamównienie", text: AppLocalizations.instance.text('order'),
onPressed: () => Navigator.push( onPressed: () => Navigator.push(
context, context,
MaterialPageRoute( MaterialPageRoute(
@@ -233,7 +237,7 @@ class _RestaurantViewState extends State<RestaurantView> {
MenuiButton( MenuiButton(
color: Colors.orange, color: Colors.orange,
icon: Icons.favorite_rounded, icon: Icons.favorite_rounded,
text: "Ulubione", text: AppLocalizations.instance.text('favorites'),
onPressed: () => Navigator.push( onPressed: () => Navigator.push(
context, context,
MaterialPageRoute( MaterialPageRoute(
@@ -242,7 +246,7 @@ class _RestaurantViewState extends State<RestaurantView> {
MenuiButton( MenuiButton(
color: Colors.orange, color: Colors.orange,
icon: Icons.settings, icon: Icons.settings,
text: "Ustawienia", text: AppLocalizations.instance.text('settings'),
onPressed: () { onPressed: () {
showSettings(context, settings); showSettings(context, settings);
}, },
@@ -265,7 +269,7 @@ class _RestaurantViewState extends State<RestaurantView> {
MenuiButton( MenuiButton(
color: Colors.grey, color: Colors.grey,
icon: Icons.map_rounded, icon: Icons.map_rounded,
text: "Mapa", text: AppLocalizations.instance.text('map'),
onPressed: () => Navigator.push( onPressed: () => Navigator.push(
context, context,
MaterialPageRoute( MaterialPageRoute(
@@ -278,7 +282,7 @@ class _RestaurantViewState extends State<RestaurantView> {
MenuiButton( MenuiButton(
color: Colors.grey, color: Colors.grey,
icon: Icons.share_rounded, icon: Icons.share_rounded,
text: "Udostępnij", text: AppLocalizations.instance.text('share'),
onPressed: () => Share.share( onPressed: () => Share.share(
'https://www.menui.pl/restaurant/${restaurant.id}', 'https://www.menui.pl/restaurant/${restaurant.id}',
subject: '${restaurant.name}'), subject: '${restaurant.name}'),
@@ -350,7 +354,7 @@ class WorkingHoursDay extends StatelessWidget {
String formatTodayHours(String hours) { String formatTodayHours(String hours) {
if (hours == "") { if (hours == "") {
return 'nieczynne'; return AppLocalizations.instance.text('closed');
} else { } else {
return hours; return hours;
} }
@@ -412,13 +416,20 @@ class WorkingHoursList extends StatelessWidget {
runSpacing: 8.0, runSpacing: 8.0,
alignment: WrapAlignment.center, alignment: WrapAlignment.center,
children: <Widget>[ children: <Widget>[
WorkingHoursDay('Pn', workingHours.pn, 1), WorkingHoursDay(
WorkingHoursDay('Wt', workingHours.wt, 2), AppLocalizations.instance.text('mo'), workingHours.pn, 1),
WorkingHoursDay('Śr', workingHours.sr, 3), WorkingHoursDay(
WorkingHoursDay('Cz', workingHours.cz, 4), AppLocalizations.instance.text('tu'), workingHours.wt, 2),
WorkingHoursDay('Pt', workingHours.pt, 5), WorkingHoursDay(
WorkingHoursDay('So', workingHours.sb, 6), AppLocalizations.instance.text('we'), workingHours.sr, 3),
WorkingHoursDay('Nd', workingHours.nd, 7), WorkingHoursDay(
AppLocalizations.instance.text('th'), workingHours.cz, 4),
WorkingHoursDay(
AppLocalizations.instance.text('fr'), workingHours.pt, 5),
WorkingHoursDay(
AppLocalizations.instance.text('sa'), workingHours.sb, 6),
WorkingHoursDay(
AppLocalizations.instance.text('su'), workingHours.nd, 7),
], ],
); );
} }

View File

@@ -1,6 +1,7 @@
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import '../services.dart'; import '../services.dart';
import 'searchResults.dart'; import 'searchResults.dart';
import 'package:menui_mobile/localizations.dart';
class MenuiSearchBar extends StatefulWidget { class MenuiSearchBar extends StatefulWidget {
final String initialValue; final String initialValue;
@@ -82,7 +83,7 @@ class MenuiSearchBarState extends State<MenuiSearchBar> {
return OverlayEntry( return OverlayEntry(
builder: (context) => GestureDetector( builder: (context) => GestureDetector(
behavior: HitTestBehavior.translucent, behavior: HitTestBehavior.opaque,
onTap: () { onTap: () {
FocusScopeNode currentFocus = FocusScope.of(context); FocusScopeNode currentFocus = FocusScope.of(context);
if (!currentFocus.hasPrimaryFocus) { if (!currentFocus.hasPrimaryFocus) {
@@ -162,22 +163,28 @@ class MenuiSearchBarState extends State<MenuiSearchBar> {
padding: padding:
const EdgeInsets.symmetric(vertical: 8, horizontal: 12), const EdgeInsets.symmetric(vertical: 8, horizontal: 12),
child: TextFormField( child: TextFormField(
onFieldSubmitted: (text) => searchRestaurantsByString(),
controller: _controller, controller: _controller,
style: TextStyle(color: Colors.orange, fontSize: 14), style: TextStyle(color: Colors.orange, fontSize: 14),
decoration: InputDecoration( decoration: InputDecoration(
hintStyle: TextStyle(color: Colors.grey), filled: true,
fillColor: Colors.grey[900],
hintStyle: TextStyle(color: Colors.grey[200]),
enabledBorder: OutlineInputBorder( enabledBorder: OutlineInputBorder(
borderSide: borderSide:
BorderSide(color: Colors.grey, width: 1.0), BorderSide(color: Colors.grey[900], width: 1.0),
borderRadius: BorderRadius.circular(16)), borderRadius: BorderRadius.circular(16)),
focusedBorder: OutlineInputBorder( focusedBorder: OutlineInputBorder(
borderSide: borderSide:
BorderSide(color: Colors.orange, width: 2.0), BorderSide(color: Colors.orange, width: 2.0),
borderRadius: BorderRadius.circular(20)), borderRadius: BorderRadius.circular(20)),
hintText: 'Wyszukaj miasto lub nazwę restauracji.', hintText: AppLocalizations.instance.text('searchbar'),
suffixIcon: Icon( suffixIcon: IconButton(
Icons.search, onPressed: () => searchRestaurantsByString(),
color: Colors.orange, icon: Icon(
Icons.search,
color: Colors.orange,
),
)), )),
validator: (value) { validator: (value) {
if (value.isEmpty) { if (value.isEmpty) {

View File

@@ -8,6 +8,7 @@ import 'orderView.dart';
import 'favoritesView.dart'; import 'favoritesView.dart';
import '../settings.dart'; import '../settings.dart';
import 'filters.dart'; import 'filters.dart';
import 'package:menui_mobile/localizations.dart';
class SearchResults extends StatefulWidget { class SearchResults extends StatefulWidget {
SearchResults( SearchResults(
@@ -67,7 +68,7 @@ class _SearchResultsState extends State<SearchResults>
body: Container( body: Container(
decoration: BoxDecoration( decoration: BoxDecoration(
image: DecorationImage( image: DecorationImage(
image: AssetImage("img/bg_tile.jpg"), fit: BoxFit.cover)), image: AssetImage("img/bg.png"), fit: BoxFit.cover)),
child: Column( child: Column(
mainAxisAlignment: MainAxisAlignment.start, mainAxisAlignment: MainAxisAlignment.start,
children: <Widget>[ children: <Widget>[
@@ -138,28 +139,28 @@ class _SearchResultsState extends State<SearchResults>
MenuiButton( MenuiButton(
color: Colors.orange, color: Colors.orange,
icon: Icons.home_rounded, icon: Icons.home_rounded,
text: "Szukaj", text: AppLocalizations.instance.text('search'),
onPressed: () => Navigator.push( onPressed: () => Navigator.push(
context, MaterialPageRoute(builder: (context) => HomePage())), context, MaterialPageRoute(builder: (context) => HomePage())),
), ),
MenuiButton( MenuiButton(
color: Colors.orange, color: Colors.orange,
icon: Icons.note_rounded, icon: Icons.note_rounded,
text: "Zamównienie", text: AppLocalizations.instance.text('order'),
onPressed: () => Navigator.push(context, onPressed: () => Navigator.push(context,
MaterialPageRoute(builder: (context) => OrderView())), MaterialPageRoute(builder: (context) => OrderView())),
), ),
MenuiButton( MenuiButton(
color: Colors.orange, color: Colors.orange,
icon: Icons.favorite_rounded, icon: Icons.favorite_rounded,
text: "Ulubione", text: AppLocalizations.instance.text('favorites'),
onPressed: () => Navigator.push(context, onPressed: () => Navigator.push(context,
MaterialPageRoute(builder: (context) => FavoritesView())), MaterialPageRoute(builder: (context) => FavoritesView())),
), ),
MenuiButton( MenuiButton(
color: Colors.orange, color: Colors.orange,
icon: Icons.settings, icon: Icons.settings,
text: "Ustawienia", text: AppLocalizations.instance.text('settings'),
onPressed: () { onPressed: () {
showSettings(context, widget.settings); showSettings(context, widget.settings);
}, },
@@ -169,7 +170,7 @@ class _SearchResultsState extends State<SearchResults>
), ),
appBar: AppBar( appBar: AppBar(
title: Text( title: Text(
'Znaleziono: ${filteredRestaurants.length}', '${AppLocalizations.instance.text('foundCounter')} ${filteredRestaurants.length}',
style: TextStyle( style: TextStyle(
color: Colors.white, fontSize: 14, fontWeight: FontWeight.w400), color: Colors.white, fontSize: 14, fontWeight: FontWeight.w400),
), ),
@@ -185,7 +186,7 @@ class _SearchResultsState extends State<SearchResults>
MenuiButton( MenuiButton(
color: Colors.grey, color: Colors.grey,
icon: Icons.filter_alt_rounded, icon: Icons.filter_alt_rounded,
text: "Filtruj", text: AppLocalizations.instance.text('filter'),
onPressed: () { onPressed: () {
setState(() { setState(() {
expand = !expand; expand = !expand;

46
lib/localizations.dart Normal file
View File

@@ -0,0 +1,46 @@
import 'dart:async';
import 'dart:convert';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
class AppLocalizations {
static final AppLocalizations _singleton = new AppLocalizations._internal();
AppLocalizations._internal();
static AppLocalizations get instance => _singleton;
Map<dynamic, dynamic> _localisedValues;
Locale _currentLocale;
Future<AppLocalizations> load(Locale locale) async {
String jsonContent = await rootBundle
.loadString("locale/locale_${locale.languageCode}.json");
_localisedValues = json.decode(jsonContent);
_currentLocale = locale;
return this;
}
String getLocale() {
return _currentLocale.languageCode;
}
String text(String key) {
return _localisedValues[key] ?? "$key not found";
}
}
class AppLocalizationsDelegate extends LocalizationsDelegate<AppLocalizations> {
const AppLocalizationsDelegate();
@override
bool isSupported(Locale locale) =>
['en', 'pl', 'de'].contains(locale.languageCode);
@override
Future<AppLocalizations> load(Locale locale) {
return AppLocalizations.instance.load(locale);
}
@override
bool shouldReload(AppLocalizationsDelegate old) => true;
}

View File

@@ -1,4 +1,7 @@
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter_localizations/flutter_localizations.dart';
import 'package:menui_mobile/localizations.dart';
import 'package:menui_mobile/settings.dart';
import "components/homeScreen.dart"; import "components/homeScreen.dart";
void main() { void main() {
@@ -8,15 +11,14 @@ void main() {
class App extends StatelessWidget { class App extends StatelessWidget {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return GestureDetector( return GestureDetector(onTap: () {
onTap: () { FocusManager.instance.primaryFocus.unfocus();
FocusManager.instance.primaryFocus.unfocus(); }, child: AppBuilder(
}, builder: (context) {
child: MaterialApp( return MaterialApp(
title: 'Menui - food guide', title: 'Menui - food guide',
themeMode: ThemeMode.dark, themeMode: ThemeMode.dark,
theme: ThemeData( theme: ThemeData(
platform: TargetPlatform.iOS,
primarySwatch: Colors.orange, primarySwatch: Colors.orange,
primaryColor: Colors.orange, primaryColor: Colors.orange,
accentColor: Colors.grey, accentColor: Colors.grey,
@@ -25,6 +27,28 @@ class App extends StatelessWidget {
), ),
home: HomePage(), home: HomePage(),
debugShowCheckedModeBanner: false, debugShowCheckedModeBanner: false,
)); localizationsDelegates: [
const AppLocalizationsDelegate(),
GlobalMaterialLocalizations.delegate,
GlobalWidgetsLocalizations.delegate
],
supportedLocales: [
const Locale('pl', ''),
const Locale('en', ''),
const Locale('de', '')
],
localeResolutionCallback:
(Locale locale, Iterable<Locale> supportedLocales) {
for (Locale supportedLocale in supportedLocales) {
if (supportedLocale.languageCode == locale.languageCode ||
supportedLocale.countryCode == locale.countryCode) {
return supportedLocale;
}
}
return supportedLocales.first;
},
);
},
));
} }
} }

View File

@@ -1,34 +1,45 @@
import 'dart:convert'; import 'dart:convert';
import 'package:menui_mobile/localizations.dart';
import 'package:shared_preferences/shared_preferences.dart'; import 'package:shared_preferences/shared_preferences.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:package_info/package_info.dart'; import 'package:package_info/package_info.dart';
class MenuiSettings { class MenuiSettings {
// SET LANGUAGE // SET LANGUAGE
void setLanguage(String lang) async { void setLanguage(String lang, BuildContext context) async {
final settings = await SharedPreferences.getInstance(); final settings = await SharedPreferences.getInstance();
settings.setString('language', lang); settings.setString('language', lang);
print('Language set to: $lang'); await AppLocalizations.instance.load(Locale(lang, ''));
String newLang = AppLocalizations.instance.getLocale();
AppBuilder.of(context).rebuild(lang);
} }
// GET LANGUAGE // GET LANGUAGE
Future<String> getLanguage() async { Future<String> getLanguage(BuildContext context) async {
final settings = await SharedPreferences.getInstance(); final settings = await SharedPreferences.getInstance();
if (settings.containsKey('language')) { if (settings.containsKey('language')) {
final String language = settings.getString('language'); final String language = settings.getString('language');
return language; return language;
} else { } else {
settings.setString('language', 'pl'); setLanguage('pl', context);
return 'pl'; return 'pl';
} }
} }
// INIT LANGUAGE
void initLanguage(BuildContext context) async {
final String language = await getLanguage(context);
String currentLanguage = AppLocalizations.instance.getLocale();
if (currentLanguage != language) {
await setLanguage(language, context);
}
}
// SET RADIUS // SET RADIUS
void setRadius(int radiusMeters) async { void setRadius(int radiusMeters) async {
final settings = await SharedPreferences.getInstance(); final settings = await SharedPreferences.getInstance();
settings.setInt('radius', radiusMeters); settings.setInt('radius', radiusMeters);
print('Radius set to: $radiusMeters');
} }
// GET RADIUS // GET RADIUS
@@ -47,7 +58,6 @@ class MenuiSettings {
void setRecommendations(bool recommend) async { void setRecommendations(bool recommend) async {
final settings = await SharedPreferences.getInstance(); final settings = await SharedPreferences.getInstance();
settings.setBool('recommendations', recommend); settings.setBool('recommendations', recommend);
print('Recommendations set to: $recommend');
} }
// GET RECOMMENDATIONS // GET RECOMMENDATIONS
@@ -67,13 +77,13 @@ class MenuiSettings {
String language; String language;
switch (languageCode) { switch (languageCode) {
case 'pl': case 'pl':
language = 'Polski'; language = AppLocalizations.instance.text("pl");
break; break;
case 'en': case 'en':
language = 'English'; language = AppLocalizations.instance.text("en");
break; break;
case 'de': case 'de':
language = 'Deutsch'; language = AppLocalizations.instance.text("de");
break; break;
} }
return language; return language;
@@ -82,9 +92,9 @@ class MenuiSettings {
// DECODE BOOL // DECODE BOOL
String decodeBool(bool value) { String decodeBool(bool value) {
if (value == true) { if (value == true) {
return "Tak"; return AppLocalizations.instance.text("yes");
} else { } else {
return "Nie"; return AppLocalizations.instance.text("no");
} }
} }
@@ -180,7 +190,6 @@ class MenuiSettings {
final List<String> result = settings.getStringList('favorites'); final List<String> result = settings.getStringList('favorites');
return result; return result;
} else { } else {
print('Favorites Empty');
return []; return [];
} }
} }
@@ -201,9 +210,41 @@ class MenuiSettings {
} }
} }
class AppBuilder extends StatefulWidget {
final Function(BuildContext) builder;
const AppBuilder({Key key, this.builder}) : super(key: key);
@override
AppBuilderState createState() => new AppBuilderState();
static AppBuilderState of(BuildContext context) {
return context.findAncestorStateOfType<AppBuilderState>();
}
}
class AppBuilderState extends State<AppBuilder> {
String languageCode;
@override
Widget build(BuildContext context) {
return widget.builder(context);
}
void rebuild(String language) {
print('REBUILDING...');
if (languageCode == null || languageCode != language) {
print('languageCode: $languageCode /// newLanguage: $language');
setState(() {
languageCode = language;
});
}
}
}
void showSettings(BuildContext context, MenuiSettings settings) async { void showSettings(BuildContext context, MenuiSettings settings) async {
FocusManager.instance.primaryFocus.unfocus(); FocusManager.instance.primaryFocus.unfocus();
final String languageCode = await settings.getLanguage(); final String languageCode = await settings.getLanguage(context);
final String language = settings.decodeLanguage(languageCode); final String language = settings.decodeLanguage(languageCode);
final int radius = await settings.getRadius(); final int radius = await settings.getRadius();
final bool recommendationsValue = await settings.getRecommendations(); final bool recommendationsValue = await settings.getRecommendations();
@@ -222,7 +263,7 @@ void showSettings(BuildContext context, MenuiSettings settings) async {
children: <Widget>[ children: <Widget>[
ListTile( ListTile(
title: Text( title: Text(
'Język', AppLocalizations.instance.text("language"),
style: TextStyle(color: Colors.white), style: TextStyle(color: Colors.white),
), ),
subtitle: Text( subtitle: Text(
@@ -239,7 +280,7 @@ void showSettings(BuildContext context, MenuiSettings settings) async {
}), }),
ListTile( ListTile(
title: Text( title: Text(
'Promień lokalizacji', AppLocalizations.instance.text("localizationRadius"),
style: TextStyle(color: Colors.white), style: TextStyle(color: Colors.white),
), ),
subtitle: subtitle:
@@ -254,7 +295,7 @@ void showSettings(BuildContext context, MenuiSettings settings) async {
}), }),
ListTile( ListTile(
title: Text( title: Text(
'Proponuj restauracje', AppLocalizations.instance.text("suggest"),
style: TextStyle(color: Colors.white), style: TextStyle(color: Colors.white),
), ),
subtitle: subtitle:
@@ -269,7 +310,7 @@ void showSettings(BuildContext context, MenuiSettings settings) async {
}), }),
ListTile( ListTile(
title: Text( title: Text(
'O aplikacji', AppLocalizations.instance.text("aboutApp"),
style: TextStyle(color: Colors.white), style: TextStyle(color: Colors.white),
), ),
leading: Icon( leading: Icon(
@@ -287,13 +328,13 @@ void showSettings(BuildContext context, MenuiSettings settings) async {
void showLanguageSelectionDialog( void showLanguageSelectionDialog(
BuildContext context, MenuiSettings settings) async { BuildContext context, MenuiSettings settings) async {
final currentLanguage = await settings.getLanguage(); final currentLanguage = await settings.getLanguage(context);
showDialog( showDialog(
context: context, context: context,
builder: (BuildContext context) { builder: (BuildContext context) {
return SimpleDialog( return SimpleDialog(
title: Text( title: Text(
'Język', AppLocalizations.instance.text("language"),
style: TextStyle(color: Colors.white, fontSize: 16), style: TextStyle(color: Colors.white, fontSize: 16),
textAlign: TextAlign.center, textAlign: TextAlign.center,
), ),
@@ -303,33 +344,33 @@ void showLanguageSelectionDialog(
children: <Widget>[ children: <Widget>[
SimpleDialogOption( SimpleDialogOption(
onPressed: () { onPressed: () {
settings.setLanguage('pl'); settings.setLanguage('pl', context);
Navigator.pop(context); Navigator.pop(context);
}, },
child: Text( child: Text(
'Polski', AppLocalizations.instance.text("pl"),
style: TextStyle(color: getOptionColor(currentLanguage, 'pl')), style: TextStyle(color: getOptionColor(currentLanguage, 'pl')),
textAlign: TextAlign.center, textAlign: TextAlign.center,
), ),
), ),
SimpleDialogOption( SimpleDialogOption(
onPressed: () { onPressed: () {
settings.setLanguage('en'); settings.setLanguage('en', context);
Navigator.pop(context); Navigator.pop(context);
}, },
child: Text( child: Text(
'English', AppLocalizations.instance.text("en"),
style: TextStyle(color: getOptionColor(currentLanguage, 'en')), style: TextStyle(color: getOptionColor(currentLanguage, 'en')),
textAlign: TextAlign.center, textAlign: TextAlign.center,
), ),
), ),
SimpleDialogOption( SimpleDialogOption(
onPressed: () { onPressed: () {
settings.setLanguage('de'); settings.setLanguage('de', context);
Navigator.pop(context); Navigator.pop(context);
}, },
child: Text( child: Text(
'Deutsch', AppLocalizations.instance.text("de"),
style: TextStyle(color: getOptionColor(currentLanguage, 'de')), style: TextStyle(color: getOptionColor(currentLanguage, 'de')),
textAlign: TextAlign.center, textAlign: TextAlign.center,
), ),
@@ -349,7 +390,7 @@ void showRecommendationsDialog(
builder: (BuildContext context) { builder: (BuildContext context) {
return SimpleDialog( return SimpleDialog(
title: Text( title: Text(
'Polecaj restauracje w okolicy', AppLocalizations.instance.text("suggest"),
style: TextStyle(color: Colors.white, fontSize: 16), style: TextStyle(color: Colors.white, fontSize: 16),
textAlign: TextAlign.center, textAlign: TextAlign.center,
), ),
@@ -363,7 +404,7 @@ void showRecommendationsDialog(
Navigator.pop(context); Navigator.pop(context);
}, },
child: Text( child: Text(
'Tak', AppLocalizations.instance.text("yes"),
style: style:
TextStyle(color: getOptionColor(showRecommendations, true)), TextStyle(color: getOptionColor(showRecommendations, true)),
textAlign: TextAlign.center, textAlign: TextAlign.center,
@@ -375,7 +416,7 @@ void showRecommendationsDialog(
Navigator.pop(context); Navigator.pop(context);
}, },
child: Text( child: Text(
'Nie', AppLocalizations.instance.text("no"),
style: TextStyle( style: TextStyle(
color: getOptionColor(showRecommendations, false)), color: getOptionColor(showRecommendations, false)),
textAlign: TextAlign.center, textAlign: TextAlign.center,
@@ -402,7 +443,7 @@ void showAppInfoDialog(BuildContext context) async {
children: <Widget>[ children: <Widget>[
ListTile( ListTile(
title: Text( title: Text(
'Wersja aplikacji', AppLocalizations.instance.text("appVersion"),
textAlign: TextAlign.center, textAlign: TextAlign.center,
style: TextStyle(color: Colors.white), style: TextStyle(color: Colors.white),
), ),
@@ -413,7 +454,7 @@ void showAppInfoDialog(BuildContext context) async {
)), )),
ListTile( ListTile(
title: Text( title: Text(
'Wsparcie', AppLocalizations.instance.text("support"),
textAlign: TextAlign.center, textAlign: TextAlign.center,
style: TextStyle(color: Colors.white), style: TextStyle(color: Colors.white),
), ),
@@ -469,7 +510,7 @@ class _RadiusSliderState extends State<RadiusSlider> {
Widget build(BuildContext context) { Widget build(BuildContext context) {
return SimpleDialog( return SimpleDialog(
title: Text( title: Text(
'Promień lokalizacji', AppLocalizations.instance.text("localizationRadius"),
style: TextStyle(color: Colors.white, fontSize: 16), style: TextStyle(color: Colors.white, fontSize: 16),
textAlign: TextAlign.center, textAlign: TextAlign.center,
), ),
@@ -496,8 +537,8 @@ class _RadiusSliderState extends State<RadiusSlider> {
} }
Navigator.pop(context); Navigator.pop(context);
}, },
child: const Text( child: Text(
'Zapisz', AppLocalizations.instance.text("save"),
style: TextStyle(color: Colors.white), style: TextStyle(color: Colors.white),
textAlign: TextAlign.center, textAlign: TextAlign.center,
), ),

79
locale/locale_de.json Normal file
View File

@@ -0,0 +1,79 @@
{
"geosearch": "Was ist in der Nähe",
"or": "oder",
"search": "Suchen",
"order": "Bestellung",
"favorites": "Beobachten",
"settings": "Einstellungen",
"searchbar": "Stadt/Name des Restaurants eingeben",
"clear": "Löschen",
"orderEmpty": "Noch keine Bestellung",
"language": "Sprache",
"pl": "polnisch",
"en": "englisch",
"de": "deutsch",
"localizationRadius": "Umkreis",
"suggest": "Restaurant vorschlagen",
"yes": "Ja",
"no": "Nein",
"aboutApp": "Über uns",
"appVersion": "App version",
"support": "Hilfe",
"foundCounter": "Suchergebnisse für Ihre Suche:",
"filter": "Filtern",
"typeOfFood": "Küche",
"tags": "Tags",
"cardPayments": "Mit Karte bezahlen",
"pets": "Wir lieben Tiere",
"pets1": "Pet",
"pets2": "friendly",
"glutenFree": "Gluteinfrei",
"vegan": "Vegan",
"vegetarian": "Vegetarisch",
"alcohol": "Alkohol",
"delivery": "Lieferservice",
"map": "Map",
"share": "Share",
"add": "hinzufügen",
"remove": "entfernen",
"info": "Infos",
"type": "Küche",
"adress": "Adresse",
"contact": "Kontakt",
"hours": "Öfnungszeiten",
"social": "Social media",
"showDishes": "Menü",
"hideDishes": "Close",
"addToOrder": "Zur Bestellung hinzufügen",
"mayContain": "Kann enthalten",
"gluten": "Gluten",
"lactose": "Laktose",
"sesame": "Sesam",
"peanuts": "Nüsse",
"seaFood": "Meeresfrüchte",
"eggs": "Eier",
"soy": "Soja",
"ingredients": "Zutaten",
"energy": "Brennwert",
"glicemicIndex": "Glykämischer Index",
"addedToOrder": "Zur Bestellung hinzugefügt",
"notes": "Anmerkungen",
"dishVegan": "Veganische Gerichte",
"dishVegetarian": "Vegetarianische Gerichte",
"quantity": "Anzahl",
"variant": "Variante",
"save": "Save",
"cardPayments1": "Bezahlen",
"cardPayments2": "Karte",
"radius": "Umkreis",
"error": "Fehler",
"searching": "Searching...",
"closed": "Geschlossen",
"mo": "Mo.",
"tu": "Di.",
"we": "Mi.",
"th": "Do.",
"fr": "Fr.",
"sa": "Sa.",
"su": "So."
}

79
locale/locale_en.json Normal file
View File

@@ -0,0 +1,79 @@
{
"geosearch": "Show nearby",
"or": "or",
"search": "Search",
"order": "Order",
"favorites": "Favorites",
"settings": "Settings",
"searchbar": "Search by city or name.",
"clear": "Clear",
"orderEmpty": "Order is empty.",
"language": "Language",
"pl": "Polski",
"en": "English",
"de": "Deutsch",
"localizationRadius": "Localization radius",
"suggest": "Suggest restaurants",
"yes": "Yes",
"no": "No",
"aboutApp": "About Menui",
"appVersion": "App version",
"support": "Support",
"foundCounter": "Found:",
"filter": "Filter",
"typeOfFood": "Food",
"tags": "Tags",
"cardPayments": "Card payments",
"pets": "Pet friendly",
"pets1": "Pet",
"pets2": "friendly",
"glutenFree": "Glutenfree",
"vegan": "Vegan",
"vegetarian": "Vegetarian",
"alcohol": "Alcohol",
"delivery": "Delivery",
"map": "Map",
"share": "Share",
"add": "Add",
"remove": "Remove",
"info": "Info",
"type": "Food:",
"adress": "Adress:",
"contact": "Contact:",
"hours": "Working hours",
"social": "Social media",
"showDishes": "Show dishes",
"hideDishes": "Close",
"addToOrder": "Add to order",
"mayContain": "May contain",
"gluten": "Gluten",
"lactose": "Lactose",
"sesame": "Sesame",
"peanuts": "Peanuts",
"seaFood": "Seafood",
"eggs": "Eggs",
"soy": "Soy",
"ingredients": "Ingredients",
"energy": "Energy value",
"glicemicIndex": "Glycemic index",
"addedToOrder": "Dish added to order",
"notes": "Notes",
"dishVegan": "Vegan",
"dishVegetarian": "Vegetarian",
"quantity": "Quantity",
"variant": "Variant",
"save": "Save",
"cardPayments1": "Card",
"cardPayments2": "payments",
"radius": "Radius",
"error": "Error",
"searching": "Searching...",
"closed": "closed",
"mo": "Mo",
"tu": "Tu",
"we": "We",
"th": "Th",
"fr": "Fr",
"sa": "Sa",
"su": "Su"
}

79
locale/locale_pl.json Normal file
View File

@@ -0,0 +1,79 @@
{
"geosearch": "Pokaż w pobliżu",
"or": "lub",
"search": "Szukaj",
"order": "Zamównienie",
"favorites": "Ulubione",
"settings": "Ustawienia",
"searchbar": "Wyszukaj miasto lub nazwę restauracji.",
"clear": "Wyczyść",
"orderEmpty": "Zamówienie jest puste.",
"language": "Język",
"pl": "Polski",
"en": "English",
"de": "Deutsch",
"localizationRadius": "Promień lokalizacji",
"suggest": "Proponuj restauracje",
"yes": "Tak",
"no": "Nie",
"aboutApp": "O aplikacji",
"appVersion": "Wersja aplikacji",
"support": "Wsparcie",
"foundCounter": "Znaleziono:",
"filter": "Filtruj",
"typeOfFood": "Rodzaj kuchni",
"tags": "Tagi",
"cardPayments": "Płatność kartą",
"pets": "Lubimy zwierzaki",
"pets1": "Lubimy",
"pets2": "zwierzaki",
"glutenFree": "Bez glutenu",
"vegan": "Wegańskie",
"vegetarian": "Wegetariańskie",
"alcohol": "Alkohol",
"delivery": "Dowozimy",
"map": "Mapa",
"share": "Udostępnij",
"add": "Dodaj",
"remove": "Usuń",
"info": "Informacje",
"type": "Kuchnia:",
"adress": "Adres:",
"contact": "Kontakt:",
"hours": "Godziny otwarcia",
"social": "Social media",
"showDishes": "Karta dań",
"hideDishes": "Zwiń",
"addToOrder": "Do zamównienia",
"mayContain": "Może zawierać",
"gluten": "Gluten",
"lactose": "Laktoza",
"sesame": "Sezam",
"peanuts": "Orzechy",
"seaFood": "Owoce morza",
"eggs": "Jaja",
"soy": "Soja",
"ingredients": "Składniki",
"energy": "Wartość energetyczna",
"glicemicIndex": "Indeks glikemiczny",
"addedToOrder": "Dodano do zamównienia",
"notes": "Uwagi",
"dishVegan": "Danie wegańskie",
"dishVegetarian": "Danie wegetariańskie",
"quantity": "Ilość",
"variant": "Wariant",
"save": "Zapisz",
"cardPayments1": "Płatność",
"cardPayments2": "kartą",
"radius": "Promień",
"error": "Błąd",
"searching": "Szukam...",
"closed": "nieczynne",
"mo": "Pn",
"tu": "Wt",
"we": "Śr",
"th": "Czw",
"fr": "Pt",
"sa": "So",
"su": "Nie"
}

View File

@@ -76,6 +76,11 @@ packages:
description: flutter description: flutter
source: sdk source: sdk
version: "0.0.0" version: "0.0.0"
flutter_localizations:
dependency: "direct main"
description: flutter
source: sdk
version: "0.0.0"
flutter_plugin_android_lifecycle: flutter_plugin_android_lifecycle:
dependency: transitive dependency: transitive
description: description:

View File

@@ -15,7 +15,7 @@ publish_to: "none" # Remove this line if you wish to publish to pub.dev
# In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion. # In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion.
# Read more about iOS versioning at # Read more about iOS versioning at
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html # https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
version: 1.0.0+3 version: 1.0.1+4
environment: environment:
sdk: ">=2.7.0 <3.0.0" sdk: ">=2.7.0 <3.0.0"
@@ -27,6 +27,8 @@ dependencies:
font_awesome_flutter: ^8.10.0 font_awesome_flutter: ^8.10.0
flutter: flutter:
sdk: flutter sdk: flutter
flutter_localizations:
sdk: flutter
shared_preferences: ^0.5.12 shared_preferences: ^0.5.12
google_maps_flutter: ^1.0.6 google_maps_flutter: ^1.0.6
package_info: ^0.4.0+16 package_info: ^0.4.0+16
@@ -50,6 +52,9 @@ flutter:
uses-material-design: true uses-material-design: true
assets: assets:
- img/ - img/
- locale/locale_pl.json
- locale/locale_en.json
- locale/locale_de.json
# An image asset can refer to one or more resolution-specific "variants", see # An image asset can refer to one or more resolution-specific "variants", see
# https://flutter.dev/assets-and-images/#resolution-aware. # https://flutter.dev/assets-and-images/#resolution-aware.