Vylepšení
This commit is contained in:
parent
453b06e242
commit
d106e78cb3
6 changed files with 111 additions and 86 deletions
7
CHANGELOG.md
Normal file
7
CHANGELOG.md
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
# 0.1.1
|
||||||
|
- Přidán RefreshIndicator na obrazovku s jídelníčkem
|
||||||
|
- Přidáno odsazení od okrajů u jídelníčku
|
||||||
|
- Domovská obrazovka nyní zobrazuje zprávu, pokud na dnešní den není žádné jídlo v jídelníčku
|
||||||
|
- Upgrade knihovny
|
||||||
|
# 0.1.0
|
||||||
|
- První verze
|
|
@ -49,7 +49,7 @@ class _BurzaPageState extends State<BurzaPage> {
|
||||||
Text("${b.pocet}x"),
|
Text("${b.pocet}x"),
|
||||||
TextButton(
|
TextButton(
|
||||||
onPressed: () {
|
onPressed: () {
|
||||||
widget.canteen.objednatZBurzy(b).then((_) {
|
widget.canteen.objednatZBurzy(b).then((a) {
|
||||||
nactiBurzu();
|
nactiBurzu();
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
|
@ -28,6 +28,14 @@ class _HomePageState extends State<HomePage> {
|
||||||
setState(() {
|
setState(() {
|
||||||
kredit = kr.kredit;
|
kredit = kr.kredit;
|
||||||
dnes = jd;
|
dnes = jd;
|
||||||
|
if (jd.jidla.isEmpty) {
|
||||||
|
obsah = [
|
||||||
|
const Text(
|
||||||
|
"Žádné jídlo pro dnešní den",
|
||||||
|
style: TextStyle(fontSize: 20),
|
||||||
|
)
|
||||||
|
];
|
||||||
|
}
|
||||||
for (var j in jd.jidla) {
|
for (var j in jd.jidla) {
|
||||||
if (j.objednano) jidloDnes = j;
|
if (j.objednano) jidloDnes = j;
|
||||||
obsah.add(
|
obsah.add(
|
||||||
|
@ -99,6 +107,8 @@ class _HomePageState extends State<HomePage> {
|
||||||
physics: const AlwaysScrollableScrollPhysics(),
|
physics: const AlwaysScrollableScrollPhysics(),
|
||||||
child: Center(
|
child: Center(
|
||||||
child: SizedBox(
|
child: SizedBox(
|
||||||
|
child: SizedBox(
|
||||||
|
height: MediaQuery.of(context).size.height / 1.5,
|
||||||
child: Column(
|
child: Column(
|
||||||
children: [
|
children: [
|
||||||
const SizedBox(
|
const SizedBox(
|
||||||
|
@ -127,6 +137,7 @@ class _HomePageState extends State<HomePage> {
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -182,7 +182,9 @@ class _JidelnicekPageState extends State<JidelnicekPage> {
|
||||||
appBar: AppBar(
|
appBar: AppBar(
|
||||||
title: const Text('Jídelníček'),
|
title: const Text('Jídelníček'),
|
||||||
),
|
),
|
||||||
body: Center(
|
body: RefreshIndicator(
|
||||||
|
child: Center(
|
||||||
|
child: SizedBox(
|
||||||
child: Column(
|
child: Column(
|
||||||
children: [
|
children: [
|
||||||
const SizedBox(height: 10),
|
const SizedBox(height: 10),
|
||||||
|
@ -223,6 +225,7 @@ class _JidelnicekPageState extends State<JidelnicekPage> {
|
||||||
icon: const Icon(Icons.arrow_right)),
|
icon: const Icon(Icons.arrow_right)),
|
||||||
]),
|
]),
|
||||||
SingleChildScrollView(
|
SingleChildScrollView(
|
||||||
|
physics: const AlwaysScrollableScrollPhysics(),
|
||||||
child: GestureDetector(
|
child: GestureDetector(
|
||||||
child: Column(children: obsah),
|
child: Column(children: obsah),
|
||||||
onHorizontalDragEnd: (details) {
|
onHorizontalDragEnd: (details) {
|
||||||
|
@ -242,6 +245,10 @@ class _JidelnicekPageState extends State<JidelnicekPage> {
|
||||||
)
|
)
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
width: MediaQuery.of(context).size.width - 50,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
onRefresh: nactiJidlo,
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
@ -28,7 +28,7 @@ packages:
|
||||||
name: canteenlib
|
name: canteenlib
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "0.1.0-alpha.13"
|
version: "0.1.0-alpha.14"
|
||||||
characters:
|
characters:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
|
|
|
@ -6,7 +6,7 @@ publish_to: 'none'
|
||||||
# The following defines the version and build number for your application.
|
# The following defines the version and build number for your application.
|
||||||
# A version number is three numbers separated by dots, like 1.2.43
|
# A version number is three numbers separated by dots, like 1.2.43
|
||||||
# followed by an optional build number separated by a +.
|
# followed by an optional build number separated by a +.
|
||||||
version: 0.1.0+1
|
version: 0.1.1+2
|
||||||
|
|
||||||
environment:
|
environment:
|
||||||
sdk: ">=2.16.1 <3.0.0"
|
sdk: ">=2.16.1 <3.0.0"
|
||||||
|
@ -16,7 +16,7 @@ dependencies:
|
||||||
sdk: flutter
|
sdk: flutter
|
||||||
flutter_localizations:
|
flutter_localizations:
|
||||||
sdk: flutter
|
sdk: flutter
|
||||||
canteenlib: ^0.1.0-alpha.13
|
canteenlib: ^0.1.0-alpha.14
|
||||||
cupertino_icons: ^1.0.2
|
cupertino_icons: ^1.0.2
|
||||||
connectivity_plus: ^2.2.1
|
connectivity_plus: ^2.2.1
|
||||||
flutter_secure_storage: ^5.0.2
|
flutter_secure_storage: ^5.0.2
|
||||||
|
|
Reference in a new issue