From f20490079ad61bfb6f498945d9acc9114aa1b29e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maty=C3=A1=C5=A1=20Caras?= Date: Thu, 26 May 2022 16:07:31 +0200 Subject: [PATCH] =?UTF-8?q?feat:=20skoro=20pracuj=C3=ADc=C3=AD=20autoburza?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .idea/libraries/Dart_SDK.xml | 30 +- .idea/workspace.xml | 89 ++++-- CHANGELOG.md | 5 + android/app/build.gradle | 2 + android/app/proguard-rules.pro | 32 +++ android/app/src/main/AndroidManifest.xml | 6 +- .../app/src/main/res/drawable/notif_icon.xml | 10 + android/app/src/main/res/raw/keep.xml | 3 + android/build.gradle | 4 + android/opencanteen_android.iml | 3 +- ios/Runner/AppDelegate.swift | 3 + lib/lang/lang.dart | 7 + lib/lang/lang_cz.dart | 11 + lib/lang/lang_en.dart | 11 + lib/main.dart | 258 +++++++++++++++--- lib/okna/about.dart | 32 ++- lib/okna/nastaveni.dart | 33 +++ pubspec.lock | 163 +++++------ pubspec.yaml | 9 +- 19 files changed, 525 insertions(+), 186 deletions(-) create mode 100644 android/app/proguard-rules.pro create mode 100644 android/app/src/main/res/drawable/notif_icon.xml create mode 100644 android/app/src/main/res/raw/keep.xml diff --git a/.idea/libraries/Dart_SDK.xml b/.idea/libraries/Dart_SDK.xml index 333a382..563d1c4 100644 --- a/.idea/libraries/Dart_SDK.xml +++ b/.idea/libraries/Dart_SDK.xml @@ -1,17 +1,25 @@ - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + diff --git a/.idea/workspace.xml b/.idea/workspace.xml index 5b3388c..b1b5022 100644 --- a/.idea/workspace.xml +++ b/.idea/workspace.xml @@ -1,17 +1,66 @@ - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1653485695149 + + @@ -19,18 +68,4 @@ - - - - - - - - - - - - - - + \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index 7a98aa6..d1f941d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,8 @@ +# 1.2.0 +- Přidat možnost automatického objednávání z burzy +- Odstranit "connectivity_plus" knihovnu +- Změnit launch na launchUrl kvůli změnám v knihovně +- Nepodporovat instance s HTTP # 1.1.2 - Přidat chybějící knihovnu do O Aplikaci (licence) # 1.1.1 diff --git a/android/app/build.gradle b/android/app/build.gradle index fdd0f6e..955fd77 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -53,6 +53,7 @@ android { targetSdkVersion flutter.targetSdkVersion versionCode flutterVersionCode.toInteger() versionName flutterVersionName + multiDexEnabled true } signingConfigs { @@ -76,4 +77,5 @@ flutter { dependencies { implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" + implementation 'com.android.support:multidex:1.0.3' } diff --git a/android/app/proguard-rules.pro b/android/app/proguard-rules.pro new file mode 100644 index 0000000..ea6dd79 --- /dev/null +++ b/android/app/proguard-rules.pro @@ -0,0 +1,32 @@ +##---------------Begin: proguard configuration for Gson ---------- +# Gson uses generic type information stored in a class file when working with fields. Proguard +# removes such information by default, so configure it to keep all of it. +-keepattributes Signature + +# For using GSON @Expose annotation +-keepattributes *Annotation* + +# Gson specific classes +-dontwarn sun.misc.** +#-keep class com.google.gson.stream.** { *; } + +# Application classes that will be serialized/deserialized over Gson +-keep class com.google.gson.examples.android.model.** { ; } + +# Prevent proguard from stripping interface information from TypeAdapter, TypeAdapterFactory, +# JsonSerializer, JsonDeserializer instances (so they can be used in @JsonAdapter) +-keep class * extends com.google.gson.TypeAdapter +-keep class * implements com.google.gson.TypeAdapterFactory +-keep class * implements com.google.gson.JsonSerializer +-keep class * implements com.google.gson.JsonDeserializer + +# Prevent R8 from leaving Data object members always null +-keepclassmembers,allowobfuscation class * { + @com.google.gson.annotations.SerializedName ; +} + +# Retain generic signatures of TypeToken and its subclasses with R8 version 3.0 and higher. +-keep,allowobfuscation,allowshrinking class com.google.gson.reflect.TypeToken +-keep,allowobfuscation,allowshrinking class * extends com.google.gson.reflect.TypeToken + +##---------------End: proguard configuration for Gson ---------- \ No newline at end of file diff --git a/android/app/src/main/AndroidManifest.xml b/android/app/src/main/AndroidManifest.xml index 8c4a410..b357336 100644 --- a/android/app/src/main/AndroidManifest.xml +++ b/android/app/src/main/AndroidManifest.xml @@ -1,10 +1,14 @@ + android:icon="@mipmap/launcher_icon" + android:allowBackup="false" + android:fullBackupContent="false"> + + diff --git a/android/app/src/main/res/raw/keep.xml b/android/app/src/main/res/raw/keep.xml new file mode 100644 index 0000000..7efaa89 --- /dev/null +++ b/android/app/src/main/res/raw/keep.xml @@ -0,0 +1,3 @@ + + diff --git a/android/build.gradle b/android/build.gradle index 4256f91..c913e4e 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -15,6 +15,10 @@ allprojects { repositories { google() mavenCentral() + maven { + // [required] background_fetch + url "${project(':background_fetch').projectDir}/libs" + } } } diff --git a/android/opencanteen_android.iml b/android/opencanteen_android.iml index 1899969..9c35604 100644 --- a/android/opencanteen_android.iml +++ b/android/opencanteen_android.iml @@ -20,10 +20,11 @@ + - + \ No newline at end of file diff --git a/ios/Runner/AppDelegate.swift b/ios/Runner/AppDelegate.swift index 70693e4..3ade2c4 100644 --- a/ios/Runner/AppDelegate.swift +++ b/ios/Runner/AppDelegate.swift @@ -7,6 +7,9 @@ import Flutter _ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? ) -> Bool { + if #available(iOS 10.0, *) { + UNUserNotificationCenter.current().delegate = self as? UNUserNotificationCenterDelegate + } GeneratedPluginRegistrant.register(with: self) return super.application(application, didFinishLaunchingWithOptions: launchOptions) } diff --git a/lib/lang/lang.dart b/lib/lang/lang.dart index 7980eff..9d88166 100644 --- a/lib/lang/lang.dart +++ b/lib/lang/lang.dart @@ -139,8 +139,15 @@ abstract class Languages { String get skipWeekend; + String get autoBurza; + + String get autoburzaNeeds; + // Offline String get offline; String get mustLogout; + + // Autoburza + String get autoFound; } diff --git a/lib/lang/lang_cz.dart b/lib/lang/lang_cz.dart index f230e57..47656bf 100644 --- a/lib/lang/lang_cz.dart +++ b/lib/lang/lang_cz.dart @@ -196,4 +196,15 @@ class LanguageCz extends Languages { @override String get next => "Další"; + + @override + String get autoBurza => + "Automaticky objednat jídlo z burzy, pokud žádné nemám"; + + @override + String get autoburzaNeeds => + "Tato funkcionalita vyžaduje stálé internetové připojení a vaše údaje musí být uložené (pomocí přepínače 'Zapamatovat si mě' na přihlašovací obrazovce)"; + + @override + String get autoFound => "Objednáno jídlo z burzy"; } diff --git a/lib/lang/lang_en.dart b/lib/lang/lang_en.dart index bcc868f..774a0f9 100644 --- a/lib/lang/lang_en.dart +++ b/lib/lang/lang_en.dart @@ -196,4 +196,15 @@ class LanguageEn extends Languages { @override String get next => "Next"; + + @override + String get autoBurza => + "Automatically order food from exchange when I didn't order one"; + + @override + String get autoburzaNeeds => + "This function requires constant network connection and you need to have saved login details (using the 'Remember me' switch on the login page)."; + + @override + String get autoFound => "Successfully ordered food from exchange"; } diff --git a/lib/main.dart b/lib/main.dart index 28b70eb..7466d88 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -1,17 +1,20 @@ import 'dart:convert'; import 'dart:io'; +import 'package:background_fetch/background_fetch.dart'; import 'package:flutter/material.dart'; +import 'package:flutter_local_notifications/flutter_local_notifications.dart'; import 'package:flutter_localizations/flutter_localizations.dart'; import 'package:flutter_secure_storage/flutter_secure_storage.dart'; import 'package:opencanteen/lang/lang_cz.dart'; import 'package:opencanteen/loginmanager.dart'; -import 'package:connectivity_plus/connectivity_plus.dart'; import 'package:canteenlib/canteenlib.dart'; import 'package:opencanteen/okna/offline_jidelnicek.dart'; import 'package:opencanteen/okna/welcome.dart'; import 'package:opencanteen/util.dart'; import 'package:path_provider/path_provider.dart'; +import 'package:shared_preferences/shared_preferences.dart'; +import 'package:intl/intl.dart'; import 'lang/lang.dart'; import 'lang/lang_en.dart'; @@ -34,8 +37,112 @@ Copyright (C) 2022 Matyáš Caras a přispěvatelé along with this program. If not, see . */ -void main() { +final FlutterLocalNotificationsPlugin flutterLocalNotificationsPlugin = + FlutterLocalNotificationsPlugin(); + +// Pouze pro Android +void backgroundFetchHeadlessTask(HeadlessTask task) async { + String taskId = task.taskId; + bool isTimeout = task.timeout; + if (isTimeout) { + // Timeout + debugPrint("[BackgroundFetch] Headless task má time-out: $taskId"); + BackgroundFetch.finish(taskId); + return; + } + debugPrint('[BackgroundFetch] Přišel headless event.'); + + var d = await LoginManager.getDetails(); // získat údaje + if (d != null) { + var c = Canteen(d["url"]!); + await c.login(d["user"]!, d["pass"]!); // přihlásit se + var burza = await c.ziskatBurzu(); // získat burzu + + for (var jidlo in burza) { + try { + String locale = Intl.getCurrentLocale(); + String title; + switch (locale) { + case "cs_CZ": + title = LanguageCz().autoFound; + break; + default: + title = LanguageEn().autoFound; + } + var r = await c.objednatZBurzy(jidlo); // objednat + if (r) { + const AndroidNotificationDetails androidPlatformChannelSpecifics = + AndroidNotificationDetails('opencanteen', 'autoburza', + channelDescription: 'Oznámení o objednání jídla z burzy', + importance: Importance.max, + priority: Priority.high, + ticker: 'burza success'); + const NotificationDetails platformChannelSpecifics = + NotificationDetails(android: androidPlatformChannelSpecifics); + await flutterLocalNotificationsPlugin.show( + 0, title, null, platformChannelSpecifics); + break; // ukončit pokud objednáno + } + } catch (e) { + const AndroidNotificationDetails androidPlatformChannelSpecifics = + AndroidNotificationDetails('opencanteen', 'autoburza', + channelDescription: 'Oznámení o objednání jídla z burzy', + importance: Importance.max, + priority: Priority.high, + ticker: 'burza fail'); + const NotificationDetails platformChannelSpecifics = + NotificationDetails(android: androidPlatformChannelSpecifics); + await flutterLocalNotificationsPlugin.show( + 0, + "CHYBA PŘI OBJEDNÁVÁNÍ ${jidlo.nazev}", + e.toString(), + platformChannelSpecifics); + } + } + } + BackgroundFetch.finish(taskId); +} + +void main() async { + WidgetsFlutterBinding.ensureInitialized(); + + const AndroidInitializationSettings initializationSettingsAndroid = + AndroidInitializationSettings('notif_icon'); + + /// Note: permissions aren't requested here just to demonstrate that can be + /// done later + final IOSInitializationSettings initializationSettingsIOS = + IOSInitializationSettings( + requestAlertPermission: false, + requestBadgePermission: false, + requestSoundPermission: false, + onDidReceiveLocalNotification: ( + int id, + String? title, + String? body, + String? payload, + ) async { + debugPrint(body); + }); + + final InitializationSettings initializationSettings = InitializationSettings( + android: initializationSettingsAndroid, + iOS: initializationSettingsIOS, + ); + await flutterLocalNotificationsPlugin.initialize(initializationSettings, + onSelectNotification: (String? payload) async { + if (payload != null) { + debugPrint('notification payload: $payload'); + } + }); + runApp(const MyApp()); + var prefs = await SharedPreferences.getInstance(); + + if (prefs.getBool("autoburza") ?? false) { + debugPrint("Nastavuji"); + BackgroundFetch.registerHeadlessTask(backgroundFetchHeadlessTask); + } } class MyApp extends StatelessWidget { @@ -77,21 +184,97 @@ class _LoginPageState extends State { TextEditingController canteenControl = TextEditingController(); bool rememberMe = false; + void nastavitPozadi() async { + // Configure BackgroundFetch. + int status = await BackgroundFetch.configure( + BackgroundFetchConfig( + minimumFetchInterval: 15, + stopOnTerminate: false, + enableHeadless: true, + requiresBatteryNotLow: false, + requiresCharging: false, + requiresStorageNotLow: false, + requiresDeviceIdle: false, + requiredNetworkType: NetworkType.ANY), (String taskId) async { + // Callback + debugPrint("[BackgroundFetch] Event získán $taskId"); + var d = await LoginManager.getDetails(); + if (d != null) { + var c = Canteen(d["url"]!); + await c.login(d["user"]!, d["pass"]!); + var burza = await c.ziskatBurzu(); + + for (var jidlo in burza) { + // DEBUG + var debugge = const AndroidNotificationDetails( + 'opencanteen', 'debugge', + channelDescription: 'Debug opencanteen', + importance: Importance.max, + priority: Priority.high, + ticker: 'burza debug'); + await flutterLocalNotificationsPlugin.show( + 0, + "Nalezeno jídlo ${jidlo.nazev}", + null, + NotificationDetails(android: debugge)); // TODO debug + try { + var r = await c.objednatZBurzy(jidlo); // objednat + if (r) { + const AndroidNotificationDetails androidPlatformChannelSpecifics = + AndroidNotificationDetails('opencanteen', 'autoburza', + channelDescription: 'Oznámení o objednání jídla z burzy', + importance: Importance.max, + priority: Priority.high, + ticker: 'burza success'); + const NotificationDetails platformChannelSpecifics = + NotificationDetails(android: androidPlatformChannelSpecifics); + await flutterLocalNotificationsPlugin.show( + 0, + Languages.of(context)!.autoFound, + null, + platformChannelSpecifics); + break; // ukončit pokud objednáno + } + } catch (e) { + const AndroidNotificationDetails androidPlatformChannelSpecifics = + AndroidNotificationDetails('opencanteen', 'autoburza', + channelDescription: 'Oznámení o objednání jídla z burzy', + importance: Importance.max, + priority: Priority.high, + ticker: 'burza fail'); + const NotificationDetails platformChannelSpecifics = + NotificationDetails(android: androidPlatformChannelSpecifics); + await flutterLocalNotificationsPlugin.show( + 0, + "CHYBA PŘI OBJEDNÁVÁNÍ ${jidlo.nazev}", + e.toString(), + platformChannelSpecifics); + } + } + } + BackgroundFetch.finish(taskId); + }, (String taskId) async { + debugPrint("[BackgroundFetch] TASK TIMEOUT taskId: $taskId"); + BackgroundFetch.finish(taskId); + }); + debugPrint('[BackgroundFetch] úspěšně nakonfigurováno: $status'); + } + @override void initState() { super.initState(); LoginManager.getDetails().then((r) async { - var connectivityResult = await (Connectivity().checkConnectivity()); - if (connectivityResult == ConnectivityResult.none) { - ScaffoldMessenger.of(context).hideCurrentSnackBar(); - ScaffoldMessenger.of(context).showSnackBar( - SnackBar( - content: Text(Languages.of(context)!.errorContacting), - ), - ); - goOffline(); + if (Platform.isIOS) { + await flutterLocalNotificationsPlugin + .resolvePlatformSpecificImplementation< + IOSFlutterLocalNotificationsPlugin>() + ?.requestPermissions( + alert: true, + badge: true, + sound: true, + ) ?? + false; } - if (r != null) { showDialog( context: context, @@ -120,6 +303,10 @@ class _LoginPageState extends State { ); return; } + var prefs = await SharedPreferences.getInstance(); + if (prefs.getBool("autoburza") ?? false) { + nastavitPozadi(); + } const storage = FlutterSecureStorage(); var odsouhlasil = await storage.read(key: "oc_souhlas"); if (odsouhlasil == null || odsouhlasil != "ano") { @@ -136,7 +323,13 @@ class _LoginPageState extends State { )), ); } - } catch (_) { + } catch (e) { + // DEBUG ODSTRANIT + showDialog( + context: context, + builder: (c) => SimpleDialog( + title: Text("Chyba"), children: [Text(e.toString())])); + ScaffoldMessenger.of(context).hideCurrentSnackBar(); ScaffoldMessenger.of(context).showSnackBar( SnackBar( @@ -205,30 +398,6 @@ class _LoginPageState extends State { ]), TextButton( onPressed: () async { - if (canteenControl.text.contains("http://")) { - // kontrolujeme šifrované spojení - var d = await showDialog( - context: context, - builder: (c) => AlertDialog( - title: Text(Languages.of(context)!.warning), - content: SingleChildScrollView( - child: Text( - Languages.of(context)!.httpLogin)), - actions: [ - TextButton( - onPressed: () => - Navigator.pop(c, true), - child: - Text(Languages.of(context)!.yes)), - TextButton( - onPressed: () => - Navigator.pop(c, false), - child: Text( - Languages.of(context)!.noChange)) - ], - )); - if (!d!) return; - } if (!canteenControl.text.startsWith("https://") && !canteenControl.text.startsWith("http://")) { canteenControl.text = @@ -266,12 +435,19 @@ class _LoginPageState extends State { Navigator.pushReplacement( context, MaterialPageRoute( - builder: (context) => JidelnicekPage( - canteen: canteen, - )), + builder: (context) => JidelnicekPage( + canteen: canteen, + ), + ), ); } - } on Exception catch (_) { + } on Exception catch (e) { + // TODO: DEBUG ODSTRANIT + showDialog( + context: context, + builder: (c) => SimpleDialog( + title: Text("Chyba"), + children: [Text(e.toString())])); ScaffoldMessenger.of(context).hideCurrentSnackBar(); ScaffoldMessenger.of(context).showSnackBar( SnackBar( diff --git a/lib/okna/about.dart b/lib/okna/about.dart index 59c95a5..e36dd79 100644 --- a/lib/okna/about.dart +++ b/lib/okna/about.dart @@ -26,8 +26,8 @@ class _AboutPageState extends State { const Text("OpenCanteen", style: TextStyle(fontSize: 30)), Text(Languages.of(context)!.copyright), InkWell( - onTap: () => launch( - "https://github.com/hernikplays/opencanteen/blob/main/LICENSE"), + onTap: () => launchUrl(Uri.parse( + "https://github.com/hernikplays/opencanteen/blob/main/LICENSE")), child: Text(Languages.of(context)!.license)), const SizedBox(height: 15), Text(Languages.of(context)!.usedLibs, @@ -44,9 +44,9 @@ class _AboutPageState extends State { "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"), + "Material Icons", + "Copyright Google. All rights reserved, licence Apache 2.0", + "https://github.com/google/material-design-icons/blob/master/LICENSE"), const SizedBox(height: 10), cudlik( "url_launcher", @@ -60,18 +60,32 @@ class _AboutPageState extends State { const SizedBox(height: 10), cudlik( "path_provider", - "Copyright 2013 The Flutter Authors. All rights reserved., licence BSD-3-Clause", + "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", + "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( "introduction_screen", "Copyright 2019 Jean-Charles Moussé, licence MIT", - "https://github.com/Pyozer/introduction_screen/blob/master/LICENSE") + "https://github.com/Pyozer/introduction_screen/blob/master/LICENSE"), + const SizedBox( + height: 10, + ), + cudlik( + "flutter_local_notifications", + "Copyright 2018 Michael Bui. All rights reserved, licence BSD 3-Clause", + "https://github.com/MaikuB/flutter_local_notifications/blob/master/flutter_local_notifications/LICENSE"), + const SizedBox( + height: 10, + ), + cudlik( + "background_fetch", + "Copyright (c) 2018 Transistor Software, licence MIT", + "https://github.com/transistorsoft/flutter_background_fetch/blob/master/LICENSE") ]), ), ), @@ -81,7 +95,7 @@ class _AboutPageState extends State { Widget cudlik(String nazev, String copyright, String licence) { return InkWell( - onTap: () => launch(licence), + onTap: () => launchUrl(Uri.parse(licence)), child: Column(children: [ Text( nazev, diff --git a/lib/okna/nastaveni.dart b/lib/okna/nastaveni.dart index bf39ac7..c52dc07 100644 --- a/lib/okna/nastaveni.dart +++ b/lib/okna/nastaveni.dart @@ -16,12 +16,14 @@ class Nastaveni extends StatefulWidget { class _NastaveniState extends State { bool _ukladatOffline = false; bool _preskakovatVikend = false; + bool _autoBurza = false; void najitNastaveni() async { var preferences = await SharedPreferences.getInstance(); setState(() { _ukladatOffline = preferences.getBool("offline") ?? false; _preskakovatVikend = preferences.getBool("skip") ?? false; + _autoBurza = preferences.getBool("autoburza") ?? false; }); } @@ -75,6 +77,37 @@ class _NastaveniState extends State { }); }) ], + ), + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Flexible( + child: Text(Languages.of(context)!.autoBurza), + ), + Switch( + value: _autoBurza, + onChanged: (value) { + if (value) { + showDialog( + context: context, + builder: (context) => AlertDialog( + title: Text(Languages.of(context)!.warning), + content: + Text(Languages.of(context)!.autoburzaNeeds), + actions: [ + TextButton( + onPressed: () => Navigator.of(context).pop(), + child: Text(Languages.of(context)!.ok)) + ], + ), + ); + } + setState(() { + _autoBurza = value; + zmenitNastaveni("autoburza", value); + }); + }) + ], ) ], ), diff --git a/pubspec.lock b/pubspec.lock index da74db2..2e7e624 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -14,21 +14,28 @@ packages: name: args url: "https://pub.dartlang.org" source: hosted - version: "2.3.0" + version: "2.3.1" async: dependency: transitive description: name: async url: "https://pub.dartlang.org" source: hosted - version: "2.8.2" + version: "2.9.0" + background_fetch: + dependency: "direct main" + description: + name: background_fetch + url: "https://pub.dartlang.org" + source: hosted + version: "1.1.0" canteenlib: dependency: "direct main" description: name: canteenlib url: "https://pub.dartlang.org" source: hosted - version: "0.1.0-alpha.16" + version: "0.1.0-alpha.17" characters: dependency: transitive description: @@ -36,13 +43,6 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "1.2.0" - charcode: - dependency: transitive - description: - name: charcode - url: "https://pub.dartlang.org" - source: hosted - version: "1.3.1" clock: dependency: transitive description: @@ -57,62 +57,20 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "1.16.0" - connectivity_plus: - dependency: "direct main" - description: - name: connectivity_plus - url: "https://pub.dartlang.org" - source: hosted - version: "2.2.1" - connectivity_plus_linux: - dependency: transitive - description: - name: connectivity_plus_linux - url: "https://pub.dartlang.org" - source: hosted - version: "1.3.0" - connectivity_plus_macos: - dependency: transitive - description: - name: connectivity_plus_macos - url: "https://pub.dartlang.org" - source: hosted - version: "1.2.1" - connectivity_plus_platform_interface: - dependency: transitive - description: - name: connectivity_plus_platform_interface - url: "https://pub.dartlang.org" - source: hosted - version: "1.2.0" - connectivity_plus_web: - dependency: transitive - description: - name: connectivity_plus_web - url: "https://pub.dartlang.org" - source: hosted - version: "1.2.0" - connectivity_plus_windows: - dependency: transitive - description: - name: connectivity_plus_windows - url: "https://pub.dartlang.org" - source: hosted - version: "1.2.0" crypto: dependency: transitive description: name: crypto url: "https://pub.dartlang.org" source: hosted - version: "3.0.1" + version: "3.0.2" dbus: dependency: transitive description: name: dbus url: "https://pub.dartlang.org" source: hosted - version: "0.7.2" + version: "0.7.3" dots_indicator: dependency: transitive description: @@ -126,7 +84,7 @@ packages: name: ffi url: "https://pub.dartlang.org" source: hosted - version: "1.1.2" + version: "1.2.1" file: dependency: transitive description: @@ -153,6 +111,27 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "1.0.4" + flutter_local_notifications: + dependency: "direct main" + description: + name: flutter_local_notifications + url: "https://pub.dartlang.org" + source: hosted + version: "9.5.3+1" + flutter_local_notifications_linux: + dependency: transitive + description: + name: flutter_local_notifications_linux + url: "https://pub.dartlang.org" + source: hosted + version: "0.4.2" + flutter_local_notifications_platform_interface: + dependency: transitive + description: + name: flutter_local_notifications_platform_interface + url: "https://pub.dartlang.org" + source: hosted + version: "5.0.0" flutter_localizations: dependency: "direct main" description: flutter @@ -218,7 +197,7 @@ packages: name: http_parser url: "https://pub.dartlang.org" source: hosted - version: "4.0.0" + version: "4.0.1" image: dependency: transitive description: @@ -268,13 +247,6 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "1.7.0" - nm: - dependency: transitive - description: - name: nm - url: "https://pub.dartlang.org" - source: hosted - version: "0.5.0" path: dependency: transitive description: @@ -288,56 +260,56 @@ packages: name: path_provider url: "https://pub.dartlang.org" source: hosted - version: "2.0.9" + version: "2.0.10" path_provider_android: dependency: transitive description: name: path_provider_android url: "https://pub.dartlang.org" source: hosted - version: "2.0.12" + version: "2.0.14" path_provider_ios: dependency: transitive description: name: path_provider_ios url: "https://pub.dartlang.org" source: hosted - version: "2.0.8" + version: "2.0.9" path_provider_linux: dependency: transitive description: name: path_provider_linux url: "https://pub.dartlang.org" source: hosted - version: "2.1.5" + version: "2.1.6" path_provider_macos: dependency: transitive description: name: path_provider_macos url: "https://pub.dartlang.org" source: hosted - version: "2.0.5" + version: "2.0.6" path_provider_platform_interface: dependency: transitive description: name: path_provider_platform_interface url: "https://pub.dartlang.org" source: hosted - version: "2.0.3" + version: "2.0.4" path_provider_windows: dependency: transitive description: name: path_provider_windows url: "https://pub.dartlang.org" source: hosted - version: "2.0.5" + version: "2.0.6" petitparser: dependency: transitive description: name: petitparser url: "https://pub.dartlang.org" source: hosted - version: "4.4.0" + version: "5.0.0" platform: dependency: transitive description: @@ -365,35 +337,35 @@ packages: name: shared_preferences url: "https://pub.dartlang.org" source: hosted - version: "2.0.13" + version: "2.0.15" shared_preferences_android: dependency: transitive description: name: shared_preferences_android url: "https://pub.dartlang.org" source: hosted - version: "2.0.11" + version: "2.0.12" shared_preferences_ios: dependency: transitive description: name: shared_preferences_ios url: "https://pub.dartlang.org" source: hosted - version: "2.1.0" + version: "2.1.1" shared_preferences_linux: dependency: transitive description: name: shared_preferences_linux url: "https://pub.dartlang.org" source: hosted - version: "2.1.0" + version: "2.1.1" shared_preferences_macos: dependency: transitive description: name: shared_preferences_macos url: "https://pub.dartlang.org" source: hosted - version: "2.0.3" + version: "2.0.4" shared_preferences_platform_interface: dependency: transitive description: @@ -407,14 +379,14 @@ packages: name: shared_preferences_web url: "https://pub.dartlang.org" source: hosted - version: "2.0.3" + version: "2.0.4" shared_preferences_windows: dependency: transitive description: name: shared_preferences_windows url: "https://pub.dartlang.org" source: hosted - version: "2.1.0" + version: "2.1.1" sky_engine: dependency: transitive description: flutter @@ -426,14 +398,14 @@ packages: name: source_span url: "https://pub.dartlang.org" source: hosted - version: "1.8.1" + version: "1.9.0" string_scanner: dependency: transitive description: name: string_scanner url: "https://pub.dartlang.org" source: hosted - version: "1.1.0" + version: "1.1.1" term_glyph: dependency: transitive description: @@ -441,48 +413,55 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "1.2.0" + timezone: + dependency: transitive + description: + name: timezone + url: "https://pub.dartlang.org" + source: hosted + version: "0.8.0" typed_data: dependency: transitive description: name: typed_data url: "https://pub.dartlang.org" source: hosted - version: "1.3.0" + version: "1.3.1" url_launcher: dependency: "direct main" description: name: url_launcher url: "https://pub.dartlang.org" source: hosted - version: "6.0.20" + version: "6.1.2" url_launcher_android: dependency: transitive description: name: url_launcher_android url: "https://pub.dartlang.org" source: hosted - version: "6.0.15" + version: "6.0.17" url_launcher_ios: dependency: transitive description: name: url_launcher_ios url: "https://pub.dartlang.org" source: hosted - version: "6.0.15" + version: "6.0.17" url_launcher_linux: dependency: transitive description: name: url_launcher_linux url: "https://pub.dartlang.org" source: hosted - version: "3.0.0" + version: "3.0.1" url_launcher_macos: dependency: transitive description: name: url_launcher_macos url: "https://pub.dartlang.org" source: hosted - version: "3.0.0" + version: "3.0.1" url_launcher_platform_interface: dependency: transitive description: @@ -496,14 +475,14 @@ packages: name: url_launcher_web url: "https://pub.dartlang.org" source: hosted - version: "2.0.9" + version: "2.0.11" url_launcher_windows: dependency: transitive description: name: url_launcher_windows url: "https://pub.dartlang.org" source: hosted - version: "3.0.0" + version: "3.0.1" vector_math: dependency: transitive description: @@ -517,7 +496,7 @@ packages: name: win32 url: "https://pub.dartlang.org" source: hosted - version: "2.5.2" + version: "2.6.1" xdg_directories: dependency: transitive description: @@ -531,14 +510,14 @@ packages: name: xml url: "https://pub.dartlang.org" source: hosted - version: "5.3.1" + version: "5.4.1" yaml: dependency: transitive description: name: yaml url: "https://pub.dartlang.org" source: hosted - version: "3.1.0" + version: "3.1.1" sdks: - dart: ">=2.17.0-0 <3.0.0" + dart: ">=2.17.0 <3.0.0" flutter: ">=2.10.0" diff --git a/pubspec.yaml b/pubspec.yaml index d755502..32ec3e3 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -6,23 +6,24 @@ publish_to: 'none' # The following defines the version and build number for your application. # A version number is three numbers separated by dots, like 1.2.43 # followed by an optional build number separated by a +. -version: 1.1.3+7 +version: 1.2.0-alpha.5+13 environment: - sdk: ">=2.16.1 <3.0.0" + sdk: ">=2.16.1 <4.0.0" dependencies: flutter: sdk: flutter flutter_localizations: sdk: flutter - canteenlib: ^0.1.0-alpha.16 - connectivity_plus: ^2.2.1 + canteenlib: ^0.1.0-alpha.17 flutter_secure_storage: ^5.0.2 url_launcher: ^6.0.20 path_provider: ^2.0.9 shared_preferences: ^2.0.13 introduction_screen: ^3.0.1 + flutter_local_notifications: ^9.5.3+1 + background_fetch: ^1.1.0 dev_dependencies: flutter_lints: ^1.0.0