Bump knihovnu + nastavení

This commit is contained in:
Matyáš Caras 2022-05-02 12:07:47 +02:00
parent 5b7d1e226b
commit 04277effc2
5 changed files with 127 additions and 45 deletions

View file

@ -15,48 +15,55 @@ class _AboutPageState extends State<AboutPage> {
appBar: AppBar(
title: const Text("O Aplikaci"),
),
body: SizedBox(
height: MediaQuery.of(context).size.height,
child: Column(mainAxisSize: MainAxisSize.min, children: [
const Text("OpenCanteen", style: TextStyle(fontSize: 30)),
const Text("© 2022 Matyáš Caras a přispěvatelé"),
InkWell(
onTap: () => launch(
"https://github.com/hernikplays/opencanteen/blob/main/LICENSE"),
child: const Text("Vydáno pod licencí GNU GPLv3")),
const SizedBox(height: 15),
const Text("Použité knihovny:", style: TextStyle(fontSize: 19)),
const SizedBox(height: 10),
cudlik(
"Flutter",
"Copyright 2014 The Flutter Authors. All rights reserved, licence BSD 3-Clause",
"https://github.com/flutter/flutter/blob/master/LICENSE"),
const SizedBox(height: 10),
cudlik(
"Flutter_secure_storage",
"Copyright 2017 German Saprykin. All rights reserved, licence BSD 3-Clause",
"https://github.com/mogol/flutter_secure_storage/blob/develop/flutter_secure_storage/LICENSE"),
const SizedBox(height: 10),
cudlik(
"connectivity_plus",
"Copyright 2017 The Chromium Authors. All rights reserved, licence BSD 3-Clause",
"https://github.com/fluttercommunity/plus_plugins/blob/main/packages/connectivity_plus/connectivity_plus/LICENSE"),
const SizedBox(height: 10),
cudlik(
"url_launcher",
"Copyright 2013 The Flutter Authors. All rights reserved, licence BSD 3-Clause",
"https://github.com/flutter/plugins/blob/main/packages/url_launcher/url_launcher/LICENSE"),
const SizedBox(height: 10),
cudlik(
"canteenlib",
"Copyright (c) 2022 Matyáš Caras and contributors, licence MIT",
"https://github.com/hernikplays/canteenlib/blob/main/LICENSE"),
const SizedBox(height: 10),
cudlik(
"path_provider",
"Copyright 2013 The Flutter Authors. All rights reserved., licence BSD-3-Clause",
"https://github.com/flutter/plugins/blob/main/packages/path_provider/path_provider/LICENSE")
]),
body: SingleChildScrollView(
child: SizedBox(
height: MediaQuery.of(context).size.height,
child: Column(mainAxisSize: MainAxisSize.min, children: [
const Text("OpenCanteen", style: TextStyle(fontSize: 30)),
const Text("© 2022 Matyáš Caras a přispěvatelé"),
InkWell(
onTap: () => launch(
"https://github.com/hernikplays/opencanteen/blob/main/LICENSE"),
child: const Text("Vydáno pod licencí GNU GPLv3")),
const SizedBox(height: 15),
const Text("Použité knihovny:", style: TextStyle(fontSize: 19)),
const SizedBox(height: 10),
cudlik(
"Flutter",
"Copyright 2014 The Flutter Authors. All rights reserved, licence BSD 3-Clause",
"https://github.com/flutter/flutter/blob/master/LICENSE"),
const SizedBox(height: 10),
cudlik(
"Flutter_secure_storage",
"Copyright 2017 German Saprykin. All rights reserved, licence BSD 3-Clause",
"https://github.com/mogol/flutter_secure_storage/blob/develop/flutter_secure_storage/LICENSE"),
const SizedBox(height: 10),
cudlik(
"connectivity_plus",
"Copyright 2017 The Chromium Authors. All rights reserved, licence BSD 3-Clause",
"https://github.com/fluttercommunity/plus_plugins/blob/main/packages/connectivity_plus/connectivity_plus/LICENSE"),
const SizedBox(height: 10),
cudlik(
"url_launcher",
"Copyright 2013 The Flutter Authors. All rights reserved, licence BSD 3-Clause",
"https://github.com/flutter/plugins/blob/main/packages/url_launcher/url_launcher/LICENSE"),
const SizedBox(height: 10),
cudlik(
"canteenlib",
"Copyright (c) 2022 Matyáš Caras and contributors, licence MIT",
"https://github.com/hernikplays/canteenlib/blob/main/LICENSE"),
const SizedBox(height: 10),
cudlik(
"path_provider",
"Copyright 2013 The Flutter Authors. All rights reserved., licence BSD-3-Clause",
"https://github.com/flutter/plugins/blob/main/packages/path_provider/path_provider/LICENSE"),
const SizedBox(height: 10),
cudlik(
"shared_preferences",
"Copyright 2013 The Flutter Authors. All rights reserved., licence BSD-3-Clause",
"https://github.com/flutter/plugins/blob/main/packages/path_provider/path_provider/LICENSE")
]),
),
),
);
}

