UI Vylepšení (#3)
This commit is contained in:
parent
bf642ee9ed
commit
bf183a379e
3 changed files with 132 additions and 126 deletions
|
@ -125,6 +125,7 @@ class _LoginPageState extends State<LoginPage> {
|
|||
title: const Text("Přihlášení"),
|
||||
),
|
||||
body: Center(
|
||||
child: SingleChildScrollView(
|
||||
child: SizedBox(
|
||||
width: MediaQuery.of(context).size.width - 50,
|
||||
child: Column(
|
||||
|
@ -153,7 +154,8 @@ class _LoginPageState extends State<LoginPage> {
|
|||
),
|
||||
TextField(
|
||||
autofillHints: const [AutofillHints.url],
|
||||
decoration: const InputDecoration(labelText: 'iCanteen URL'),
|
||||
decoration:
|
||||
const InputDecoration(labelText: 'iCanteen URL'),
|
||||
keyboardType: TextInputType.url,
|
||||
controller: canteenControl,
|
||||
),
|
||||
|
@ -180,10 +182,12 @@ class _LoginPageState extends State<LoginPage> {
|
|||
"Snažíte se přihlásit přes nešifrované spojení HTTP, jste si jisti, že tak chcete učinit?")),
|
||||
actions: [
|
||||
TextButton(
|
||||
onPressed: () => Navigator.pop(c, true),
|
||||
onPressed: () =>
|
||||
Navigator.pop(c, true),
|
||||
child: const Text("Ano")),
|
||||
TextButton(
|
||||
onPressed: () => Navigator.pop(c, false),
|
||||
onPressed: () =>
|
||||
Navigator.pop(c, false),
|
||||
child: const Text("Ne, změnit"))
|
||||
],
|
||||
));
|
||||
|
@ -203,10 +207,12 @@ class _LoginPageState extends State<LoginPage> {
|
|||
"Toto není oficiální aplikace k ovládání iCanteen. Autor neručí za ztráty nebo nefunkčnost v souvislosti s používáním této aplikace. Tato zpráva se znovu neukáže.")),
|
||||
actions: [
|
||||
TextButton(
|
||||
onPressed: () => Navigator.pop(c, true),
|
||||
onPressed: () =>
|
||||
Navigator.pop(c, true),
|
||||
child: const Text("Souhlasím")),
|
||||
TextButton(
|
||||
onPressed: () => Navigator.pop(c, false),
|
||||
onPressed: () =>
|
||||
Navigator.pop(c, false),
|
||||
child: const Text("Nesouhlasím"))
|
||||
],
|
||||
));
|
||||
|
@ -215,8 +221,8 @@ class _LoginPageState extends State<LoginPage> {
|
|||
}
|
||||
|
||||
var canteen = Canteen(canteenControl.text);
|
||||
var l =
|
||||
await canteen.login(userControl.text, passControl.text);
|
||||
var l = await canteen.login(
|
||||
userControl.text, passControl.text);
|
||||
if (!l) {
|
||||
ScaffoldMessenger.of(context).hideCurrentSnackBar();
|
||||
ScaffoldMessenger.of(context).showSnackBar(
|
||||
|
@ -245,6 +251,6 @@ class _LoginPageState extends State<LoginPage> {
|
|||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -126,7 +126,7 @@ class _BurzaPageState extends State<BurzaPage> {
|
|||
SingleChildScrollView(
|
||||
physics: const AlwaysScrollableScrollPhysics(),
|
||||
child: SizedBox(
|
||||
height: MediaQuery.of(context).size.height - 120,
|
||||
height: MediaQuery.of(context).size.height / 1.3,
|
||||
child: Column(children: obsah),
|
||||
),
|
||||
)
|
||||
|
|
|
@ -283,7 +283,7 @@ class _JidelnicekPageState extends State<JidelnicekPage> {
|
|||
.onPrimary
|
||||
.withOpacity(0),
|
||||
child: Column(children: obsah),
|
||||
height: MediaQuery.of(context).size.height - 160,
|
||||
height: MediaQuery.of(context).size.height / 1.3,
|
||||
),
|
||||
onHorizontalDragEnd: (details) {
|
||||
if (details.primaryVelocity?.compareTo(0) == -1) {
|
||||
|
|
Reference in a new issue