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( appBar: AppBar(
title: const Text("O Aplikaci"), title: const Text("O Aplikaci"),
), ),
body: SizedBox( body: SingleChildScrollView(
height: MediaQuery.of(context).size.height, child: SizedBox(
child: Column(mainAxisSize: MainAxisSize.min, children: [ height: MediaQuery.of(context).size.height,
const Text("OpenCanteen", style: TextStyle(fontSize: 30)), child: Column(mainAxisSize: MainAxisSize.min, children: [
const Text("© 2022 Matyáš Caras a přispěvatelé"), const Text("OpenCanteen", style: TextStyle(fontSize: 30)),
InkWell( const Text("© 2022 Matyáš Caras a přispěvatelé"),
onTap: () => launch( InkWell(
"https://github.com/hernikplays/opencanteen/blob/main/LICENSE"), onTap: () => launch(
child: const Text("Vydáno pod licencí GNU GPLv3")), "https://github.com/hernikplays/opencanteen/blob/main/LICENSE"),
const SizedBox(height: 15), child: const Text("Vydáno pod licencí GNU GPLv3")),
const Text("Použité knihovny:", style: TextStyle(fontSize: 19)), const SizedBox(height: 15),
const SizedBox(height: 10), const Text("Použité knihovny:", style: TextStyle(fontSize: 19)),
cudlik( const SizedBox(height: 10),
"Flutter", cudlik(
"Copyright 2014 The Flutter Authors. All rights reserved, licence BSD 3-Clause", "Flutter",
"https://github.com/flutter/flutter/blob/master/LICENSE"), "Copyright 2014 The Flutter Authors. All rights reserved, licence BSD 3-Clause",
const SizedBox(height: 10), "https://github.com/flutter/flutter/blob/master/LICENSE"),
cudlik( const SizedBox(height: 10),
"Flutter_secure_storage", cudlik(
"Copyright 2017 German Saprykin. All rights reserved, licence BSD 3-Clause", "Flutter_secure_storage",
"https://github.com/mogol/flutter_secure_storage/blob/develop/flutter_secure_storage/LICENSE"), "Copyright 2017 German Saprykin. All rights reserved, licence BSD 3-Clause",
const SizedBox(height: 10), "https://github.com/mogol/flutter_secure_storage/blob/develop/flutter_secure_storage/LICENSE"),
cudlik( const SizedBox(height: 10),
"connectivity_plus", cudlik(
"Copyright 2017 The Chromium Authors. All rights reserved, licence BSD 3-Clause", "connectivity_plus",
"https://github.com/fluttercommunity/plus_plugins/blob/main/packages/connectivity_plus/connectivity_plus/LICENSE"), "Copyright 2017 The Chromium Authors. All rights reserved, licence BSD 3-Clause",
const SizedBox(height: 10), "https://github.com/fluttercommunity/plus_plugins/blob/main/packages/connectivity_plus/connectivity_plus/LICENSE"),
cudlik( const SizedBox(height: 10),
"url_launcher", cudlik(
"Copyright 2013 The Flutter Authors. All rights reserved, licence BSD 3-Clause", "url_launcher",
"https://github.com/flutter/plugins/blob/main/packages/url_launcher/url_launcher/LICENSE"), "Copyright 2013 The Flutter Authors. All rights reserved, licence BSD 3-Clause",
const SizedBox(height: 10), "https://github.com/flutter/plugins/blob/main/packages/url_launcher/url_launcher/LICENSE"),
cudlik( const SizedBox(height: 10),
"canteenlib", cudlik(
"Copyright (c) 2022 Matyáš Caras and contributors, licence MIT", "canteenlib",
"https://github.com/hernikplays/canteenlib/blob/main/LICENSE"), "Copyright (c) 2022 Matyáš Caras and contributors, licence MIT",
const SizedBox(height: 10), "https://github.com/hernikplays/canteenlib/blob/main/LICENSE"),
cudlik( const SizedBox(height: 10),
"path_provider", cudlik(
"Copyright 2013 The Flutter Authors. All rights reserved., licence BSD-3-Clause", "path_provider",
"https://github.com/flutter/plugins/blob/main/packages/path_provider/path_provider/LICENSE") "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:flutter_secure_storage/flutter_secure_storage.dart';
import 'package:opencanteen/util.dart'; import 'package:opencanteen/util.dart';
import 'package:path_provider/path_provider.dart'; import 'package:path_provider/path_provider.dart';
import 'package:shared_preferences/shared_preferences.dart';
import 'package:url_launcher/url_launcher.dart'; import 'package:url_launcher/url_launcher.dart';
import '../loginmanager.dart'; import '../loginmanager.dart';
@ -212,7 +213,8 @@ class _JidelnicekPageState extends State<JidelnicekPage> {
/// uložení jídelníčku pro dnešek offline /// uložení jídelníčku pro dnešek offline
void ulozitDnesekOffline() async { void ulozitDnesekOffline() async {
if (await LoginManager.zapamatovat()) { var prefs = await SharedPreferences.getInstance();
if (prefs.getBool("offline") != null && prefs.getBool("offline")!) {
Directory appDocDir = await getApplicationDocumentsDirectory(); Directory appDocDir = await getApplicationDocumentsDirectory();
for (var f in appDocDir.listSync()) { for (var f in appDocDir.listSync()) {
// Vymažeme obsah // 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 name: canteenlib
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "0.1.0-alpha.15" version: "0.1.0-alpha.16"
characters: characters:
dependency: transitive dependency: transitive
description: description:
@ -345,6 +345,62 @@ packages:
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "4.2.4" 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: sky_engine:
dependency: transitive dependency: transitive
description: flutter description: flutter

View file

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