View file

@ -6,6 +6,7 @@ import 'package:flutter/material.dart';
import 'package:flutter_secure_storage/flutter_secure_storage.dart';
import 'package:opencanteen/util.dart';
import 'package:path_provider/path_provider.dart';
import 'package:shared_preferences/shared_preferences.dart';
import 'package:url_launcher/url_launcher.dart';
import '../loginmanager.dart';
@ -212,7 +213,8 @@ class _JidelnicekPageState extends State<JidelnicekPage> {
/// uložení jídelníčku pro dnešek offline
void ulozitDnesekOffline() async {
if (await LoginManager.zapamatovat()) {
var prefs = await SharedPreferences.getInstance();
if (prefs.getBool("offline") != null && prefs.getBool("offline")!) {
Directory appDocDir = await getApplicationDocumentsDirectory();
for (var f in appDocDir.listSync()) {
// Vymažeme obsah

16
lib/okna/nastaveni.dart Normal file
View file

@ -0,0 +1,16 @@
import 'package:flutter/material.dart';
// TODO
class Nastaveni extends StatefulWidget {
const Nastaveni({Key? key}) : super(key: key);
@override
State<Nastaveni> createState() => _NastaveniState();
}
class _NastaveniState extends State<Nastaveni> {
@override
Widget build(BuildContext context) {
return Container();
}
}

View file

@ -28,7 +28,7 @@ packages:
name: canteenlib
url: "https://pub.dartlang.org"
source: hosted
version: "0.1.0-alpha.15"
version: "0.1.0-alpha.16"
characters:
dependency: transitive
description:
@ -345,6 +345,62 @@ packages:
url: "https://pub.dartlang.org"
source: hosted
version: "4.2.4"
shared_preferences:
dependency: "direct main"
description:
name: shared_preferences
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.13"
shared_preferences_android:
dependency: transitive
description:
name: shared_preferences_android
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.11"
shared_preferences_ios:
dependency: transitive
description:
name: shared_preferences_ios
url: "https://pub.dartlang.org"
source: hosted
version: "2.1.0"
shared_preferences_linux:
dependency: transitive
description:
name: shared_preferences_linux
url: "https://pub.dartlang.org"
source: hosted
version: "2.1.0"
shared_preferences_macos:
dependency: transitive
description:
name: shared_preferences_macos
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.3"
shared_preferences_platform_interface:
dependency: transitive
description:
name: shared_preferences_platform_interface
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.0"
shared_preferences_web:
dependency: transitive
description:
name: shared_preferences_web
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.3"
shared_preferences_windows:
dependency: transitive
description:
name: shared_preferences_windows
url: "https://pub.dartlang.org"
source: hosted
version: "2.1.0"
sky_engine:
dependency: transitive
description: flutter

View file

@ -16,11 +16,12 @@ dependencies:
sdk: flutter
flutter_localizations:
sdk: flutter
canteenlib: ^0.1.0-alpha.15
canteenlib: ^0.1.0-alpha.16
connectivity_plus: ^2.2.1
flutter_secure_storage: ^5.0.2
url_launcher: ^6.0.20
path_provider: ^2.0.9
shared_preferences: ^2.0.13
dev_dependencies:
flutter_lints: ^1.0.0