64 Commits

Author SHA1 Message Date
7dea44d1e8 Merge remote-tracking branch 'origin/develop' into develop 2025-09-10 20:23:20 +02:00
5f27956035 fix webuntis auth retry not working correctly 2025-09-10 20:23:14 +02:00
32799f648c working ios build update 2025-09-09 13:58:00 +02:00
859b85ab2c Revert "Upgraded Gradle and Android Gradle Plugin"
This reverts commit bd1101c348.
2025-09-06 18:51:00 +02:00
bd1101c348 Upgraded Gradle and Android Gradle Plugin
Upgraded Gradle from 8.9 to 8.13 and the Android Gradle Plugin from 8.7.3 to 8.13.0.
2025-09-06 17:35:41 +02:00
f29c84d05c fixed timetable subject name requirement 2025-09-06 17:03:01 +02:00
7dbd6038f3 prevent common "change" tiles in timetable, more robust parsing 2025-09-06 16:47:47 +02:00
877633f4de Merge pull request 'develop-groupedParticipants' (#89) from develop-groupedParticipants into develop
Reviewed-on: #89
Reviewed-by: Elias Müller <elias@elias-mueller.com>
2025-09-06 14:12:10 +00:00
22d3d18a17 changed naming for participants 2025-09-06 16:09:47 +02:00
d65e61c297 Merge branch 'develop' into develop-groupedParticipants 2025-09-06 13:58:08 +00:00
467b0e0dd8 Merge remote-tracking branch 'origin/develop' into develop 2025-09-06 15:57:19 +02:00
25a6ef37fa Merge branch 'develop' into develop-groupedParticipants 2025-09-06 13:57:10 +00:00
34763ace4a Merge remote-tracking branch 'origin/develop' into develop 2025-09-06 15:57:08 +02:00
590a70c623 Merge remote-tracking branch 'origin/develop' into develop 2025-09-06 15:56:51 +02:00
9b58412ca7 fixed missing no reaction text
fixed loading indicator being delayed on file download
2025-09-06 15:56:46 +02:00
a6c16e41c2 fixed missing no reaction text
fixed loading indicator being delayed on file download
2025-09-06 15:56:28 +02:00
117434a5e3 Merge branch 'develop' into develop-groupedParticipants 2025-09-06 13:54:40 +00:00
e4582eaac5 removed commented code 2025-09-06 15:46:55 +02:00
430d5b8dc7 Merge remote-tracking branch 'origin/develop' into develop-groupedParticipants
# Conflicts:
#	pubspec.yaml
2025-09-06 15:36:12 +02:00
9177c30d6e fixed display dimensions of messages with files 2025-09-06 15:33:14 +02:00
344f8f6d2c Merge branch 'develop' into develop-fileMessagesWithText 2025-09-06 15:13:15 +02:00
46971a8d46 upgraded syncfusion dependencies 2025-09-06 14:51:14 +02:00
f330ef3f56 updated project dependencies and sdk. Comptaible with Flutter 3.35.3 2025-09-06 14:47:08 +02:00
85f9988453 renamed timetable in ui 2025-09-06 14:12:13 +02:00
f3de0bc165 centered file preview, made text copyable 2025-06-24 15:09:37 +02:00
421ee9179d grouped the participants list 2025-06-24 14:18:14 +02:00
0a66858d93 Merge pull request 'sorted participants list alphabetically' (#87) from develop-sortedParticipants into develop
Reviewed-on: #87
Reviewed-by: Elias Müller <elias@elias-mueller.com>
2025-06-24 10:47:07 +00:00
49428680de Merge branch 'develop' into develop-sortedParticipants 2025-06-24 10:46:58 +00:00
0c676dc3d6 made perticipants list stateless 2025-06-23 17:54:12 +02:00
c702b610c5 removed logging 2025-06-23 11:17:59 +02:00
5938c6b3c3 fixed chat search 2025-06-23 11:16:39 +02:00
8000475c1f aligned text to the left 2025-06-16 16:07:04 +02:00
da772f17cc changed file messages to show their text or their file name 2025-06-10 21:35:12 +02:00
c44b0464a4 sorted participants list alphabetically 2025-06-10 20:19:44 +02:00
9d0cf8e313 bumped version 2025-04-16 13:16:49 +02:00
f0009dad88 renamed files back to localized string 2025-04-16 13:15:31 +02:00
905206f242 added missing implementation of "note to self", disabled breakers in debug environments 2025-03-11 16:22:02 +01:00
769fbc1b6a added timetable color substitute teachers 2025-02-14 19:31:46 +01:00
8daf57bcee #75 pinned timetable to german timezone 2025-02-13 22:28:45 +01:00
33d488946a updated android configuration files 2025-02-09 20:42:47 +01:00
41a5e021c5 Merge pull request 'made app modules movable in their order' (#84) from develop-reorderableAppModules into develop
Reviewed-on: #84
Reviewed-by: Pupsi <larslukasneuhaus@gmx.de>
2025-02-09 17:36:20 +00:00
8f58893553 Merge branch 'develop' into develop-reorderableAppModules 2025-02-09 17:36:12 +00:00
626d3d5564 added minimum message drag distance for chat reply 2025-02-09 15:16:02 +01:00
d833cdb733 made app modules movable in their order 2025-02-09 15:06:14 +01:00
8868914a76 restructured settings and devtools 2025-02-08 23:21:20 +01:00
70e6f82b10 updated chat images loading animation 2025-02-08 22:53:14 +01:00
6651613331 fixed files cache not working correctly 2025-02-08 22:35:20 +01:00
9ad0f624de Merge remote-tracking branch 'origin/develop' into develop 2025-02-08 21:40:49 +01:00
82c143f847 bumped version 2025-02-08 21:40:39 +01:00
1fdf731b81 Merge pull request 'added option for timetable naming modes' (#83) from feature-timetableNamingSetting into develop
Reviewed-on: #83
Reviewed-by: Pupsi <larslukasneuhaus@gmx.de>
2025-01-24 22:27:06 +00:00
2d3ccd25b4 Merge branch 'develop' into feature-timetableNamingSetting 2025-01-24 22:26:52 +00:00
385ee806d6 updated feedback info text 2025-01-24 13:53:12 +01:00
92aef41031 updated room plan image 2025-01-24 11:54:35 +01:00
65b29ec4b8 added option for timetable naming modes 2025-01-24 11:50:14 +01:00
9f51d68531 updated build runner tasks 2025-01-24 11:02:03 +01:00
5bc4ba6332 replaced version wildcard with version range 2025-01-23 23:39:01 +01:00
e9739ac2d5 updated app badger 2025-01-23 22:41:22 +01:00
4d3a33dd9b updated project 2025-01-23 11:20:08 +01:00
ddeeaeaeac Merge pull request 'develop-bloc-holidays' (#72) from develop-bloc-holidays into develop
Reviewed-on: #72
Reviewed-by: Pupsi <larslukasneuhaus@gmx.de>
2024-06-23 21:00:45 +00:00
c8e31b896b added eof linebreak 2024-06-23 22:59:26 +02:00
c443a1d567 fixed disclaimer not showing on first visit 2024-06-23 20:31:43 +02:00
08ef784f57 Merge remote-tracking branch 'origin/develop' into develop-bloc-holidays 2024-06-22 16:47:15 +02:00
999e30ab3a added le-r10-certificate and removed/added some logging 2024-06-22 16:45:43 +02:00
c4c882a77d updated app screenshots 2024-06-14 22:20:54 +02:00
125 changed files with 1268 additions and 923 deletions

16
.gitignore vendored
View File

@@ -48,14 +48,14 @@ lib/generated_plugin_registrant.dart
#pubspec.lock #pubspec.lock
# Android related # Android related
**/android/**/gradle-wrapper.jar materials/screenshots/android/**/gradle-wrapper.jar
**/android/.gradle materials/screenshots/android/.gradle
**/android/captures/ materials/screenshots/android/captures/
**/android/gradlew materials/screenshots/android/gradlew
**/android/gradlew.bat materials/screenshots/android/gradlew.bat
**/android/key.properties materials/screenshots/android/key.properties
**/android/local.properties materials/screenshots/android/local.properties
**/android/**/GeneratedPluginRegistrant.java materials/screenshots/android/**/GeneratedPluginRegistrant.java
# iOS/XCode related # iOS/XCode related
**/ios/**/*.mode1v3 **/ios/**/*.mode1v3

View File

@@ -25,15 +25,16 @@ if (flutterVersionName == null) {
android { android {
namespace "eu.mhsl.marianum.mobile.client" namespace "eu.mhsl.marianum.mobile.client"
compileSdk flutter.compileSdkVersion compileSdk flutter.compileSdkVersion
ndkVersion flutter.ndkVersion ndkVersion "27.0.12077973"
compileOptions { compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8 sourceCompatibility JavaVersion.VERSION_17
targetCompatibility JavaVersion.VERSION_1_8 targetCompatibility JavaVersion.VERSION_17
coreLibraryDesugaringEnabled true
} }
kotlinOptions { kotlinOptions {
jvmTarget = '1.8' jvmTarget = '17'
} }
sourceSets { sourceSets {
@@ -41,11 +42,8 @@ android {
} }
defaultConfig { defaultConfig {
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
applicationId "eu.mhsl.marianum.mobile.client" applicationId "eu.mhsl.marianum.mobile.client"
// You can update the following values to match your application needs. minSdkVersion 26
// For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-gradle-build-configuration.
minSdkVersion 21
targetSdkVersion flutter.targetSdkVersion targetSdkVersion flutter.targetSdkVersion
versionCode flutterVersionCode.toInteger() versionCode flutterVersionCode.toInteger()
versionName flutterVersionName versionName flutterVersionName
@@ -66,5 +64,6 @@ flutter {
} }
dependencies { dependencies {
implementation 'com.android.support:multidex:1.0.3' implementation 'com.android.support:multidex:2.0.1'
coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:2.1.4'
} }

0
android/app/proguard-rules.pro vendored Normal file
View File

View File

@@ -1,3 +1,6 @@
org.gradle.jvmargs=-Xmx4G org.gradle.jvmargs=-Xmx4G
android.useAndroidX=true android.useAndroidX=true
android.enableJetifier=true android.enableJetifier=true
android.defaults.buildfeatures.buildconfig=true
android.nonTransitiveRClass=false
android.nonFinalResIds=false

View File

@@ -1,6 +1,7 @@
distributionBase=GRADLE_USER_HOME distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6.1-bin.zip distributionUrl=https\://services.gradle.org/distributions/gradle-8.9-bin.zip
networkTimeout=10000 networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists zipStorePath=wrapper/dists

View File

@@ -19,8 +19,8 @@ pluginManagement {
plugins { plugins {
id "dev.flutter.flutter-plugin-loader" version "1.0.0" id "dev.flutter.flutter-plugin-loader" version "1.0.0"
id "com.android.application" version "7.3.0" apply false id "com.android.application" version '8.7.3' apply false
id "org.jetbrains.kotlin.android" version "1.8.10" apply false id "org.jetbrains.kotlin.android" version "2.1.10" apply false
} }
include ":app" include ":app"

View File

@@ -0,0 +1,29 @@
-----BEGIN CERTIFICATE-----
MIIFBTCCAu2gAwIBAgIQS6hSk/eaL6JzBkuoBI110DANBgkqhkiG9w0BAQsFADBP
MQswCQYDVQQGEwJVUzEpMCcGA1UEChMgSW50ZXJuZXQgU2VjdXJpdHkgUmVzZWFy
Y2ggR3JvdXAxFTATBgNVBAMTDElTUkcgUm9vdCBYMTAeFw0yNDAzMTMwMDAwMDBa
Fw0yNzAzMTIyMzU5NTlaMDMxCzAJBgNVBAYTAlVTMRYwFAYDVQQKEw1MZXQncyBF
bmNyeXB0MQwwCgYDVQQDEwNSMTAwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEK
AoIBAQDPV+XmxFQS7bRH/sknWHZGUCiMHT6I3wWd1bUYKb3dtVq/+vbOo76vACFL
YlpaPAEvxVgD9on/jhFD68G14BQHlo9vH9fnuoE5CXVlt8KvGFs3Jijno/QHK20a
/6tYvJWuQP/py1fEtVt/eA0YYbwX51TGu0mRzW4Y0YCF7qZlNrx06rxQTOr8IfM4
FpOUurDTazgGzRYSespSdcitdrLCnF2YRVxvYXvGLe48E1KGAdlX5jgc3421H5KR
mudKHMxFqHJV8LDmowfs/acbZp4/SItxhHFYyTr6717yW0QrPHTnj7JHwQdqzZq3
DZb3EoEmUVQK7GH29/Xi8orIlQ2NAgMBAAGjgfgwgfUwDgYDVR0PAQH/BAQDAgGG
MB0GA1UdJQQWMBQGCCsGAQUFBwMCBggrBgEFBQcDATASBgNVHRMBAf8ECDAGAQH/
AgEAMB0GA1UdDgQWBBS7vMNHpeS8qcbDpHIMEI2iNeHI6DAfBgNVHSMEGDAWgBR5
tFnme7bl5AFzgAiIyBpY9umbbjAyBggrBgEFBQcBAQQmMCQwIgYIKwYBBQUHMAKG
Fmh0dHA6Ly94MS5pLmxlbmNyLm9yZy8wEwYDVR0gBAwwCjAIBgZngQwBAgEwJwYD
VR0fBCAwHjAcoBqgGIYWaHR0cDovL3gxLmMubGVuY3Iub3JnLzANBgkqhkiG9w0B
AQsFAAOCAgEAkrHnQTfreZ2B5s3iJeE6IOmQRJWjgVzPw139vaBw1bGWKCIL0vIo
zwzn1OZDjCQiHcFCktEJr59L9MhwTyAWsVrdAfYf+B9haxQnsHKNY67u4s5Lzzfd
u6PUzeetUK29v+PsPmI2cJkxp+iN3epi4hKu9ZzUPSwMqtCceb7qPVxEbpYxY1p9
1n5PJKBLBX9eb9LU6l8zSxPWV7bK3lG4XaMJgnT9x3ies7msFtpKK5bDtotij/l0
GaKeA97pb5uwD9KgWvaFXMIEt8jVTjLEvwRdvCn294GPDF08U8lAkIv7tghluaQh
1QnlE4SEN4LOECj8dsIGJXpGUk3aU3KkJz9icKy+aUgA+2cP21uh6NcDIS3XyfaZ
QjmDQ993ChII8SXWupQZVBiIpcWO4RqZk3lr7Bz5MUCwzDIA359e57SSq5CCkY0N
4B6Vulk7LktfwrdGNVI5BsC9qqxSwSKgRJeZ9wygIaehbHFHFhcBaMDKpiZlBHyz
rsnnlFXCb5s8HKn5LsUgGvB24L7sGNZP2CX7dhHov+YhD+jozLW2p9W4959Bz2Ei
RmqDtmiXLnzqTpXbI+suyCsohKRg6Un0RC47+cpiVwHiXZAW+cn8eiNIjqbVgXLx
KPpdzvvtTnOPlC7SQZSYmdunr3Bf9b77AiC/ZidstK36dRILKz7OA54=
-----END CERTIFICATE-----

Binary file not shown.

Before

Width:  |  Height:  |  Size: 108 KiB

After

Width:  |  Height:  |  Size: 101 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 185 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 154 KiB

BIN
ios/.DS_Store vendored

Binary file not shown.

View File

@@ -21,6 +21,6 @@
<key>CFBundleVersion</key> <key>CFBundleVersion</key>
<string>1.0</string> <string>1.0</string>
<key>MinimumOSVersion</key> <key>MinimumOSVersion</key>
<string>11.0</string> <string>13.0</string>
</dict> </dict>
</plist> </plist>

View File

@@ -1,5 +1,5 @@
# Uncomment this line to define a global platform for your project # Uncomment this line to define a global platform for your project
platform :ios, '11.0' platform :ios, '15.0'
# CocoaPods analytics sends network stats synchronously affecting flutter build latency. # CocoaPods analytics sends network stats synchronously affecting flutter build latency.
ENV['COCOAPODS_DISABLE_STATS'] = 'true' ENV['COCOAPODS_DISABLE_STATS'] = 'true'
@@ -31,6 +31,8 @@ target 'Runner' do
use_frameworks! use_frameworks!
use_modular_headers! use_modular_headers!
pod 'PhoneNumberKit', '~> 3.7.6'
flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__)) flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__))
# target 'RunnerTests' do # target 'RunnerTests' do
# inherit! :search_paths # inherit! :search_paths

View File

@@ -1,185 +1,194 @@
PODS: PODS:
- better_open_file (0.0.1): - connectivity_plus (0.0.1):
- Flutter - Flutter
- device_info_plus (0.0.1): - device_info_plus (0.0.1):
- Flutter - Flutter
- DKImagePickerController/Core (4.3.4): - DKImagePickerController/Core (4.3.9):
- DKImagePickerController/ImageDataManager - DKImagePickerController/ImageDataManager
- DKImagePickerController/Resource - DKImagePickerController/Resource
- DKImagePickerController/ImageDataManager (4.3.4) - DKImagePickerController/ImageDataManager (4.3.9)
- DKImagePickerController/PhotoGallery (4.3.4): - DKImagePickerController/PhotoGallery (4.3.9):
- DKImagePickerController/Core - DKImagePickerController/Core
- DKPhotoGallery - DKPhotoGallery
- DKImagePickerController/Resource (4.3.4) - DKImagePickerController/Resource (4.3.9)
- DKPhotoGallery (0.0.17): - DKPhotoGallery (0.0.19):
- DKPhotoGallery/Core (= 0.0.17) - DKPhotoGallery/Core (= 0.0.19)
- DKPhotoGallery/Model (= 0.0.17) - DKPhotoGallery/Model (= 0.0.19)
- DKPhotoGallery/Preview (= 0.0.17) - DKPhotoGallery/Preview (= 0.0.19)
- DKPhotoGallery/Resource (= 0.0.17) - DKPhotoGallery/Resource (= 0.0.19)
- SDWebImage - SDWebImage
- SwiftyGif - SwiftyGif
- DKPhotoGallery/Core (0.0.17): - DKPhotoGallery/Core (0.0.19):
- DKPhotoGallery/Model - DKPhotoGallery/Model
- DKPhotoGallery/Preview - DKPhotoGallery/Preview
- SDWebImage - SDWebImage
- SwiftyGif - SwiftyGif
- DKPhotoGallery/Model (0.0.17): - DKPhotoGallery/Model (0.0.19):
- SDWebImage - SDWebImage
- SwiftyGif - SwiftyGif
- DKPhotoGallery/Preview (0.0.17): - DKPhotoGallery/Preview (0.0.19):
- DKPhotoGallery/Model - DKPhotoGallery/Model
- DKPhotoGallery/Resource - DKPhotoGallery/Resource
- SDWebImage - SDWebImage
- SwiftyGif - SwiftyGif
- DKPhotoGallery/Resource (0.0.17): - DKPhotoGallery/Resource (0.0.19):
- SDWebImage - SDWebImage
- SwiftyGif - SwiftyGif
- emoji_picker_flutter (0.0.1):
- Flutter
- fast_rsa (0.6.0): - fast_rsa (0.6.0):
- Flutter - Flutter
- file_picker (0.0.1): - file_picker (0.0.1):
- DKImagePickerController/PhotoGallery - DKImagePickerController/PhotoGallery
- Flutter - Flutter
- Firebase/CoreOnly (10.12.0): - Firebase/CoreOnly (12.2.0):
- FirebaseCore (= 10.12.0) - FirebaseCore (~> 12.2.0)
- Firebase/InAppMessaging (10.12.0): - Firebase/InAppMessaging (12.2.0):
- Firebase/CoreOnly - Firebase/CoreOnly
- FirebaseInAppMessaging (~> 10.12.0-beta) - FirebaseInAppMessaging (~> 12.2.0-beta)
- Firebase/Messaging (10.12.0): - Firebase/Messaging (12.2.0):
- Firebase/CoreOnly - Firebase/CoreOnly
- FirebaseMessaging (~> 10.12.0) - FirebaseMessaging (~> 12.2.0)
- firebase_core (2.15.1): - firebase_core (4.1.0):
- Firebase/CoreOnly (= 10.12.0) - Firebase/CoreOnly (= 12.2.0)
- Flutter - Flutter
- firebase_in_app_messaging (0.7.3-5): - firebase_in_app_messaging (0.9.0-1):
- Firebase/InAppMessaging (= 10.12.0) - Firebase/InAppMessaging (= 12.2.0)
- firebase_core - firebase_core
- Flutter - Flutter
- firebase_messaging (14.6.6): - firebase_messaging (16.0.1):
- Firebase/Messaging (= 10.12.0) - Firebase/Messaging (= 12.2.0)
- firebase_core - firebase_core
- Flutter - Flutter
- FirebaseABTesting (10.13.0): - FirebaseABTesting (12.2.0):
- FirebaseCore (~> 10.0) - FirebaseCore (~> 12.2.0)
- FirebaseCore (10.12.0): - FirebaseCore (12.2.0):
- FirebaseCoreInternal (~> 10.0) - FirebaseCoreInternal (~> 12.2.0)
- GoogleUtilities/Environment (~> 7.8) - GoogleUtilities/Environment (~> 8.1)
- GoogleUtilities/Logger (~> 7.8) - GoogleUtilities/Logger (~> 8.1)
- FirebaseCoreInternal (10.13.0): - FirebaseCoreInternal (12.2.0):
- "GoogleUtilities/NSData+zlib (~> 7.8)" - "GoogleUtilities/NSData+zlib (~> 8.1)"
- FirebaseInAppMessaging (10.12.0-beta): - FirebaseInAppMessaging (12.2.0-beta):
- FirebaseABTesting (~> 10.0) - FirebaseABTesting (~> 12.2.0)
- FirebaseCore (~> 10.0) - FirebaseCore (~> 12.2.0)
- FirebaseInstallations (~> 10.0) - FirebaseInstallations (~> 12.2.0)
- GoogleUtilities/Environment (~> 7.8) - GoogleUtilities/Environment (~> 8.1)
- nanopb (< 2.30910.0, >= 2.30908.0) - GoogleUtilities/UserDefaults (~> 8.1)
- FirebaseInstallations (10.13.0): - nanopb (~> 3.30910.0)
- FirebaseCore (~> 10.0) - FirebaseInstallations (12.2.0):
- GoogleUtilities/Environment (~> 7.8) - FirebaseCore (~> 12.2.0)
- GoogleUtilities/UserDefaults (~> 7.8) - GoogleUtilities/Environment (~> 8.1)
- PromisesObjC (~> 2.1) - GoogleUtilities/UserDefaults (~> 8.1)
- FirebaseMessaging (10.12.0): - PromisesObjC (~> 2.4)
- FirebaseCore (~> 10.0) - FirebaseMessaging (12.2.0):
- FirebaseInstallations (~> 10.0) - FirebaseCore (~> 12.2.0)
- GoogleDataTransport (~> 9.2) - FirebaseInstallations (~> 12.2.0)
- GoogleUtilities/AppDelegateSwizzler (~> 7.8) - GoogleDataTransport (~> 10.1)
- GoogleUtilities/Environment (~> 7.8) - GoogleUtilities/AppDelegateSwizzler (~> 8.1)
- GoogleUtilities/Reachability (~> 7.8) - GoogleUtilities/Environment (~> 8.1)
- GoogleUtilities/UserDefaults (~> 7.8) - GoogleUtilities/Reachability (~> 8.1)
- nanopb (< 2.30910.0, >= 2.30908.0) - GoogleUtilities/UserDefaults (~> 8.1)
- nanopb (~> 3.30910.0)
- Flutter (1.0.0) - Flutter (1.0.0)
- flutter_app_badger (1.3.0): - flutter_app_badge (2.0.0):
- Flutter - Flutter
- flutter_local_notifications (0.0.1): - flutter_local_notifications (0.0.1):
- Flutter - Flutter
- flutter_native_splash (0.0.1): - flutter_native_splash (2.4.3):
- Flutter - Flutter
- fluttertoast (0.0.2): - GoogleDataTransport (10.1.0):
- Flutter - nanopb (~> 3.30910.0)
- Toast - PromisesObjC (~> 2.4)
- FMDB (2.7.5): - GoogleUtilities/AppDelegateSwizzler (8.1.0):
- FMDB/standard (= 2.7.5)
- FMDB/standard (2.7.5)
- GoogleDataTransport (9.2.5):
- GoogleUtilities/Environment (~> 7.7)
- nanopb (< 2.30910.0, >= 2.30908.0)
- PromisesObjC (< 3.0, >= 1.2)
- GoogleUtilities/AppDelegateSwizzler (7.11.5):
- GoogleUtilities/Environment - GoogleUtilities/Environment
- GoogleUtilities/Logger - GoogleUtilities/Logger
- GoogleUtilities/Network - GoogleUtilities/Network
- GoogleUtilities/Environment (7.11.5): - GoogleUtilities/Privacy
- PromisesObjC (< 3.0, >= 1.2) - GoogleUtilities/Environment (8.1.0):
- GoogleUtilities/Logger (7.11.5): - GoogleUtilities/Privacy
- GoogleUtilities/Logger (8.1.0):
- GoogleUtilities/Environment - GoogleUtilities/Environment
- GoogleUtilities/Network (7.11.5): - GoogleUtilities/Privacy
- GoogleUtilities/Network (8.1.0):
- GoogleUtilities/Logger - GoogleUtilities/Logger
- "GoogleUtilities/NSData+zlib" - "GoogleUtilities/NSData+zlib"
- GoogleUtilities/Privacy
- GoogleUtilities/Reachability - GoogleUtilities/Reachability
- "GoogleUtilities/NSData+zlib (7.11.5)" - "GoogleUtilities/NSData+zlib (8.1.0)":
- GoogleUtilities/Reachability (7.11.5): - GoogleUtilities/Privacy
- GoogleUtilities/Privacy (8.1.0)
- GoogleUtilities/Reachability (8.1.0):
- GoogleUtilities/Logger - GoogleUtilities/Logger
- GoogleUtilities/UserDefaults (7.11.5): - GoogleUtilities/Privacy
- GoogleUtilities/UserDefaults (8.1.0):
- GoogleUtilities/Logger - GoogleUtilities/Logger
- GoogleUtilities/Privacy
- image_picker_ios (0.0.1): - image_picker_ios (0.0.1):
- Flutter - Flutter
- in_app_review (2.0.0):
- Flutter
- libphonenumber_plugin (0.0.1): - libphonenumber_plugin (0.0.1):
- Flutter - Flutter
- PhoneNumberKit - PhoneNumberKit
- nanopb (2.30909.0): - nanopb (3.30910.0):
- nanopb/decode (= 2.30909.0) - nanopb/decode (= 3.30910.0)
- nanopb/encode (= 2.30909.0) - nanopb/encode (= 3.30910.0)
- nanopb/decode (2.30909.0) - nanopb/decode (3.30910.0)
- nanopb/encode (2.30909.0) - nanopb/encode (3.30910.0)
- package_info (0.0.1): - open_filex (0.0.2):
- Flutter
- package_info_plus (0.4.5):
- Flutter - Flutter
- path_provider_foundation (0.0.1): - path_provider_foundation (0.0.1):
- Flutter - Flutter
- FlutterMacOS - FlutterMacOS
- PhoneNumberKit (3.6.7): - PhoneNumberKit (3.7.11):
- PhoneNumberKit/PhoneNumberKitCore (= 3.6.7) - PhoneNumberKit/PhoneNumberKitCore (= 3.7.11)
- PhoneNumberKit/UIKit (= 3.6.7) - PhoneNumberKit/UIKit (= 3.7.11)
- PhoneNumberKit/PhoneNumberKitCore (3.6.7) - PhoneNumberKit/PhoneNumberKitCore (3.7.11)
- PhoneNumberKit/UIKit (3.6.7): - PhoneNumberKit/UIKit (3.7.11):
- PhoneNumberKit/PhoneNumberKitCore - PhoneNumberKit/PhoneNumberKitCore
- PromisesObjC (2.3.1) - PromisesObjC (2.4.0)
- SDWebImage (5.17.0): - SDWebImage (5.21.2):
- SDWebImage/Core (= 5.17.0) - SDWebImage/Core (= 5.21.2)
- SDWebImage/Core (5.17.0) - SDWebImage/Core (5.21.2)
- share_plus (0.0.1): - share_plus (0.0.1):
- Flutter - Flutter
- shared_preferences_foundation (0.0.1): - shared_preferences_foundation (0.0.1):
- Flutter - Flutter
- FlutterMacOS - FlutterMacOS
- sqflite (0.0.3): - sqflite_darwin (0.0.4):
- Flutter - Flutter
- FMDB (>= 2.7.5) - FlutterMacOS
- SwiftyGif (5.4.4) - SwiftyGif (5.4.5)
- syncfusion_flutter_pdfviewer (0.0.1): - syncfusion_flutter_pdfviewer (0.0.1):
- Flutter - Flutter
- Toast (4.0.0)
- url_launcher_ios (0.0.1): - url_launcher_ios (0.0.1):
- Flutter - Flutter
DEPENDENCIES: DEPENDENCIES:
- better_open_file (from `.symlinks/plugins/better_open_file/ios`) - connectivity_plus (from `.symlinks/plugins/connectivity_plus/ios`)
- device_info_plus (from `.symlinks/plugins/device_info_plus/ios`) - device_info_plus (from `.symlinks/plugins/device_info_plus/ios`)
- emoji_picker_flutter (from `.symlinks/plugins/emoji_picker_flutter/ios`)
- fast_rsa (from `.symlinks/plugins/fast_rsa/ios`) - fast_rsa (from `.symlinks/plugins/fast_rsa/ios`)
- file_picker (from `.symlinks/plugins/file_picker/ios`) - file_picker (from `.symlinks/plugins/file_picker/ios`)
- firebase_core (from `.symlinks/plugins/firebase_core/ios`) - firebase_core (from `.symlinks/plugins/firebase_core/ios`)
- firebase_in_app_messaging (from `.symlinks/plugins/firebase_in_app_messaging/ios`) - firebase_in_app_messaging (from `.symlinks/plugins/firebase_in_app_messaging/ios`)
- firebase_messaging (from `.symlinks/plugins/firebase_messaging/ios`) - firebase_messaging (from `.symlinks/plugins/firebase_messaging/ios`)
- Flutter (from `Flutter`) - Flutter (from `Flutter`)
- flutter_app_badger (from `.symlinks/plugins/flutter_app_badger/ios`) - flutter_app_badge (from `.symlinks/plugins/flutter_app_badge/ios`)
- flutter_local_notifications (from `.symlinks/plugins/flutter_local_notifications/ios`) - flutter_local_notifications (from `.symlinks/plugins/flutter_local_notifications/ios`)
- flutter_native_splash (from `.symlinks/plugins/flutter_native_splash/ios`) - flutter_native_splash (from `.symlinks/plugins/flutter_native_splash/ios`)
- fluttertoast (from `.symlinks/plugins/fluttertoast/ios`)
- image_picker_ios (from `.symlinks/plugins/image_picker_ios/ios`) - image_picker_ios (from `.symlinks/plugins/image_picker_ios/ios`)
- in_app_review (from `.symlinks/plugins/in_app_review/ios`)
- libphonenumber_plugin (from `.symlinks/plugins/libphonenumber_plugin/ios`) - libphonenumber_plugin (from `.symlinks/plugins/libphonenumber_plugin/ios`)
- package_info (from `.symlinks/plugins/package_info/ios`) - open_filex (from `.symlinks/plugins/open_filex/ios`)
- package_info_plus (from `.symlinks/plugins/package_info_plus/ios`)
- path_provider_foundation (from `.symlinks/plugins/path_provider_foundation/darwin`) - path_provider_foundation (from `.symlinks/plugins/path_provider_foundation/darwin`)
- PhoneNumberKit (~> 3.7.6)
- share_plus (from `.symlinks/plugins/share_plus/ios`) - share_plus (from `.symlinks/plugins/share_plus/ios`)
- shared_preferences_foundation (from `.symlinks/plugins/shared_preferences_foundation/darwin`) - shared_preferences_foundation (from `.symlinks/plugins/shared_preferences_foundation/darwin`)
- sqflite (from `.symlinks/plugins/sqflite/ios`) - sqflite_darwin (from `.symlinks/plugins/sqflite_darwin/darwin`)
- syncfusion_flutter_pdfviewer (from `.symlinks/plugins/syncfusion_flutter_pdfviewer/ios`) - syncfusion_flutter_pdfviewer (from `.symlinks/plugins/syncfusion_flutter_pdfviewer/ios`)
- url_launcher_ios (from `.symlinks/plugins/url_launcher_ios/ios`) - url_launcher_ios (from `.symlinks/plugins/url_launcher_ios/ios`)
@@ -194,7 +203,6 @@ SPEC REPOS:
- FirebaseInAppMessaging - FirebaseInAppMessaging
- FirebaseInstallations - FirebaseInstallations
- FirebaseMessaging - FirebaseMessaging
- FMDB
- GoogleDataTransport - GoogleDataTransport
- GoogleUtilities - GoogleUtilities
- nanopb - nanopb
@@ -202,13 +210,14 @@ SPEC REPOS:
- PromisesObjC - PromisesObjC
- SDWebImage - SDWebImage
- SwiftyGif - SwiftyGif
- Toast
EXTERNAL SOURCES: EXTERNAL SOURCES:
better_open_file: connectivity_plus:
:path: ".symlinks/plugins/better_open_file/ios" :path: ".symlinks/plugins/connectivity_plus/ios"
device_info_plus: device_info_plus:
:path: ".symlinks/plugins/device_info_plus/ios" :path: ".symlinks/plugins/device_info_plus/ios"
emoji_picker_flutter:
:path: ".symlinks/plugins/emoji_picker_flutter/ios"
fast_rsa: fast_rsa:
:path: ".symlinks/plugins/fast_rsa/ios" :path: ".symlinks/plugins/fast_rsa/ios"
file_picker: file_picker:
@@ -221,74 +230,76 @@ EXTERNAL SOURCES:
:path: ".symlinks/plugins/firebase_messaging/ios" :path: ".symlinks/plugins/firebase_messaging/ios"
Flutter: Flutter:
:path: Flutter :path: Flutter
flutter_app_badger: flutter_app_badge:
:path: ".symlinks/plugins/flutter_app_badger/ios" :path: ".symlinks/plugins/flutter_app_badge/ios"
flutter_local_notifications: flutter_local_notifications:
:path: ".symlinks/plugins/flutter_local_notifications/ios" :path: ".symlinks/plugins/flutter_local_notifications/ios"
flutter_native_splash: flutter_native_splash:
:path: ".symlinks/plugins/flutter_native_splash/ios" :path: ".symlinks/plugins/flutter_native_splash/ios"
fluttertoast:
:path: ".symlinks/plugins/fluttertoast/ios"
image_picker_ios: image_picker_ios:
:path: ".symlinks/plugins/image_picker_ios/ios" :path: ".symlinks/plugins/image_picker_ios/ios"
in_app_review:
:path: ".symlinks/plugins/in_app_review/ios"
libphonenumber_plugin: libphonenumber_plugin:
:path: ".symlinks/plugins/libphonenumber_plugin/ios" :path: ".symlinks/plugins/libphonenumber_plugin/ios"
package_info: open_filex:
:path: ".symlinks/plugins/package_info/ios" :path: ".symlinks/plugins/open_filex/ios"
package_info_plus:
:path: ".symlinks/plugins/package_info_plus/ios"
path_provider_foundation: path_provider_foundation:
:path: ".symlinks/plugins/path_provider_foundation/darwin" :path: ".symlinks/plugins/path_provider_foundation/darwin"
share_plus: share_plus:
:path: ".symlinks/plugins/share_plus/ios" :path: ".symlinks/plugins/share_plus/ios"
shared_preferences_foundation: shared_preferences_foundation:
:path: ".symlinks/plugins/shared_preferences_foundation/darwin" :path: ".symlinks/plugins/shared_preferences_foundation/darwin"
sqflite: sqflite_darwin:
:path: ".symlinks/plugins/sqflite/ios" :path: ".symlinks/plugins/sqflite_darwin/darwin"
syncfusion_flutter_pdfviewer: syncfusion_flutter_pdfviewer:
:path: ".symlinks/plugins/syncfusion_flutter_pdfviewer/ios" :path: ".symlinks/plugins/syncfusion_flutter_pdfviewer/ios"
url_launcher_ios: url_launcher_ios:
:path: ".symlinks/plugins/url_launcher_ios/ios" :path: ".symlinks/plugins/url_launcher_ios/ios"
SPEC CHECKSUMS: SPEC CHECKSUMS:
better_open_file: 03cf320415d4d3f46b6e00adc4a567d76c1a399d connectivity_plus: cb623214f4e1f6ef8fe7403d580fdad517d2f7dd
device_info_plus: 7545d84d8d1b896cb16a4ff98c19f07ec4b298ea device_info_plus: 21fcca2080fbcd348be798aa36c3e5ed849eefbe
DKImagePickerController: b512c28220a2b8ac7419f21c491fc8534b7601ac DKImagePickerController: 946cec48c7873164274ecc4624d19e3da4c1ef3c
DKPhotoGallery: fdfad5125a9fdda9cc57df834d49df790dbb4179 DKPhotoGallery: b3834fecb755ee09a593d7c9e389d8b5d6deed60
fast_rsa: f696740d492d562e76f17b0a81dfc8ec3e635374 emoji_picker_flutter: ece213fc274bdddefb77d502d33080dc54e616cc
file_picker: ce3938a0df3cc1ef404671531facef740d03f920 fast_rsa: 8cf0f70421610bbe9462db881cdeef1cdd626153
Firebase: 07150e75d142fb9399f6777fa56a187b17f833a0 file_picker: a0560bc09d61de87f12d246fc47d2119e6ef37be
firebase_core: 4a3246a02f828a01c74a2c26427037786d90f17f Firebase: 26f6f8d460603af3df970ad505b16b15f5e2e9a1
firebase_in_app_messaging: aebdbc10109a0ce44a3294f4ea57ed89ebe1d8bd firebase_core: 3ff52146406557dddd01d570e807e203ec7e1302
firebase_messaging: 13b378c8449cae7ec96c79570170943dd73d4738 firebase_in_app_messaging: 42894eb8e92aa83ac58f1c534dc9f9f9546f23b9
FirebaseABTesting: 86ac5a4fc749088bb4d55a1cbfb2c4cb42c6d5de firebase_messaging: 3dcc998dd98e1e54af75d0cccae8606eba43553c
FirebaseCore: f86a1394906b97ac445ae49c92552a9425831bed FirebaseABTesting: 32f3fc079d72c9b93e000b60877c4e4f62ef7031
FirebaseCoreInternal: b342e37cd4f5b4454ec34308f073420e7920858e FirebaseCore: 311c48a147ad4a0ab7febbaed89e8025c67510cd
FirebaseInAppMessaging: dc24f50aebaf81a377f0b8abf360778f94208931 FirebaseCoreInternal: 56ea29f3dad2894f81b060f706f9d53509b6ed3b
FirebaseInstallations: b28af1b9f997f1a799efe818c94695a3728c352f FirebaseInAppMessaging: fecba63d44c5cd8f874e9d661a5aa5047380c7d0
FirebaseMessaging: bb2c4f6422a753038fe137d90ae7c1af57251316 FirebaseInstallations: 3e884b01feabdf67582a80f3250425a00979b4ed
Flutter: f04841e97a9d0b0a8025694d0796dd46242b2854 FirebaseMessaging: 43ec73bbfedd0c385a849bb91593ab4ad4b9e48e
flutter_app_badger: b87fc231847b03b92ce1412aa351842e7e97932f Flutter: cabc95a1d2626b1b06e7179b784ebcf0c0cde467
flutter_local_notifications: 0c0b1ae97e741e1521e4c1629a459d04b9aec743 flutter_app_badge: ca742dd659a157c1090ef7cd881cb78f48f3bcdf
flutter_native_splash: 52501b97d1c0a5f898d687f1646226c1f93c56ef flutter_local_notifications: a5a732f069baa862e728d839dd2ebb904737effb
fluttertoast: fafc4fa4d01a6a9e4f772ecd190ffa525e9e2d9c flutter_native_splash: c32d145d68aeda5502d5f543ee38c192065986cf
FMDB: 2ce00b547f966261cd18927a3ddb07cb6f3db82a GoogleDataTransport: aae35b7ea0c09004c3797d53c8c41f66f219d6a7
GoogleDataTransport: 54dee9d48d14580407f8f5fbf2f496e92437a2f2 GoogleUtilities: 00c88b9a86066ef77f0da2fab05f65d7768ed8e1
GoogleUtilities: 13e2c67ede716b8741c7989e26893d151b2b2084 image_picker_ios: 7fe1ff8e34c1790d6fff70a32484959f563a928a
image_picker_ios: 4a8aadfbb6dc30ad5141a2ce3832af9214a705b5 in_app_review: 5596fe56fab799e8edb3561c03d053363ab13457
libphonenumber_plugin: e8a7d64a6624a7c25f2c4ab0b7ead2a8e341e35e libphonenumber_plugin: d134f173b22bfa5ede50887071f087f309277f8c
nanopb: b552cce312b6c8484180ef47159bc0f65a1f0431 nanopb: fad817b59e0457d11a5dfbde799381cd727c1275
package_info: 873975fc26034f0b863a300ad47e7f1ac6c7ec62 open_filex: 432f3cd11432da3e39f47fcc0df2b1603854eff1
path_provider_foundation: 29f094ae23ebbca9d3d0cec13889cd9060c0e943 package_info_plus: af8e2ca6888548050f16fa2f1938db7b5a5df499
PhoneNumberKit: 43b5169526cc417398c8f13f77c97552c1c6ed76 path_provider_foundation: 080d55be775b7414fd5a5ef3ac137b97b097e564
PromisesObjC: c50d2056b5253dadbd6c2bea79b0674bd5a52fa4 PhoneNumberKit: ced55861269312a5e3bc2ef82a58d6255b1c976a
SDWebImage: 750adf017a315a280c60fde706ab1e552a3ae4e9 PromisesObjC: f5707f49cb48b9636751c5b2e7d227e43fba9f47
share_plus: 599aa54e4ea31d4b4c0e9c911bcc26c55e791028 SDWebImage: 9f177d83116802728e122410fb25ad88f5c7608a
shared_preferences_foundation: 5b919d13b803cadd15ed2dc053125c68730e5126 share_plus: 50da8cb520a8f0f65671c6c6a99b3617ed10a58a
sqflite: 31f7eba61e3074736dff8807a9b41581e4f7f15a shared_preferences_foundation: 9e1978ff2562383bd5676f64ec4e9aa8fa06a6f7
SwiftyGif: 93a1cc87bf3a51916001cf8f3d63835fb64c819f sqflite_darwin: 20b2a3a3b70e43edae938624ce550a3cbf66a3d0
syncfusion_flutter_pdfviewer: bb9998884b864cfedf72628df3503bdf57e397c0 SwiftyGif: 706c60cf65fa2bc5ee0313beece843c8eb8194d4
Toast: 91b396c56ee72a5790816f40d3a94dd357abc196 syncfusion_flutter_pdfviewer: 90dc48305d2e33d4aa20681d1e98ddeda891bc14
url_launcher_ios: 08a3dfac5fb39e8759aeb0abbd5d9480f30fc8b4 url_launcher_ios: 694010445543906933d732453a59da0a173ae33d
PODFILE CHECKSUM: 3d89a90682e2cd438911ad748b8ba5992f8b6a0e PODFILE CHECKSUM: e21c9d4c7b9623c73c6784ddc132fd50a603ad93
COCOAPODS: 1.12.1 COCOAPODS: 1.16.2

View File

@@ -144,6 +144,7 @@
9705A1C41CF9048500538489 /* Embed Frameworks */, 9705A1C41CF9048500538489 /* Embed Frameworks */,
3B06AD1E1E4923F5004D2608 /* Thin Binary */, 3B06AD1E1E4923F5004D2608 /* Thin Binary */,
174B54D80220E5F588BD9737 /* [CP] Embed Pods Frameworks */, 174B54D80220E5F588BD9737 /* [CP] Embed Pods Frameworks */,
859FAB4E05FAC31B7B1A62D7 /* [CP] Copy Pods Resources */,
); );
buildRules = ( buildRules = (
); );
@@ -161,7 +162,7 @@
isa = PBXProject; isa = PBXProject;
attributes = { attributes = {
BuildIndependentTargetsInParallel = YES; BuildIndependentTargetsInParallel = YES;
LastUpgradeCheck = 1430; LastUpgradeCheck = 1510;
ORGANIZATIONNAME = ""; ORGANIZATIONNAME = "";
TargetAttributes = { TargetAttributes = {
97C146ED1CF9000F007C117D = { 97C146ED1CF9000F007C117D = {
@@ -237,6 +238,23 @@
shellPath = /bin/sh; shellPath = /bin/sh;
shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin"; shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin";
}; };
859FAB4E05FAC31B7B1A62D7 /* [CP] Copy Pods Resources */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputFileListPaths = (
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources-${CONFIGURATION}-input-files.xcfilelist",
);
name = "[CP] Copy Pods Resources";
outputFileListPaths = (
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources-${CONFIGURATION}-output-files.xcfilelist",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources.sh\"\n";
showEnvVarsInLog = 0;
};
9740EEB61CF901F6004384FC /* Run Script */ = { 9740EEB61CF901F6004384FC /* Run Script */ = {
isa = PBXShellScriptBuildPhase; isa = PBXShellScriptBuildPhase;
alwaysOutOfDate = 1; alwaysOutOfDate = 1;
@@ -349,7 +367,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES; GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 11.0; IPHONEOS_DEPLOYMENT_TARGET = 13.0;
MTL_ENABLE_DEBUG_INFO = NO; MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos; SDKROOT = iphoneos;
SUPPORTED_PLATFORMS = iphoneos; SUPPORTED_PLATFORMS = iphoneos;
@@ -434,7 +452,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES; GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 11.0; IPHONEOS_DEPLOYMENT_TARGET = 13.0;
MTL_ENABLE_DEBUG_INFO = YES; MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES; ONLY_ACTIVE_ARCH = YES;
SDKROOT = iphoneos; SDKROOT = iphoneos;
@@ -483,7 +501,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES; GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 11.0; IPHONEOS_DEPLOYMENT_TARGET = 13.0;
MTL_ENABLE_DEBUG_INFO = NO; MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos; SDKROOT = iphoneos;
SUPPORTED_PLATFORMS = iphoneos; SUPPORTED_PLATFORMS = iphoneos;

View File

@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<Scheme <Scheme
LastUpgradeVersion = "1430" LastUpgradeVersion = "1510"
version = "1.3"> version = "1.3">
<BuildAction <BuildAction
parallelizeBuildables = "YES" parallelizeBuildables = "YES"
@@ -26,6 +26,7 @@
buildConfiguration = "Debug" buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
customLLDBInitFile = "$(SRCROOT)/Flutter/ephemeral/flutter_lldbinit"
shouldUseLaunchSchemeArgsEnv = "YES"> shouldUseLaunchSchemeArgsEnv = "YES">
<MacroExpansion> <MacroExpansion>
<BuildableReference <BuildableReference
@@ -43,11 +44,13 @@
buildConfiguration = "Debug" buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
customLLDBInitFile = "$(SRCROOT)/Flutter/ephemeral/flutter_lldbinit"
launchStyle = "0" launchStyle = "0"
useCustomWorkingDirectory = "NO" useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO" ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES" debugDocumentVersioning = "YES"
debugServiceExtension = "internal" debugServiceExtension = "internal"
enableGPUValidationMode = "1"
allowLocationSimulation = "YES"> allowLocationSimulation = "YES">
<BuildableProductRunnable <BuildableProductRunnable
runnableDebuggingMode = "0"> runnableDebuggingMode = "0">

View File

@@ -1,7 +1,7 @@
import UIKit import UIKit
import Flutter import Flutter
@UIApplicationMain @main
@objc class AppDelegate: FlutterAppDelegate { @objc class AppDelegate: FlutterAppDelegate {
override func application( override func application(
_ application: UIApplication, _ application: UIApplication,

View File

@@ -5,5 +5,5 @@ abstract class ApiResponse {
late http.Response rawResponse; late http.Response rawResponse;
@JsonKey(includeIfNull: false) @JsonKey(includeIfNull: false)
late Map<String, String>? headers; Map<String, String>? headers;
} }

View File

@@ -16,26 +16,19 @@ GetHolidaysResponse _$GetHolidaysResponseFromJson(Map<String, dynamic> json) =>
(k, e) => MapEntry(k, e as String), (k, e) => MapEntry(k, e as String),
); );
Map<String, dynamic> _$GetHolidaysResponseToJson(GetHolidaysResponse instance) { Map<String, dynamic> _$GetHolidaysResponseToJson(
final val = <String, dynamic>{}; GetHolidaysResponse instance) =>
<String, dynamic>{
void writeNotNull(String key, dynamic value) { if (instance.headers case final value?) 'headers': value,
if (value != null) { 'data': instance.data.map((e) => e.toJson()).toList(),
val[key] = value; };
}
}
writeNotNull('headers', instance.headers);
val['data'] = instance.data.map((e) => e.toJson()).toList();
return val;
}
GetHolidaysResponseObject _$GetHolidaysResponseObjectFromJson( GetHolidaysResponseObject _$GetHolidaysResponseObjectFromJson(
Map<String, dynamic> json) => Map<String, dynamic> json) =>
GetHolidaysResponseObject( GetHolidaysResponseObject(
start: json['start'] as String, start: json['start'] as String,
end: json['end'] as String, end: json['end'] as String,
year: json['year'] as int, year: (json['year'] as num).toInt(),
stateCode: json['stateCode'] as String, stateCode: json['stateCode'] as String,
name: json['name'] as String, name: json['name'] as String,
slug: json['slug'] as String, slug: json['slug'] as String,

View File

@@ -18,7 +18,7 @@ class AutocompleteResponseObject {
String label; String label;
String? icon; String? icon;
String? source; String? source;
List<String>? status; String? status;
String? subline; String? subline;
String? shareWithDisplayNameUniqe; String? shareWithDisplayNameUniqe;

View File

@@ -28,7 +28,7 @@ AutocompleteResponseObject _$AutocompleteResponseObjectFromJson(
json['label'] as String, json['label'] as String,
json['icon'] as String?, json['icon'] as String?,
json['source'] as String?, json['source'] as String?,
(json['status'] as List<dynamic>?)?.map((e) => e as String).toList(), json['status'] as String?,
json['subline'] as String?, json['subline'] as String?,
json['shareWithDisplayNameUniqe'] as String?, json['shareWithDisplayNameUniqe'] as String?,
); );

View File

@@ -9,7 +9,7 @@ part of 'fileSharingApiParams.dart';
FileSharingApiParams _$FileSharingApiParamsFromJson( FileSharingApiParams _$FileSharingApiParamsFromJson(
Map<String, dynamic> json) => Map<String, dynamic> json) =>
FileSharingApiParams( FileSharingApiParams(
shareType: json['shareType'] as int, shareType: (json['shareType'] as num).toInt(),
shareWith: json['shareWith'] as String, shareWith: json['shareWith'] as String,
path: json['path'] as String, path: json['path'] as String,
referenceId: json['referenceId'] as String?, referenceId: json['referenceId'] as String?,

View File

@@ -10,37 +10,32 @@ GetChatParams _$GetChatParamsFromJson(Map<String, dynamic> json) =>
GetChatParams( GetChatParams(
lookIntoFuture: lookIntoFuture:
$enumDecode(_$GetChatParamsSwitchEnumMap, json['lookIntoFuture']), $enumDecode(_$GetChatParamsSwitchEnumMap, json['lookIntoFuture']),
limit: json['limit'] as int?, limit: (json['limit'] as num?)?.toInt(),
lastKnownMessageId: json['lastKnownMessageId'] as int?, lastKnownMessageId: (json['lastKnownMessageId'] as num?)?.toInt(),
lastCommonReadId: json['lastCommonReadId'] as int?, lastCommonReadId: (json['lastCommonReadId'] as num?)?.toInt(),
timeout: json['timeout'] as int?, timeout: (json['timeout'] as num?)?.toInt(),
setReadMarker: $enumDecodeNullable( setReadMarker: $enumDecodeNullable(
_$GetChatParamsSwitchEnumMap, json['setReadMarker']), _$GetChatParamsSwitchEnumMap, json['setReadMarker']),
includeLastKnown: $enumDecodeNullable( includeLastKnown: $enumDecodeNullable(
_$GetChatParamsSwitchEnumMap, json['includeLastKnown']), _$GetChatParamsSwitchEnumMap, json['includeLastKnown']),
); );
Map<String, dynamic> _$GetChatParamsToJson(GetChatParams instance) { Map<String, dynamic> _$GetChatParamsToJson(GetChatParams instance) =>
final val = <String, dynamic>{ <String, dynamic>{
'lookIntoFuture': _$GetChatParamsSwitchEnumMap[instance.lookIntoFuture]!, 'lookIntoFuture': _$GetChatParamsSwitchEnumMap[instance.lookIntoFuture]!,
}; if (instance.limit case final value?) 'limit': value,
if (instance.lastKnownMessageId case final value?)
void writeNotNull(String key, dynamic value) { 'lastKnownMessageId': value,
if (value != null) { if (instance.lastCommonReadId case final value?)
val[key] = value; 'lastCommonReadId': value,
} if (instance.timeout case final value?) 'timeout': value,
} if (_$GetChatParamsSwitchEnumMap[instance.setReadMarker]
case final value?)
writeNotNull('limit', instance.limit); 'setReadMarker': value,
writeNotNull('lastKnownMessageId', instance.lastKnownMessageId); if (_$GetChatParamsSwitchEnumMap[instance.includeLastKnown]
writeNotNull('lastCommonReadId', instance.lastCommonReadId); case final value?)
writeNotNull('timeout', instance.timeout); 'includeLastKnown': value,
writeNotNull( };
'setReadMarker', _$GetChatParamsSwitchEnumMap[instance.setReadMarker]);
writeNotNull('includeLastKnown',
_$GetChatParamsSwitchEnumMap[instance.includeLastKnown]);
return val;
}
const _$GetChatParamsSwitchEnumMap = { const _$GetChatParamsSwitchEnumMap = {
GetChatParamsSwitch.on: 1, GetChatParamsSwitch.on: 1,

View File

@@ -15,30 +15,22 @@ GetChatResponse _$GetChatResponseFromJson(Map<String, dynamic> json) =>
(k, e) => MapEntry(k, e as String), (k, e) => MapEntry(k, e as String),
); );
Map<String, dynamic> _$GetChatResponseToJson(GetChatResponse instance) { Map<String, dynamic> _$GetChatResponseToJson(GetChatResponse instance) =>
final val = <String, dynamic>{}; <String, dynamic>{
if (instance.headers case final value?) 'headers': value,
void writeNotNull(String key, dynamic value) { 'data': instance.data.map((e) => e.toJson()).toList(),
if (value != null) { };
val[key] = value;
}
}
writeNotNull('headers', instance.headers);
val['data'] = instance.data.map((e) => e.toJson()).toList();
return val;
}
GetChatResponseObject _$GetChatResponseObjectFromJson( GetChatResponseObject _$GetChatResponseObjectFromJson(
Map<String, dynamic> json) => Map<String, dynamic> json) =>
GetChatResponseObject( GetChatResponseObject(
json['id'] as int, (json['id'] as num).toInt(),
json['token'] as String, json['token'] as String,
$enumDecode( $enumDecode(
_$GetRoomResponseObjectMessageActorTypeEnumMap, json['actorType']), _$GetRoomResponseObjectMessageActorTypeEnumMap, json['actorType']),
json['actorId'] as String, json['actorId'] as String,
json['actorDisplayName'] as String, json['actorDisplayName'] as String,
json['timestamp'] as int, (json['timestamp'] as num).toInt(),
json['systemMessage'] as String, json['systemMessage'] as String,
$enumDecode( $enumDecode(
_$GetRoomResponseObjectMessageTypeEnumMap, json['messageType']), _$GetRoomResponseObjectMessageTypeEnumMap, json['messageType']),
@@ -47,7 +39,7 @@ GetChatResponseObject _$GetChatResponseObjectFromJson(
json['message'] as String, json['message'] as String,
_fromJson(json['messageParameters']), _fromJson(json['messageParameters']),
(json['reactions'] as Map<String, dynamic>?)?.map( (json['reactions'] as Map<String, dynamic>?)?.map(
(k, e) => MapEntry(k, e as int), (k, e) => MapEntry(k, (e as num).toInt()),
), ),
(json['reactionsSelf'] as List<dynamic>?) (json['reactionsSelf'] as List<dynamic>?)
?.map((e) => e as String) ?.map((e) => e as String)

View File

@@ -8,7 +8,7 @@ part of 'createRoomParams.dart';
CreateRoomParams _$CreateRoomParamsFromJson(Map<String, dynamic> json) => CreateRoomParams _$CreateRoomParamsFromJson(Map<String, dynamic> json) =>
CreateRoomParams( CreateRoomParams(
roomType: json['roomType'] as int, roomType: (json['roomType'] as num).toInt(),
invite: json['invite'] as String, invite: json['invite'] as String,
source: json['source'] as String?, source: json['source'] as String?,
roomName: json['roomName'] as String?, roomName: json['roomName'] as String?,

View File

@@ -55,12 +55,15 @@ class GetParticipantsResponseObject {
} }
enum GetParticipantsResponseObjectParticipantType { enum GetParticipantsResponseObjectParticipantType {
@JsonValue(1) owner, @JsonValue(1) owner('Besitzer'),
@JsonValue(2) moderator, @JsonValue(2) moderator('Moderator'),
@JsonValue(3) user, @JsonValue(3) user('Teilnehmer'),
@JsonValue(4) guest, @JsonValue(4) guest('Gast'),
@JsonValue(5) userFollowingPublicLink, @JsonValue(5) userFollowingPublicLink('Teilnehmer über Link'),
@JsonValue(6) guestWithModeratorPermissions @JsonValue(6) guestWithModeratorPermissions('Gast Moderator');
const GetParticipantsResponseObjectParticipantType(this.prettyName);
final String prettyName;
} }
enum GetParticipantsResponseObjectParticipantsInCallFlags { enum GetParticipantsResponseObjectParticipantsInCallFlags {

View File

@@ -18,34 +18,26 @@ GetParticipantsResponse _$GetParticipantsResponseFromJson(
); );
Map<String, dynamic> _$GetParticipantsResponseToJson( Map<String, dynamic> _$GetParticipantsResponseToJson(
GetParticipantsResponse instance) { GetParticipantsResponse instance) =>
final val = <String, dynamic>{}; <String, dynamic>{
if (instance.headers case final value?) 'headers': value,
void writeNotNull(String key, dynamic value) { 'data': instance.data.map((e) => e.toJson()).toList(),
if (value != null) { };
val[key] = value;
}
}
writeNotNull('headers', instance.headers);
val['data'] = instance.data.map((e) => e.toJson()).toList();
return val;
}
GetParticipantsResponseObject _$GetParticipantsResponseObjectFromJson( GetParticipantsResponseObject _$GetParticipantsResponseObjectFromJson(
Map<String, dynamic> json) => Map<String, dynamic> json) =>
GetParticipantsResponseObject( GetParticipantsResponseObject(
json['attendeeId'] as int, (json['attendeeId'] as num).toInt(),
json['actorType'] as String, json['actorType'] as String,
json['actorId'] as String, json['actorId'] as String,
json['displayName'] as String, json['displayName'] as String,
$enumDecode(_$GetParticipantsResponseObjectParticipantTypeEnumMap, $enumDecode(_$GetParticipantsResponseObjectParticipantTypeEnumMap,
json['participantType']), json['participantType']),
json['lastPing'] as int, (json['lastPing'] as num).toInt(),
$enumDecode(_$GetParticipantsResponseObjectParticipantsInCallFlagsEnumMap, $enumDecode(_$GetParticipantsResponseObjectParticipantsInCallFlagsEnumMap,
json['inCall']), json['inCall']),
json['permissions'] as int, (json['permissions'] as num).toInt(),
json['attendeePermissions'] as int, (json['attendeePermissions'] as num).toInt(),
json['sessionId'] as String?, json['sessionId'] as String?,
(json['sessionIds'] as List<dynamic>).map((e) => e as String).toList(), (json['sessionIds'] as List<dynamic>).map((e) => e as String).toList(),
json['status'] as String?, json['status'] as String?,

View File

@@ -22,20 +22,12 @@ GetReactionsResponse _$GetReactionsResponseFromJson(
); );
Map<String, dynamic> _$GetReactionsResponseToJson( Map<String, dynamic> _$GetReactionsResponseToJson(
GetReactionsResponse instance) { GetReactionsResponse instance) =>
final val = <String, dynamic>{}; <String, dynamic>{
if (instance.headers case final value?) 'headers': value,
void writeNotNull(String key, dynamic value) { 'data': instance.data
if (value != null) { .map((k, e) => MapEntry(k, e.map((e) => e.toJson()).toList())),
val[key] = value; };
}
}
writeNotNull('headers', instance.headers);
val['data'] = instance.data
.map((k, e) => MapEntry(k, e.map((e) => e.toJson()).toList()));
return val;
}
GetReactionsResponseObject _$GetReactionsResponseObjectFromJson( GetReactionsResponseObject _$GetReactionsResponseObjectFromJson(
Map<String, dynamic> json) => Map<String, dynamic> json) =>
@@ -44,7 +36,7 @@ GetReactionsResponseObject _$GetReactionsResponseObjectFromJson(
_$GetReactionsResponseObjectActorTypeEnumMap, json['actorType']), _$GetReactionsResponseObjectActorTypeEnumMap, json['actorType']),
json['actorId'] as String, json['actorId'] as String,
json['actorDisplayName'] as String, json['actorDisplayName'] as String,
json['timestamp'] as int, (json['timestamp'] as num).toInt(),
); );
Map<String, dynamic> _$GetReactionsResponseObjectToJson( Map<String, dynamic> _$GetReactionsResponseObjectToJson(

View File

@@ -11,7 +11,7 @@ GetRoomParams _$GetRoomParamsFromJson(Map<String, dynamic> json) =>
noStatusUpdate: $enumDecodeNullable( noStatusUpdate: $enumDecodeNullable(
_$GetRoomParamsStatusUpdateEnumMap, json['noStatusUpdate']), _$GetRoomParamsStatusUpdateEnumMap, json['noStatusUpdate']),
includeStatus: json['includeStatus'] as bool?, includeStatus: json['includeStatus'] as bool?,
modifiedSince: json['modifiedSince'] as int?, modifiedSince: (json['modifiedSince'] as num?)?.toInt(),
); );
Map<String, dynamic> _$GetRoomParamsToJson(GetRoomParams instance) => Map<String, dynamic> _$GetRoomParamsToJson(GetRoomParams instance) =>

View File

@@ -110,6 +110,7 @@ enum GetRoomResponseObjectConversationType {
@JsonValue(3) public, @JsonValue(3) public,
@JsonValue(4) changelog, @JsonValue(4) changelog,
@JsonValue(5) deleted, @JsonValue(5) deleted,
@JsonValue(6) noteToSelf,
} }
enum GetRoomResponseObjectParticipantNotificationLevel { enum GetRoomResponseObjectParticipantNotificationLevel {

View File

@@ -15,50 +15,42 @@ GetRoomResponse _$GetRoomResponseFromJson(Map<String, dynamic> json) =>
(k, e) => MapEntry(k, e as String), (k, e) => MapEntry(k, e as String),
); );
Map<String, dynamic> _$GetRoomResponseToJson(GetRoomResponse instance) { Map<String, dynamic> _$GetRoomResponseToJson(GetRoomResponse instance) =>
final val = <String, dynamic>{}; <String, dynamic>{
if (instance.headers case final value?) 'headers': value,
void writeNotNull(String key, dynamic value) { 'data': instance.data.map((e) => e.toJson()).toList(),
if (value != null) { };
val[key] = value;
}
}
writeNotNull('headers', instance.headers);
val['data'] = instance.data.map((e) => e.toJson()).toList();
return val;
}
GetRoomResponseObject _$GetRoomResponseObjectFromJson( GetRoomResponseObject _$GetRoomResponseObjectFromJson(
Map<String, dynamic> json) => Map<String, dynamic> json) =>
GetRoomResponseObject( GetRoomResponseObject(
json['id'] as int, (json['id'] as num).toInt(),
json['token'] as String, json['token'] as String,
$enumDecode(_$GetRoomResponseObjectConversationTypeEnumMap, json['type']), $enumDecode(_$GetRoomResponseObjectConversationTypeEnumMap, json['type']),
json['name'] as String, json['name'] as String,
json['displayName'] as String, json['displayName'] as String,
json['description'] as String, json['description'] as String,
json['participantType'] as int, (json['participantType'] as num).toInt(),
json['participantFlags'] as int, (json['participantFlags'] as num).toInt(),
json['readOnly'] as int, (json['readOnly'] as num).toInt(),
json['listable'] as int, (json['listable'] as num).toInt(),
json['lastPing'] as int, (json['lastPing'] as num).toInt(),
json['sessionId'] as String, json['sessionId'] as String,
json['hasPassword'] as bool, json['hasPassword'] as bool,
json['hasCall'] as bool, json['hasCall'] as bool,
json['callFlag'] as int, (json['callFlag'] as num).toInt(),
json['canStartCall'] as bool, json['canStartCall'] as bool,
json['canDeleteConversation'] as bool, json['canDeleteConversation'] as bool,
json['canLeaveConversation'] as bool, json['canLeaveConversation'] as bool,
json['lastActivity'] as int, (json['lastActivity'] as num).toInt(),
json['isFavorite'] as bool, json['isFavorite'] as bool,
$enumDecode(_$GetRoomResponseObjectParticipantNotificationLevelEnumMap, $enumDecode(_$GetRoomResponseObjectParticipantNotificationLevelEnumMap,
json['notificationLevel']), json['notificationLevel']),
json['unreadMessages'] as int, (json['unreadMessages'] as num).toInt(),
json['unreadMention'] as bool, json['unreadMention'] as bool,
json['unreadMentionDirect'] as bool, json['unreadMentionDirect'] as bool,
json['lastReadMessage'] as int, (json['lastReadMessage'] as num).toInt(),
json['lastCommonReadMessage'] as int, (json['lastCommonReadMessage'] as num).toInt(),
GetChatResponseObject.fromJson( GetChatResponseObject.fromJson(
json['lastMessage'] as Map<String, dynamic>), json['lastMessage'] as Map<String, dynamic>),
json['status'] as String?, json['status'] as String?,
@@ -110,6 +102,7 @@ const _$GetRoomResponseObjectConversationTypeEnumMap = {
GetRoomResponseObjectConversationType.public: 3, GetRoomResponseObjectConversationType.public: 3,
GetRoomResponseObjectConversationType.changelog: 4, GetRoomResponseObjectConversationType.changelog: 4,
GetRoomResponseObjectConversationType.deleted: 5, GetRoomResponseObjectConversationType.deleted: 5,
GetRoomResponseObjectConversationType.noteToSelf: 6,
}; };
const _$GetRoomResponseObjectParticipantNotificationLevelEnumMap = { const _$GetRoomResponseObjectParticipantNotificationLevelEnumMap = {

View File

@@ -12,17 +12,8 @@ SendMessageParams _$SendMessageParamsFromJson(Map<String, dynamic> json) =>
replyTo: json['replyTo'] as String?, replyTo: json['replyTo'] as String?,
); );
Map<String, dynamic> _$SendMessageParamsToJson(SendMessageParams instance) { Map<String, dynamic> _$SendMessageParamsToJson(SendMessageParams instance) =>
final val = <String, dynamic>{ <String, dynamic>{
'message': instance.message, 'message': instance.message,
}; if (instance.replyTo case final value?) 'replyTo': value,
};
void writeNotNull(String key, dynamic value) {
if (value != null) {
val[key] = value;
}
}
writeNotNull('replyTo', instance.replyTo);
return val;
}

View File

@@ -8,7 +8,7 @@ part of 'setReadMarkerParams.dart';
SetReadMarkerParams _$SetReadMarkerParamsFromJson(Map<String, dynamic> json) => SetReadMarkerParams _$SetReadMarkerParamsFromJson(Map<String, dynamic> json) =>
SetReadMarkerParams( SetReadMarkerParams(
lastReadMessage: json['lastReadMessage'] as int?, lastReadMessage: (json['lastReadMessage'] as num?)?.toInt(),
); );
Map<String, dynamic> _$SetReadMarkerParamsToJson( Map<String, dynamic> _$SetReadMarkerParamsToJson(

View File

@@ -58,11 +58,9 @@ abstract class TalkApi<T extends ApiResponse?> extends ApiRequest {
assembled?.headers = data.headers; assembled?.headers = data.headers;
return assembled; return assembled;
} catch (e) { } catch (e) {
// TODO report error var message = 'Error assembling Talk API ${T.toString()} message: ${e.toString()} response with request body: $body and request headers: ${headers.toString()}';
log('Error assembling Talk API ${T.toString()} message: ${e.toString()} response on ${endpoint.path} with request body: $body and request headers: ${headers.toString()}'); log(message);
throw Exception(message);
} }
throw Exception('Error assembling Talk API response');
} }
} }

View File

@@ -12,7 +12,7 @@ CacheableFile _$CacheableFileFromJson(Map<String, dynamic> json) =>
isDirectory: json['isDirectory'] as bool, isDirectory: json['isDirectory'] as bool,
name: json['name'] as String, name: json['name'] as String,
mimeType: json['mimeType'] as String?, mimeType: json['mimeType'] as String?,
size: json['size'] as int?, size: (json['size'] as num?)?.toInt(),
eTag: json['eTag'] as String?, eTag: json['eTag'] as String?,
createdAt: json['createdAt'] == null createdAt: json['createdAt'] == null
? null ? null

View File

@@ -15,16 +15,8 @@ ListFilesResponse _$ListFilesResponseFromJson(Map<String, dynamic> json) =>
(k, e) => MapEntry(k, e as String), (k, e) => MapEntry(k, e as String),
); );
Map<String, dynamic> _$ListFilesResponseToJson(ListFilesResponse instance) { Map<String, dynamic> _$ListFilesResponseToJson(ListFilesResponse instance) =>
final val = <String, dynamic>{}; <String, dynamic>{
if (instance.headers case final value?) 'headers': value,
void writeNotNull(String key, dynamic value) { 'files': instance.files.map((e) => e.toJson()).toList(),
if (value != null) { };
val[key] = value;
}
}
writeNotNull('headers', instance.headers);
val['files'] = instance.files.map((e) => e.toJson()).toList();
return val;
}

View File

@@ -17,20 +17,13 @@ GetBreakersResponse _$GetBreakersResponseFromJson(Map<String, dynamic> json) =>
(k, e) => MapEntry(k, e as String), (k, e) => MapEntry(k, e as String),
); );
Map<String, dynamic> _$GetBreakersResponseToJson(GetBreakersResponse instance) { Map<String, dynamic> _$GetBreakersResponseToJson(
final val = <String, dynamic>{}; GetBreakersResponse instance) =>
<String, dynamic>{
void writeNotNull(String key, dynamic value) { if (instance.headers case final value?) 'headers': value,
if (value != null) { 'global': instance.global.toJson(),
val[key] = value; 'regional': instance.regional.map((k, e) => MapEntry(k, e.toJson())),
} };
}
writeNotNull('headers', instance.headers);
val['global'] = instance.global.toJson();
val['regional'] = instance.regional.map((k, e) => MapEntry(k, e.toJson()));
return val;
}
GetBreakersReponseObject _$GetBreakersReponseObjectFromJson( GetBreakersReponseObject _$GetBreakersReponseObjectFromJson(
Map<String, dynamic> json) => Map<String, dynamic> json) =>

View File

@@ -17,16 +17,8 @@ GetCustomTimetableEventResponse _$GetCustomTimetableEventResponseFromJson(
); );
Map<String, dynamic> _$GetCustomTimetableEventResponseToJson( Map<String, dynamic> _$GetCustomTimetableEventResponseToJson(
GetCustomTimetableEventResponse instance) { GetCustomTimetableEventResponse instance) =>
final val = <String, dynamic>{}; <String, dynamic>{
if (instance.headers case final value?) 'headers': value,
void writeNotNull(String key, dynamic value) { 'events': instance.events,
if (value != null) { };
val[key] = value;
}
}
writeNotNull('headers', instance.headers);
val['events'] = instance.events;
return val;
}

View File

@@ -20,7 +20,7 @@ class NotifyRegister extends MhslApi<void> {
@override @override
Future<http.Response> request(Uri uri) { Future<http.Response> request(Uri uri) {
var requestString = jsonEncode(params.toJson()); var requestString = jsonEncode(params.toJson());
log(requestString); log('register at push proxy with username ${params.username}');
return http.post(uri, body: requestString); return http.post(uri, body: requestString);
} }
} }

View File

@@ -11,7 +11,7 @@ AddFeedbackParams _$AddFeedbackParamsFromJson(Map<String, dynamic> json) =>
user: json['user'] as String, user: json['user'] as String,
feedback: json['feedback'] as String, feedback: json['feedback'] as String,
screenshot: json['screenshot'] as String?, screenshot: json['screenshot'] as String?,
appVersion: json['appVersion'] as int, appVersion: (json['appVersion'] as num).toInt(),
); );
Map<String, dynamic> _$AddFeedbackParamsToJson(AddFeedbackParams instance) => Map<String, dynamic> _$AddFeedbackParamsToJson(AddFeedbackParams instance) =>

View File

@@ -12,7 +12,7 @@ UpdateUserIndexParams _$UpdateUserIndexParamsFromJson(
user: json['user'] as String, user: json['user'] as String,
username: json['username'] as String, username: json['username'] as String,
device: json['device'] as String, device: json['device'] as String,
appVersion: json['appVersion'] as int, appVersion: (json['appVersion'] as num).toInt(),
deviceInfo: json['deviceInfo'] as String, deviceInfo: json['deviceInfo'] as String,
); );

View File

@@ -4,7 +4,7 @@ import 'dart:developer';
import 'package:device_info_plus/device_info_plus.dart'; import 'package:device_info_plus/device_info_plus.dart';
import 'package:http/http.dart' as http; import 'package:http/http.dart' as http;
import 'package:package_info/package_info.dart'; import 'package:package_info_plus/package_info_plus.dart';
import '../../../../../model/accountData.dart'; import '../../../../../model/accountData.dart';
import '../../../mhslApi.dart'; import '../../../mhslApi.dart';
@@ -20,7 +20,7 @@ class UpdateUserIndex extends MhslApi<void> {
@override @override
Future<http.Response> request(Uri uri) { Future<http.Response> request(Uri uri) {
var data = jsonEncode(params.toJson()); var data = jsonEncode(params.toJson());
log('Updating userindex:\n $data'); log('Updating userindex: ${data.length}');
return http.post(uri, body: data); return http.post(uri, body: data);
} }

View File

@@ -3,7 +3,6 @@ import 'dart:convert';
import 'package:localstore/localstore.dart'; import 'package:localstore/localstore.dart';
import 'apiResponse.dart'; import 'apiResponse.dart';
import 'webuntis/webuntisError.dart';
abstract class RequestCache<T extends ApiResponse?> { abstract class RequestCache<T extends ApiResponse?> {
static const int cacheNothing = 0; static const int cacheNothing = 0;
@@ -40,7 +39,7 @@ abstract class RequestCache<T extends ApiResponse?> {
'json': jsonEncode(newValue), 'json': jsonEncode(newValue),
'lastupdate': DateTime.now().millisecondsSinceEpoch 'lastupdate': DateTime.now().millisecondsSinceEpoch
}); });
} on WebuntisError catch(e) { } on Exception catch(e) {
onError(e); onError(e);
} }
} }

View File

@@ -10,27 +10,19 @@ AuthenticateResponse _$AuthenticateResponseFromJson(
Map<String, dynamic> json) => Map<String, dynamic> json) =>
AuthenticateResponse( AuthenticateResponse(
json['sessionId'] as String, json['sessionId'] as String,
json['personType'] as int, (json['personType'] as num).toInt(),
json['personId'] as int, (json['personId'] as num).toInt(),
json['klasseId'] as int, (json['klasseId'] as num).toInt(),
)..headers = (json['headers'] as Map<String, dynamic>?)?.map( )..headers = (json['headers'] as Map<String, dynamic>?)?.map(
(k, e) => MapEntry(k, e as String), (k, e) => MapEntry(k, e as String),
); );
Map<String, dynamic> _$AuthenticateResponseToJson( Map<String, dynamic> _$AuthenticateResponseToJson(
AuthenticateResponse instance) { AuthenticateResponse instance) =>
final val = <String, dynamic>{}; <String, dynamic>{
if (instance.headers case final value?) 'headers': value,
void writeNotNull(String key, dynamic value) { 'sessionId': instance.sessionId,
if (value != null) { 'personType': instance.personType,
val[key] = value; 'personId': instance.personId,
} 'klasseId': instance.klasseId,
} };
writeNotNull('headers', instance.headers);
val['sessionId'] = instance.sessionId;
val['personType'] = instance.personType;
val['personId'] = instance.personId;
val['klasseId'] = instance.klasseId;
return val;
}

View File

@@ -16,28 +16,21 @@ GetHolidaysResponse _$GetHolidaysResponseFromJson(Map<String, dynamic> json) =>
(k, e) => MapEntry(k, e as String), (k, e) => MapEntry(k, e as String),
); );
Map<String, dynamic> _$GetHolidaysResponseToJson(GetHolidaysResponse instance) { Map<String, dynamic> _$GetHolidaysResponseToJson(
final val = <String, dynamic>{}; GetHolidaysResponse instance) =>
<String, dynamic>{
void writeNotNull(String key, dynamic value) { if (instance.headers case final value?) 'headers': value,
if (value != null) { 'result': instance.result.map((e) => e.toJson()).toList(),
val[key] = value; };
}
}
writeNotNull('headers', instance.headers);
val['result'] = instance.result.map((e) => e.toJson()).toList();
return val;
}
GetHolidaysResponseObject _$GetHolidaysResponseObjectFromJson( GetHolidaysResponseObject _$GetHolidaysResponseObjectFromJson(
Map<String, dynamic> json) => Map<String, dynamic> json) =>
GetHolidaysResponseObject( GetHolidaysResponseObject(
json['id'] as int, (json['id'] as num).toInt(),
json['name'] as String, json['name'] as String,
json['longName'] as String, json['longName'] as String,
json['startDate'] as int, (json['startDate'] as num).toInt(),
json['endDate'] as int, (json['endDate'] as num).toInt(),
); );
Map<String, dynamic> _$GetHolidaysResponseObjectToJson( Map<String, dynamic> _$GetHolidaysResponseObjectToJson(

View File

@@ -16,24 +16,16 @@ GetRoomsResponse _$GetRoomsResponseFromJson(Map<String, dynamic> json) =>
(k, e) => MapEntry(k, e as String), (k, e) => MapEntry(k, e as String),
); );
Map<String, dynamic> _$GetRoomsResponseToJson(GetRoomsResponse instance) { Map<String, dynamic> _$GetRoomsResponseToJson(GetRoomsResponse instance) =>
final val = <String, dynamic>{}; <String, dynamic>{
if (instance.headers case final value?) 'headers': value,
void writeNotNull(String key, dynamic value) { 'result': instance.result.map((e) => e.toJson()).toList(),
if (value != null) { };
val[key] = value;
}
}
writeNotNull('headers', instance.headers);
val['result'] = instance.result.map((e) => e.toJson()).toList();
return val;
}
GetRoomsResponseObject _$GetRoomsResponseObjectFromJson( GetRoomsResponseObject _$GetRoomsResponseObjectFromJson(
Map<String, dynamic> json) => Map<String, dynamic> json) =>
GetRoomsResponseObject( GetRoomsResponseObject(
json['id'] as int, (json['id'] as num).toInt(),
json['name'] as String, json['name'] as String,
json['longName'] as String, json['longName'] as String,
json['active'] as bool, json['active'] as bool,

View File

@@ -16,24 +16,17 @@ GetSubjectsResponse _$GetSubjectsResponseFromJson(Map<String, dynamic> json) =>
(k, e) => MapEntry(k, e as String), (k, e) => MapEntry(k, e as String),
); );
Map<String, dynamic> _$GetSubjectsResponseToJson(GetSubjectsResponse instance) { Map<String, dynamic> _$GetSubjectsResponseToJson(
final val = <String, dynamic>{}; GetSubjectsResponse instance) =>
<String, dynamic>{
void writeNotNull(String key, dynamic value) { if (instance.headers case final value?) 'headers': value,
if (value != null) { 'result': instance.result.map((e) => e.toJson()).toList(),
val[key] = value; };
}
}
writeNotNull('headers', instance.headers);
val['result'] = instance.result.map((e) => e.toJson()).toList();
return val;
}
GetSubjectsResponseObject _$GetSubjectsResponseObjectFromJson( GetSubjectsResponseObject _$GetSubjectsResponseObjectFromJson(
Map<String, dynamic> json) => Map<String, dynamic> json) =>
GetSubjectsResponseObject( GetSubjectsResponseObject(
json['id'] as int, (json['id'] as num).toInt(),
json['name'] as String, json['name'] as String,
json['longName'] as String, json['longName'] as String,
json['alternateName'] as String, json['alternateName'] as String,

View File

@@ -22,8 +22,8 @@ GetTimetableParamsOptions _$GetTimetableParamsOptionsFromJson(
GetTimetableParamsOptions( GetTimetableParamsOptions(
element: GetTimetableParamsOptionsElement.fromJson( element: GetTimetableParamsOptionsElement.fromJson(
json['element'] as Map<String, dynamic>), json['element'] as Map<String, dynamic>),
startDate: json['startDate'] as int?, startDate: (json['startDate'] as num?)?.toInt(),
endDate: json['endDate'] as int?, endDate: (json['endDate'] as num?)?.toInt(),
onlyBaseTimetable: json['onlyBaseTimetable'] as bool?, onlyBaseTimetable: json['onlyBaseTimetable'] as bool?,
showBooking: json['showBooking'] as bool?, showBooking: json['showBooking'] as bool?,
showInfo: json['showInfo'] as bool?, showInfo: json['showInfo'] as bool?,
@@ -46,48 +46,41 @@ GetTimetableParamsOptions _$GetTimetableParamsOptionsFromJson(
); );
Map<String, dynamic> _$GetTimetableParamsOptionsToJson( Map<String, dynamic> _$GetTimetableParamsOptionsToJson(
GetTimetableParamsOptions instance) { GetTimetableParamsOptions instance) =>
final val = <String, dynamic>{ <String, dynamic>{
'element': instance.element.toJson(), 'element': instance.element.toJson(),
}; if (instance.startDate case final value?) 'startDate': value,
if (instance.endDate case final value?) 'endDate': value,
void writeNotNull(String key, dynamic value) { if (instance.onlyBaseTimetable case final value?)
if (value != null) { 'onlyBaseTimetable': value,
val[key] = value; if (instance.showBooking case final value?) 'showBooking': value,
} if (instance.showInfo case final value?) 'showInfo': value,
} if (instance.showSubstText case final value?) 'showSubstText': value,
if (instance.showLsText case final value?) 'showLsText': value,
writeNotNull('startDate', instance.startDate); if (instance.showLsNumber case final value?) 'showLsNumber': value,
writeNotNull('endDate', instance.endDate); if (instance.showStudentgroup case final value?)
writeNotNull('onlyBaseTimetable', instance.onlyBaseTimetable); 'showStudentgroup': value,
writeNotNull('showBooking', instance.showBooking); if (instance.klasseFields
writeNotNull('showInfo', instance.showInfo); ?.map((e) => _$GetTimetableParamsOptionsFieldsEnumMap[e]!)
writeNotNull('showSubstText', instance.showSubstText); .toList()
writeNotNull('showLsText', instance.showLsText); case final value?)
writeNotNull('showLsNumber', instance.showLsNumber); 'klasseFields': value,
writeNotNull('showStudentgroup', instance.showStudentgroup); if (instance.roomFields
writeNotNull( ?.map((e) => _$GetTimetableParamsOptionsFieldsEnumMap[e]!)
'klasseFields', .toList()
instance.klasseFields case final value?)
?.map((e) => _$GetTimetableParamsOptionsFieldsEnumMap[e]!) 'roomFields': value,
.toList()); if (instance.subjectFields
writeNotNull( ?.map((e) => _$GetTimetableParamsOptionsFieldsEnumMap[e]!)
'roomFields', .toList()
instance.roomFields case final value?)
?.map((e) => _$GetTimetableParamsOptionsFieldsEnumMap[e]!) 'subjectFields': value,
.toList()); if (instance.teacherFields
writeNotNull( ?.map((e) => _$GetTimetableParamsOptionsFieldsEnumMap[e]!)
'subjectFields', .toList()
instance.subjectFields case final value?)
?.map((e) => _$GetTimetableParamsOptionsFieldsEnumMap[e]!) 'teacherFields': value,
.toList()); };
writeNotNull(
'teacherFields',
instance.teacherFields
?.map((e) => _$GetTimetableParamsOptionsFieldsEnumMap[e]!)
.toList());
return val;
}
const _$GetTimetableParamsOptionsFieldsEnumMap = { const _$GetTimetableParamsOptionsFieldsEnumMap = {
GetTimetableParamsOptionsFields.id: 'id', GetTimetableParamsOptionsFields.id: 'id',
@@ -99,29 +92,21 @@ const _$GetTimetableParamsOptionsFieldsEnumMap = {
GetTimetableParamsOptionsElement _$GetTimetableParamsOptionsElementFromJson( GetTimetableParamsOptionsElement _$GetTimetableParamsOptionsElementFromJson(
Map<String, dynamic> json) => Map<String, dynamic> json) =>
GetTimetableParamsOptionsElement( GetTimetableParamsOptionsElement(
id: json['id'] as int, id: (json['id'] as num).toInt(),
type: json['type'] as int, type: (json['type'] as num).toInt(),
keyType: $enumDecodeNullable( keyType: $enumDecodeNullable(
_$GetTimetableParamsOptionsElementKeyTypeEnumMap, json['keyType']), _$GetTimetableParamsOptionsElementKeyTypeEnumMap, json['keyType']),
); );
Map<String, dynamic> _$GetTimetableParamsOptionsElementToJson( Map<String, dynamic> _$GetTimetableParamsOptionsElementToJson(
GetTimetableParamsOptionsElement instance) { GetTimetableParamsOptionsElement instance) =>
final val = <String, dynamic>{ <String, dynamic>{
'id': instance.id, 'id': instance.id,
'type': instance.type, 'type': instance.type,
}; if (_$GetTimetableParamsOptionsElementKeyTypeEnumMap[instance.keyType]
case final value?)
void writeNotNull(String key, dynamic value) { 'keyType': value,
if (value != null) { };
val[key] = value;
}
}
writeNotNull('keyType',
_$GetTimetableParamsOptionsElementKeyTypeEnumMap[instance.keyType]);
return val;
}
const _$GetTimetableParamsOptionsElementKeyTypeEnumMap = { const _$GetTimetableParamsOptionsElementKeyTypeEnumMap = {
GetTimetableParamsOptionsElementKeyType.id: 'id', GetTimetableParamsOptionsElementKeyType.id: 'id',

View File

@@ -18,33 +18,25 @@ GetTimetableResponse _$GetTimetableResponseFromJson(
); );
Map<String, dynamic> _$GetTimetableResponseToJson( Map<String, dynamic> _$GetTimetableResponseToJson(
GetTimetableResponse instance) { GetTimetableResponse instance) =>
final val = <String, dynamic>{}; <String, dynamic>{
if (instance.headers case final value?) 'headers': value,
void writeNotNull(String key, dynamic value) { 'result': instance.result.map((e) => e.toJson()).toList(),
if (value != null) { };
val[key] = value;
}
}
writeNotNull('headers', instance.headers);
val['result'] = instance.result.map((e) => e.toJson()).toList();
return val;
}
GetTimetableResponseObject _$GetTimetableResponseObjectFromJson( GetTimetableResponseObject _$GetTimetableResponseObjectFromJson(
Map<String, dynamic> json) => Map<String, dynamic> json) =>
GetTimetableResponseObject( GetTimetableResponseObject(
id: json['id'] as int, id: (json['id'] as num).toInt(),
date: json['date'] as int, date: (json['date'] as num).toInt(),
startTime: json['startTime'] as int, startTime: (json['startTime'] as num).toInt(),
endTime: json['endTime'] as int, endTime: (json['endTime'] as num).toInt(),
lstype: json['lstype'] as String?, lstype: json['lstype'] as String?,
code: json['code'] as String?, code: json['code'] as String?,
info: json['info'] as String?, info: json['info'] as String?,
substText: json['substText'] as String?, substText: json['substText'] as String?,
lstext: json['lstext'] as String?, lstext: json['lstext'] as String?,
lsnumber: json['lsnumber'] as int?, lsnumber: (json['lsnumber'] as num?)?.toInt(),
statflags: json['statflags'] as String?, statflags: json['statflags'] as String?,
activityType: json['activityType'] as String?, activityType: json['activityType'] as String?,
sg: json['sg'] as String?, sg: json['sg'] as String?,
@@ -110,7 +102,7 @@ GetTimetableResponseObjectFieldsObject
_$GetTimetableResponseObjectFieldsObjectFromJson( _$GetTimetableResponseObjectFieldsObjectFromJson(
Map<String, dynamic> json) => Map<String, dynamic> json) =>
GetTimetableResponseObjectFieldsObject( GetTimetableResponseObjectFieldsObject(
id: json['id'] as int?, id: (json['id'] as num?)?.toInt(),
name: json['name'] as String?, name: json['name'] as String?,
longname: json['longname'] as String?, longname: json['longname'] as String?,
externalkey: json['externalkey'] as String?, externalkey: json['externalkey'] as String?,
@@ -128,7 +120,7 @@ Map<String, dynamic> _$GetTimetableResponseObjectFieldsObjectToJson(
GetTimetableResponseObjectClass _$GetTimetableResponseObjectClassFromJson( GetTimetableResponseObjectClass _$GetTimetableResponseObjectClassFromJson(
Map<String, dynamic> json) => Map<String, dynamic> json) =>
GetTimetableResponseObjectClass( GetTimetableResponseObjectClass(
json['id'] as int, (json['id'] as num).toInt(),
json['name'] as String, json['name'] as String,
json['longname'] as String, json['longname'] as String,
json['externalkey'] as String?, json['externalkey'] as String?,
@@ -146,10 +138,10 @@ Map<String, dynamic> _$GetTimetableResponseObjectClassToJson(
GetTimetableResponseObjectTeacher _$GetTimetableResponseObjectTeacherFromJson( GetTimetableResponseObjectTeacher _$GetTimetableResponseObjectTeacherFromJson(
Map<String, dynamic> json) => Map<String, dynamic> json) =>
GetTimetableResponseObjectTeacher( GetTimetableResponseObjectTeacher(
json['id'] as int, (json['id'] as num).toInt(),
json['name'] as String, json['name'] as String,
json['longname'] as String, json['longname'] as String,
json['orgid'] as int?, (json['orgid'] as num?)?.toInt(),
json['orgname'] as String?, json['orgname'] as String?,
json['externalkey'] as String?, json['externalkey'] as String?,
); );
@@ -168,7 +160,7 @@ Map<String, dynamic> _$GetTimetableResponseObjectTeacherToJson(
GetTimetableResponseObjectSubject _$GetTimetableResponseObjectSubjectFromJson( GetTimetableResponseObjectSubject _$GetTimetableResponseObjectSubjectFromJson(
Map<String, dynamic> json) => Map<String, dynamic> json) =>
GetTimetableResponseObjectSubject( GetTimetableResponseObjectSubject(
json['id'] as int, (json['id'] as num).toInt(),
json['name'] as String, json['name'] as String,
json['longname'] as String, json['longname'] as String,
); );
@@ -184,7 +176,7 @@ Map<String, dynamic> _$GetTimetableResponseObjectSubjectToJson(
GetTimetableResponseObjectRoom _$GetTimetableResponseObjectRoomFromJson( GetTimetableResponseObjectRoom _$GetTimetableResponseObjectRoomFromJson(
Map<String, dynamic> json) => Map<String, dynamic> json) =>
GetTimetableResponseObjectRoom( GetTimetableResponseObjectRoom(
json['id'] as int, (json['id'] as num).toInt(),
json['name'] as String, json['name'] as String,
json['longname'] as String, json['longname'] as String,
); );

View File

@@ -19,7 +19,7 @@ abstract class WebuntisApi extends ApiRequest {
WebuntisApi(this.method, this.genericParam, {this.authenticatedResponse = true}); WebuntisApi(this.method, this.genericParam, {this.authenticatedResponse = true});
Future<String> query(WebuntisApi untis) async { Future<String> query(WebuntisApi untis, {bool retry = false}) async {
var query = '{"id":"ID","method":"$method","params":${untis._body()},"jsonrpc":"2.0"}'; var query = '{"id":"ID","method":"$method","params":${untis._body()},"jsonrpc":"2.0"}';
var sessionId = '0'; var sessionId = '0';
@@ -32,8 +32,9 @@ abstract class WebuntisApi extends ApiRequest {
dynamic jsonData = jsonDecode(data.body); dynamic jsonData = jsonDecode(data.body);
if(jsonData['error'] != null) { if(jsonData['error'] != null) {
if(jsonData['error']['code'] == -8520) { if(jsonData['error']['code'] == -8520) {
if(retry) throw WebuntisError('Authentication was tried (probably session timeout), but was not successful!', 1);
await Authenticate.createSession(); await Authenticate.createSession();
this.query(untis); return await this.query(untis, retry: true);
} else { } else {
throw WebuntisError(jsonData['error']['message'], jsonData['error']['code']); throw WebuntisError(jsonData['error']['message'], jsonData['error']['code']);
} }

View File

@@ -8,7 +8,6 @@ import 'package:flutter/material.dart';
import 'state/app/modules/app_modules.dart'; import 'state/app/modules/app_modules.dart';
import 'package:persistent_bottom_nav_bar_v2/persistent_bottom_nav_bar_v2.dart'; import 'package:persistent_bottom_nav_bar_v2/persistent_bottom_nav_bar_v2.dart';
import 'package:provider/provider.dart'; import 'package:provider/provider.dart';
import 'package:badges/badges.dart' as badges;
import 'api/mhsl/breaker/getBreakers/getBreakersResponse.dart'; import 'api/mhsl/breaker/getBreakers/getBreakersResponse.dart';
import 'api/mhsl/server/userIndex/update/updateUserindex.dart'; import 'api/mhsl/server/userIndex/update/updateUserindex.dart';
@@ -93,7 +92,7 @@ class _AppState extends State<App> with WidgetsBindingObserver {
} }
@override @override
Widget build(BuildContext context) => PersistentTabView( Widget build(BuildContext context) => Consumer<SettingsProvider>(builder: (context, settings, child) => PersistentTabView(
controller: Main.bottomNavigator, controller: Main.bottomNavigator,
navBarOverlap: const NavBarOverlap.none(), navBarOverlap: const NavBarOverlap.none(),
backgroundColor: Theme.of(context).colorScheme.primary, backgroundColor: Theme.of(context).colorScheme.primary,
@@ -101,29 +100,7 @@ class _AppState extends State<App> with WidgetsBindingObserver {
screenTransitionAnimation: const ScreenTransitionAnimation(curve: Curves.easeOutQuad, duration: Duration(milliseconds: 200)), screenTransitionAnimation: const ScreenTransitionAnimation(curve: Curves.easeOutQuad, duration: Duration(milliseconds: 200)),
tabs: [ tabs: [
AppModule.getModule(Modules.timetable).toBottomTab(context), ...AppModule.getBottomBarModules(context).map((e) => e.toBottomTab(context)),
AppModule.getModule(Modules.talk).toBottomTab(
context,
itemBuilder: (icon) => Consumer<ChatListProps>(
builder: (context, value, child) {
if(value.primaryLoading()) return Icon(icon);
var messages = value.getRoomsResponse.data.map((e) => e.unreadMessages).reduce((a, b) => a+b);
return badges.Badge(
showBadge: messages > 0,
position: badges.BadgePosition.topEnd(top: -3, end: -3),
stackFit: StackFit.loose,
badgeStyle: badges.BadgeStyle(
padding: const EdgeInsets.all(3),
badgeColor: Theme.of(context).primaryColor,
elevation: 1,
),
badgeContent: Text('$messages', style: const TextStyle(color: Colors.white, fontSize: 10, fontWeight: FontWeight.bold)),
child: Icon(icon),
);
},
),
),
AppModule.getModule(Modules.files).toBottomTab(context),
PersistentTabConfig( PersistentTabConfig(
screen: const Breaker(breaker: BreakerArea.more, child: Overhang()), screen: const Breaker(breaker: BreakerArea.more, child: Overhang()),
@@ -142,7 +119,7 @@ class _AppState extends State<App> with WidgetsBindingObserver {
color: Theme.of(context).colorScheme.surface, color: Theme.of(context).colorScheme.surface,
), ),
), ),
); ));
@override @override
void dispose() { void dispose() {

View File

@@ -7,13 +7,13 @@ import 'package:firebase_messaging/firebase_messaging.dart';
import 'package:flutter/foundation.dart'; import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter/services.dart'; import 'package:flutter/services.dart';
import 'package:flutter_localizations/flutter_localizations.dart';
import 'package:hydrated_bloc/hydrated_bloc.dart'; import 'package:hydrated_bloc/hydrated_bloc.dart';
import 'package:jiffy/jiffy.dart'; import 'package:jiffy/jiffy.dart';
import 'package:loader_overlay/loader_overlay.dart'; import 'package:loader_overlay/loader_overlay.dart';
import 'package:path_provider/path_provider.dart'; import 'package:path_provider/path_provider.dart';
import 'package:persistent_bottom_nav_bar_v2/persistent_bottom_nav_bar_v2.dart'; import 'package:persistent_bottom_nav_bar_v2/persistent_bottom_nav_bar_v2.dart';
import 'package:provider/provider.dart'; import 'package:provider/provider.dart';
import 'package:flutter_localizations/flutter_localizations.dart';
import 'api/mhsl/breaker/getBreakers/getBreakersResponse.dart'; import 'api/mhsl/breaker/getBreakers/getBreakersResponse.dart';
import 'app.dart'; import 'app.dart';
@@ -34,22 +34,29 @@ import 'view/login/login.dart';
import 'widget/placeholderView.dart'; import 'widget/placeholderView.dart';
Future<void> main() async { Future<void> main() async {
log('MarianumMobile started');
WidgetsFlutterBinding.ensureInitialized(); WidgetsFlutterBinding.ensureInitialized();
addCertificateAsTrusted(ByteData certificate) => SecurityContext.defaultContext.setTrustedCertificatesBytes(certificate.buffer.asUint8List());
var initialisationTasks = [ var initialisationTasks = [
Firebase.initializeApp(options: DefaultFirebaseOptions.currentPlatform) Firebase.initializeApp(options: DefaultFirebaseOptions.currentPlatform)
.then((value) async => log("Firebase token: ${await FirebaseMessaging.instance.getToken() ?? "Error: no Firebase token!"}")) .then((value) async => log("Firebase token: ${await FirebaseMessaging.instance.getToken() ?? "Error: no Firebase token!"}"))
.onError((error, stackTrace) => log('Error initializing Firebase: $error')), .onError((error, stackTrace) => log('Error initializing Firebase: $error')),
PlatformAssetBundle().load('assets/ca/lets-encrypt-r3.pem') PlatformAssetBundle().load('assets/ca/lets-encrypt-r3.pem').then(addCertificateAsTrusted),
.then((certificate) => SecurityContext.defaultContext.setTrustedCertificatesBytes(certificate.buffer.asUint8List())), PlatformAssetBundle().load('assets/ca/lets-encrypt-r10.pem').then(addCertificateAsTrusted),
Future(() async { Future(() async {
await HydratedStorage.build(storageDirectory: await getTemporaryDirectory()).then((storage) => HydratedBloc.storage = storage); await HydratedStorage.build(
storageDirectory: HydratedStorageDirectory((await getTemporaryDirectory()).path)
).then((storage) => HydratedBloc.storage = storage);
}) })
]; ];
log('starting app initialisation...');
await Future.wait(initialisationTasks); await Future.wait(initialisationTasks);
log('app initialisation done!');
if(kReleaseMode) { if(kReleaseMode) {
ErrorWidget.builder = (error) => PlaceholderView( ErrorWidget.builder = (error) => PlaceholderView(
@@ -58,6 +65,7 @@ Future<void> main() async {
); );
} }
log('running app...');
runApp( runApp(
MultiProvider( MultiProvider(
providers: [ providers: [

View File

@@ -23,7 +23,11 @@ class _BreakerState extends State<Breaker> {
builder: (context, value, child) { builder: (context, value, child) {
var blocked = value.isBlocked(widget.breaker); var blocked = value.isBlocked(widget.breaker);
if(blocked != null) { if(blocked != null) {
return PlaceholderView(icon: Icons.security_outlined, text: "Die App/ Dieser Bereich wurde als Schutzmaßnahme deaktiviert!\n\n${blocked.isEmpty ? "Es wurde vom Server kein Grund übermittelt." : blocked}"); return PlaceholderView(
icon: Icons.app_blocking_outlined,
text: 'Die App / Dieser Bereich ist zurzeit nicht verfügbar!\n\n'
"${blocked.isEmpty ? "Es wurde vom Server kein Grund übermittelt.\nAktualisiere die App und versuche es später erneut" : blocked}"
);
} }
return widget.child; return widget.child;

View File

@@ -1,4 +1,5 @@
import 'package:package_info/package_info.dart'; import 'package:flutter/foundation.dart';
import 'package:package_info_plus/package_info_plus.dart';
import '../../api/apiResponse.dart'; import '../../api/apiResponse.dart';
import '../../api/mhsl/breaker/getBreakers/getBreakersCache.dart'; import '../../api/mhsl/breaker/getBreakers/getBreakersCache.dart';
@@ -10,8 +11,10 @@ class BreakerProps extends DataHolder {
GetBreakersResponse get getBreakersResponse => _getBreakersResponse!; GetBreakersResponse get getBreakersResponse => _getBreakersResponse!;
PackageInfo? packageInfo; PackageInfo? packageInfo;
String? isBlocked(BreakerArea? type) { String? isBlocked(BreakerArea? type) {
if(kDebugMode) return null;
if(packageInfo == null) { if(packageInfo == null) {
PackageInfo.fromPlatform().then((value) => packageInfo = value); PackageInfo.fromPlatform().then((value) => packageInfo = value);
return null; return null;

View File

@@ -1,5 +1,5 @@
import 'package:flutter_app_badger/flutter_app_badger.dart'; import 'package:flutter_app_badge/flutter_app_badge.dart';
import '../../api/apiResponse.dart'; import '../../api/apiResponse.dart';
import '../../api/marianumcloud/talk/room/getRoomCache.dart'; import '../../api/marianumcloud/talk/room/getRoomCache.dart';
@@ -20,7 +20,7 @@ class ChatListProps extends DataHolder {
onUpdate: (GetRoomResponse data) => { onUpdate: (GetRoomResponse data) => {
_getRoomResponse = data, _getRoomResponse = data,
notifyListeners(), notifyListeners(),
FlutterAppBadger.updateBadgeCount(data.data.map((e) => e.unreadMessages).reduce((a, b) => a+b)) FlutterAppBadge.count(data.data.map((e) => e.unreadMessages).reduce((a, b) => a+b))
} }
); );
} }

View File

@@ -44,7 +44,7 @@ class NotificationController {
} }
static Future<void> onAppOpenedByNotification(RemoteMessage message, BuildContext context) async { static Future<void> onAppOpenedByNotification(RemoteMessage message, BuildContext context) async {
NotificationTasks.navigateToTalk(); NotificationTasks.navigateToTalk(context);
NotificationTasks.updateProviders(context); NotificationTasks.updateProviders(context);
DebugTile(context).run(() { DebugTile(context).run(() {

View File

@@ -15,9 +15,6 @@ class NotificationService {
); );
final iosSettings = DarwinInitializationSettings( final iosSettings = DarwinInitializationSettings(
onDidReceiveLocalNotification: (id, title, body, payload) {
// TODO Navigate to Talk section (This runs when an Notification is tapped)
},
); );

View File

@@ -1,15 +1,16 @@
import 'package:firebase_messaging/firebase_messaging.dart'; import 'package:firebase_messaging/firebase_messaging.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
import 'package:flutter_app_badger/flutter_app_badger.dart'; import 'package:flutter_app_badge/flutter_app_badge.dart';
import 'package:provider/provider.dart'; import 'package:provider/provider.dart';
import '../main.dart'; import '../main.dart';
import '../model/chatList/chatListProps.dart'; import '../model/chatList/chatListProps.dart';
import '../model/chatList/chatProps.dart'; import '../model/chatList/chatProps.dart';
import '../state/app/modules/app_modules.dart';
class NotificationTasks { class NotificationTasks {
static void updateBadgeCount(RemoteMessage notification) { static void updateBadgeCount(RemoteMessage notification) {
FlutterAppBadger.updateBadgeCount(int.parse(notification.data['unreadCount'] ?? 0)); FlutterAppBadge.count(int.parse(notification.data['unreadCount'] ?? 0));
} }
static void updateProviders(BuildContext context) { static void updateProviders(BuildContext context) {
@@ -17,7 +18,9 @@ class NotificationTasks {
Provider.of<ChatProps>(context, listen: false).run(); Provider.of<ChatProps>(context, listen: false).run();
} }
static void navigateToTalk() { static void navigateToTalk(BuildContext context) {
Main.bottomNavigator.jumpToTab(1); var talkTab = AppModule.getBottomBarModules(context).map((e) => e.module).toList().indexOf(Modules.talk);
if(talkTab == -1) return;
Main.bottomNavigator.jumpToTab(talkTab);
} }
} }

View File

@@ -24,6 +24,7 @@ class NotifyUpdater {
NotifyUpdater.registerToServer(); NotifyUpdater.registerToServer();
}, },
); );
static Future<void> registerToServer() async { static Future<void> registerToServer() async {
var fcmToken = await FirebaseMessaging.instance.getToken(); var fcmToken = await FirebaseMessaging.instance.getToken();

View File

@@ -19,7 +19,9 @@ mixin _$LoadableStateState {
List<ConnectivityResult>? get connections => List<ConnectivityResult>? get connections =>
throw _privateConstructorUsedError; throw _privateConstructorUsedError;
@JsonKey(ignore: true) /// Create a copy of LoadableStateState
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
$LoadableStateStateCopyWith<LoadableStateState> get copyWith => $LoadableStateStateCopyWith<LoadableStateState> get copyWith =>
throw _privateConstructorUsedError; throw _privateConstructorUsedError;
} }
@@ -43,6 +45,8 @@ class _$LoadableStateStateCopyWithImpl<$Res, $Val extends LoadableStateState>
// ignore: unused_field // ignore: unused_field
final $Res Function($Val) _then; final $Res Function($Val) _then;
/// Create a copy of LoadableStateState
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline') @pragma('vm:prefer-inline')
@override @override
$Res call({ $Res call({
@@ -76,6 +80,8 @@ class __$$LoadableStateStateImplCopyWithImpl<$Res>
$Res Function(_$LoadableStateStateImpl) _then) $Res Function(_$LoadableStateStateImpl) _then)
: super(_value, _then); : super(_value, _then);
/// Create a copy of LoadableStateState
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline') @pragma('vm:prefer-inline')
@override @override
$Res call({ $Res call({
@@ -125,7 +131,9 @@ class _$LoadableStateStateImpl implements _LoadableStateState {
int get hashCode => Object.hash( int get hashCode => Object.hash(
runtimeType, const DeepCollectionEquality().hash(_connections)); runtimeType, const DeepCollectionEquality().hash(_connections));
@JsonKey(ignore: true) /// Create a copy of LoadableStateState
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@override @override
@pragma('vm:prefer-inline') @pragma('vm:prefer-inline')
_$$LoadableStateStateImplCopyWith<_$LoadableStateStateImpl> get copyWith => _$$LoadableStateStateImplCopyWith<_$LoadableStateStateImpl> get copyWith =>
@@ -140,8 +148,11 @@ abstract class _LoadableStateState implements LoadableStateState {
@override @override
List<ConnectivityResult>? get connections; List<ConnectivityResult>? get connections;
/// Create a copy of LoadableStateState
/// with the given fields replaced by the non-null parameter values.
@override @override
@JsonKey(ignore: true) @JsonKey(includeFromJson: false, includeToJson: false)
_$$LoadableStateStateImplCopyWith<_$LoadableStateStateImpl> get copyWith => _$$LoadableStateStateImplCopyWith<_$LoadableStateStateImpl> get copyWith =>
throw _privateConstructorUsedError; throw _privateConstructorUsedError;
} }

View File

@@ -22,7 +22,9 @@ mixin _$LoadableState<TState> {
void Function()? get reFetch => throw _privateConstructorUsedError; void Function()? get reFetch => throw _privateConstructorUsedError;
LoadingError? get error => throw _privateConstructorUsedError; LoadingError? get error => throw _privateConstructorUsedError;
@JsonKey(ignore: true) /// Create a copy of LoadableState
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
$LoadableStateCopyWith<TState, LoadableState<TState>> get copyWith => $LoadableStateCopyWith<TState, LoadableState<TState>> get copyWith =>
throw _privateConstructorUsedError; throw _privateConstructorUsedError;
} }
@@ -54,6 +56,8 @@ class _$LoadableStateCopyWithImpl<TState, $Res,
// ignore: unused_field // ignore: unused_field
final $Res Function($Val) _then; final $Res Function($Val) _then;
/// Create a copy of LoadableState
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline') @pragma('vm:prefer-inline')
@override @override
$Res call({ $Res call({
@@ -87,6 +91,8 @@ class _$LoadableStateCopyWithImpl<TState, $Res,
) as $Val); ) as $Val);
} }
/// Create a copy of LoadableState
/// with the given fields replaced by the non-null parameter values.
@override @override
@pragma('vm:prefer-inline') @pragma('vm:prefer-inline')
$LoadingErrorCopyWith<$Res>? get error { $LoadingErrorCopyWith<$Res>? get error {
@@ -128,6 +134,8 @@ class __$$LoadableStateImplCopyWithImpl<TState, $Res>
$Res Function(_$LoadableStateImpl<TState>) _then) $Res Function(_$LoadableStateImpl<TState>) _then)
: super(_value, _then); : super(_value, _then);
/// Create a copy of LoadableState
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline') @pragma('vm:prefer-inline')
@override @override
$Res call({ $Res call({
@@ -166,27 +174,22 @@ class __$$LoadableStateImplCopyWithImpl<TState, $Res>
class _$LoadableStateImpl<TState> extends _LoadableState<TState> { class _$LoadableStateImpl<TState> extends _LoadableState<TState> {
const _$LoadableStateImpl( const _$LoadableStateImpl(
{this.isLoading = true, {required this.isLoading,
this.data = null, required this.data,
this.lastFetch = null, required this.lastFetch,
this.reFetch = null, required this.reFetch,
this.error = null}) required this.error})
: super._(); : super._();
@override @override
@JsonKey()
final bool isLoading; final bool isLoading;
@override @override
@JsonKey()
final TState? data; final TState? data;
@override @override
@JsonKey()
final int? lastFetch; final int? lastFetch;
@override @override
@JsonKey()
final void Function()? reFetch; final void Function()? reFetch;
@override @override
@JsonKey()
final LoadingError? error; final LoadingError? error;
@override @override
@@ -212,7 +215,9 @@ class _$LoadableStateImpl<TState> extends _LoadableState<TState> {
int get hashCode => Object.hash(runtimeType, isLoading, int get hashCode => Object.hash(runtimeType, isLoading,
const DeepCollectionEquality().hash(data), lastFetch, reFetch, error); const DeepCollectionEquality().hash(data), lastFetch, reFetch, error);
@JsonKey(ignore: true) /// Create a copy of LoadableState
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@override @override
@pragma('vm:prefer-inline') @pragma('vm:prefer-inline')
_$$LoadableStateImplCopyWith<TState, _$LoadableStateImpl<TState>> _$$LoadableStateImplCopyWith<TState, _$LoadableStateImpl<TState>>
@@ -222,11 +227,11 @@ class _$LoadableStateImpl<TState> extends _LoadableState<TState> {
abstract class _LoadableState<TState> extends LoadableState<TState> { abstract class _LoadableState<TState> extends LoadableState<TState> {
const factory _LoadableState( const factory _LoadableState(
{final bool isLoading, {required final bool isLoading,
final TState? data, required final TState? data,
final int? lastFetch, required final int? lastFetch,
final void Function()? reFetch, required final void Function()? reFetch,
final LoadingError? error}) = _$LoadableStateImpl<TState>; required final LoadingError? error}) = _$LoadableStateImpl<TState>;
const _LoadableState._() : super._(); const _LoadableState._() : super._();
@override @override
@@ -239,8 +244,11 @@ abstract class _LoadableState<TState> extends LoadableState<TState> {
void Function()? get reFetch; void Function()? get reFetch;
@override @override
LoadingError? get error; LoadingError? get error;
/// Create a copy of LoadableState
/// with the given fields replaced by the non-null parameter values.
@override @override
@JsonKey(ignore: true) @JsonKey(includeFromJson: false, includeToJson: false)
_$$LoadableStateImplCopyWith<TState, _$LoadableStateImpl<TState>> _$$LoadableStateImplCopyWith<TState, _$LoadableStateImpl<TState>>
get copyWith => throw _privateConstructorUsedError; get copyWith => throw _privateConstructorUsedError;
} }

View File

@@ -19,7 +19,9 @@ mixin _$LoadingError {
String get message => throw _privateConstructorUsedError; String get message => throw _privateConstructorUsedError;
bool get allowRetry => throw _privateConstructorUsedError; bool get allowRetry => throw _privateConstructorUsedError;
@JsonKey(ignore: true) /// Create a copy of LoadingError
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
$LoadingErrorCopyWith<LoadingError> get copyWith => $LoadingErrorCopyWith<LoadingError> get copyWith =>
throw _privateConstructorUsedError; throw _privateConstructorUsedError;
} }
@@ -43,6 +45,8 @@ class _$LoadingErrorCopyWithImpl<$Res, $Val extends LoadingError>
// ignore: unused_field // ignore: unused_field
final $Res Function($Val) _then; final $Res Function($Val) _then;
/// Create a copy of LoadingError
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline') @pragma('vm:prefer-inline')
@override @override
$Res call({ $Res call({
@@ -81,6 +85,8 @@ class __$$LoadingErrorImplCopyWithImpl<$Res>
_$LoadingErrorImpl _value, $Res Function(_$LoadingErrorImpl) _then) _$LoadingErrorImpl _value, $Res Function(_$LoadingErrorImpl) _then)
: super(_value, _then); : super(_value, _then);
/// Create a copy of LoadingError
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline') @pragma('vm:prefer-inline')
@override @override
$Res call({ $Res call({
@@ -129,7 +135,9 @@ class _$LoadingErrorImpl implements _LoadingError {
@override @override
int get hashCode => Object.hash(runtimeType, message, allowRetry); int get hashCode => Object.hash(runtimeType, message, allowRetry);
@JsonKey(ignore: true) /// Create a copy of LoadingError
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@override @override
@pragma('vm:prefer-inline') @pragma('vm:prefer-inline')
_$$LoadingErrorImplCopyWith<_$LoadingErrorImpl> get copyWith => _$$LoadingErrorImplCopyWith<_$LoadingErrorImpl> get copyWith =>
@@ -145,8 +153,11 @@ abstract class _LoadingError implements LoadingError {
String get message; String get message;
@override @override
bool get allowRetry; bool get allowRetry;
/// Create a copy of LoadingError
/// with the given fields replaced by the non-null parameter values.
@override @override
@JsonKey(ignore: true) @JsonKey(includeFromJson: false, includeToJson: false)
_$$LoadingErrorImplCopyWith<_$LoadingErrorImpl> get copyWith => _$$LoadingErrorImplCopyWith<_$LoadingErrorImpl> get copyWith =>
throw _privateConstructorUsedError; throw _privateConstructorUsedError;
} }

View File

@@ -24,6 +24,11 @@ class LoadableStateConsumer<TController extends Bloc<LoadableHydratedBlocEvent<T
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
var loadableState = context.watch<TController>().state; var loadableState = context.watch<TController>().state;
if(!loadableState.isLoading && onLoad != null) {
WidgetsBinding.instance.addPostFrameCallback((timeStamp) => onLoad!(loadableState.data));
}
var childWidget = ConditionalWrapper( var childWidget = ConditionalWrapper(
condition: loadableState.reFetch != null, condition: loadableState.reFetch != null,
wrapper: (child) => RefreshIndicator( wrapper: (child) => RefreshIndicator(

View File

@@ -103,10 +103,9 @@ abstract class LoadableHydratedBloc<
Map<String, dynamic>? toJson(LoadableState<TState> state) { Map<String, dynamic>? toJson(LoadableState<TState> state) {
Map<String, dynamic>? data; Map<String, dynamic>? data;
try { try {
data = toStorage(state.data); data = state.data == null ? null : toStorage(state.data);
} catch(e) { } catch(e) {
log('Failed to save state ${TState.toString()}: ${e.toString()}'); log('Failed to save state ${TState.toString()}: ${e.toString()}');
data = null;
} }
return LoadableSaveContext.wrap( return LoadableSaveContext.wrap(

View File

@@ -22,8 +22,12 @@ LoadableSaveContext _$LoadableSaveContextFromJson(Map<String, dynamic> json) {
mixin _$LoadableSaveContext { mixin _$LoadableSaveContext {
int get timestamp => throw _privateConstructorUsedError; int get timestamp => throw _privateConstructorUsedError;
/// Serializes this LoadableSaveContext to a JSON map.
Map<String, dynamic> toJson() => throw _privateConstructorUsedError; Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
@JsonKey(ignore: true)
/// Create a copy of LoadableSaveContext
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
$LoadableSaveContextCopyWith<LoadableSaveContext> get copyWith => $LoadableSaveContextCopyWith<LoadableSaveContext> get copyWith =>
throw _privateConstructorUsedError; throw _privateConstructorUsedError;
} }
@@ -47,6 +51,8 @@ class _$LoadableSaveContextCopyWithImpl<$Res, $Val extends LoadableSaveContext>
// ignore: unused_field // ignore: unused_field
final $Res Function($Val) _then; final $Res Function($Val) _then;
/// Create a copy of LoadableSaveContext
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline') @pragma('vm:prefer-inline')
@override @override
$Res call({ $Res call({
@@ -80,6 +86,8 @@ class __$$LoadableSaveContextImplCopyWithImpl<$Res>
$Res Function(_$LoadableSaveContextImpl) _then) $Res Function(_$LoadableSaveContextImpl) _then)
: super(_value, _then); : super(_value, _then);
/// Create a copy of LoadableSaveContext
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline') @pragma('vm:prefer-inline')
@override @override
$Res call({ $Res call({
@@ -119,11 +127,13 @@ class _$LoadableSaveContextImpl extends _LoadableSaveContext {
other.timestamp == timestamp)); other.timestamp == timestamp));
} }
@JsonKey(ignore: true) @JsonKey(includeFromJson: false, includeToJson: false)
@override @override
int get hashCode => Object.hash(runtimeType, timestamp); int get hashCode => Object.hash(runtimeType, timestamp);
@JsonKey(ignore: true) /// Create a copy of LoadableSaveContext
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@override @override
@pragma('vm:prefer-inline') @pragma('vm:prefer-inline')
_$$LoadableSaveContextImplCopyWith<_$LoadableSaveContextImpl> get copyWith => _$$LoadableSaveContextImplCopyWith<_$LoadableSaveContextImpl> get copyWith =>
@@ -148,8 +158,11 @@ abstract class _LoadableSaveContext extends LoadableSaveContext {
@override @override
int get timestamp; int get timestamp;
/// Create a copy of LoadableSaveContext
/// with the given fields replaced by the non-null parameter values.
@override @override
@JsonKey(ignore: true) @JsonKey(includeFromJson: false, includeToJson: false)
_$$LoadableSaveContextImplCopyWith<_$LoadableSaveContextImpl> get copyWith => _$$LoadableSaveContextImplCopyWith<_$LoadableSaveContextImpl> get copyWith =>
throw _privateConstructorUsedError; throw _privateConstructorUsedError;
} }

View File

@@ -9,7 +9,7 @@ part of 'loadable_save_context.dart';
_$LoadableSaveContextImpl _$$LoadableSaveContextImplFromJson( _$LoadableSaveContextImpl _$$LoadableSaveContextImplFromJson(
Map<String, dynamic> json) => Map<String, dynamic> json) =>
_$LoadableSaveContextImpl( _$LoadableSaveContextImpl(
timestamp: json['timestamp'] as int, timestamp: (json['timestamp'] as num).toInt(),
); );
Map<String, dynamic> _$$LoadableSaveContextImplToJson( Map<String, dynamic> _$$LoadableSaveContextImplToJson(

View File

@@ -1,8 +1,11 @@
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:persistent_bottom_nav_bar_v2/persistent_bottom_nav_bar_v2.dart'; import 'package:persistent_bottom_nav_bar_v2/persistent_bottom_nav_bar_v2.dart';
import 'package:provider/provider.dart';
import '../../../api/mhsl/breaker/getBreakers/getBreakersResponse.dart'; import '../../../api/mhsl/breaker/getBreakers/getBreakersResponse.dart';
import '../../../model/breakers/Breaker.dart'; import '../../../model/breakers/Breaker.dart';
import '../../../model/chatList/chatListProps.dart';
import '../../../storage/base/settingsProvider.dart';
import '../../../view/pages/files/files.dart'; import '../../../view/pages/files/files.dart';
import '../../../view/pages/more/roomplan/roomplan.dart'; import '../../../view/pages/more/roomplan/roomplan.dart';
import '../../../view/pages/talk/chatList.dart'; import '../../../view/pages/talk/chatList.dart';
@@ -12,38 +15,115 @@ import 'gradeAverages/view/grade_averages_view.dart';
import 'holidays/view/holidays_view.dart'; import 'holidays/view/holidays_view.dart';
import 'marianumMessage/view/marianum_message_list_view.dart'; import 'marianumMessage/view/marianum_message_list_view.dart';
import 'package:badges/badges.dart' as badges;
class AppModule { class AppModule {
Modules module;
String name; String name;
IconData icon; Widget Function() icon;
BreakerArea breakerArea;
Widget Function() create; Widget Function() create;
AppModule(this.name, this.icon, this.create); AppModule(this.module, {required this.name, required this.icon, this.breakerArea = BreakerArea.global, required this.create});
static Map<Modules, AppModule> modules() => { static Map<Modules, AppModule> modules(BuildContext context, { showFiltered = false }) {
Modules.timetable: AppModule('Vertretung', Icons.calendar_month, Timetable.new), var settings = Provider.of<SettingsProvider>(context, listen: false);
Modules.talk: AppModule('Talk', Icons.chat, ChatList.new), var available = {
Modules.files: AppModule('Files', Icons.folder, Files.new), Modules.timetable: AppModule(
Modules.marianumMessage: AppModule('Marianum Message', Icons.newspaper, MarianumMessageListView.new), Modules.timetable,
Modules.roomPlan: AppModule('Raumplan', Icons.location_pin, Roomplan.new), name: 'Stundenplan',
Modules.gradeAveragesCalculator: AppModule('Notendurschnittsrechner', Icons.calculate, GradeAveragesView.new), icon: () => Icon(Icons.calendar_month),
Modules.holidays: AppModule('Schulferien', Icons.time_to_leave, HolidaysView.new), breakerArea: BreakerArea.timetable,
}; create: Timetable.new,
),
Modules.talk: AppModule(
Modules.talk,
name: 'Talk',
icon: () => Consumer<ChatListProps>(
builder: (context, value, child) {
if(value.primaryLoading()) return Icon(Icons.chat);
var messages = value.getRoomsResponse.data.map((e) => e.unreadMessages).reduce((a, b) => a+b);
return badges.Badge(
showBadge: messages > 0,
position: badges.BadgePosition.topEnd(top: -3, end: -3),
stackFit: StackFit.loose,
badgeStyle: badges.BadgeStyle(
padding: const EdgeInsets.all(3),
badgeColor: Theme.of(context).primaryColor,
elevation: 1,
),
badgeContent: Text('$messages', style: const TextStyle(color: Colors.white, fontSize: 10, fontWeight: FontWeight.bold)),
child: Icon(Icons.chat),
);
},
),
breakerArea: BreakerArea.talk,
create: ChatList.new,
),
Modules.files: AppModule(
Modules.files,
name: 'Dateien',
icon: () => Icon(Icons.folder),
breakerArea: BreakerArea.files,
create: Files.new,
),
Modules.marianumMessage: AppModule(
Modules.marianumMessage,
name: 'Marianum Message',
icon: () => Icon(Icons.newspaper),
breakerArea: BreakerArea.more,
create: MarianumMessageListView.new,
),
Modules.roomPlan: AppModule(
Modules.roomPlan,
name: 'Raumplan',
icon: () => Icon(Icons.location_pin),
breakerArea: BreakerArea.more,
create: Roomplan.new,
),
Modules.gradeAveragesCalculator: AppModule(
Modules.gradeAveragesCalculator,
name: 'Notendurschnittsrechner',
icon: () => Icon(Icons.calculate),
breakerArea: BreakerArea.more,
create: GradeAveragesView.new,
),
Modules.holidays: AppModule(
Modules.holidays,
name: 'Schulferien',
icon: () => Icon(Icons.flight),
breakerArea: BreakerArea.more,
create: HolidaysView.new,
),
};
static AppModule getModule(Modules module) => modules()[module]!; if(!showFiltered) available.removeWhere((key, value) => settings.val().modulesSettings.hiddenModules.contains(key));
Widget toListTile(BuildContext context) => ListTile( return { for (var element in settings.val().modulesSettings.moduleOrder.where((element) => available.containsKey(element))) element : available[element]! };
leading: CenteredLeading(Icon(icon)), }
static List<AppModule> getBottomBarModules(BuildContext context) => modules(context).values.toList().getRange(0, 3).toList();
static List<AppModule> getOverhangModules(BuildContext context) => modules(context).values.skip(3).toList();
Widget toListTile(BuildContext context, {Key? key, bool isReorder = false, Function()? onVisibleChange, bool isVisible = true}) => ListTile(
key: key,
leading: CenteredLeading(icon()),
title: Text(name), title: Text(name),
onTap: () => pushScreen(context, withNavBar: false, screen: create()), onTap: isReorder ? null : () => pushScreen(context, withNavBar: false, screen: create()),
trailing: const Icon(Icons.arrow_right), trailing: isReorder
? Row(mainAxisSize: MainAxisSize.min, children: [
IconButton(onPressed: onVisibleChange, icon: Icon(isVisible ? Icons.visibility_outlined : Icons.visibility_off_outlined)),
Icon(Icons.drag_handle_outlined)
])
: const Icon(Icons.arrow_right),
); );
PersistentTabConfig toBottomTab(BuildContext context, {Widget Function(IconData icon)? itemBuilder}) => PersistentTabConfig( PersistentTabConfig toBottomTab(BuildContext context, {Widget Function(IconData icon)? iconBuilder}) => PersistentTabConfig(
screen: Breaker(breaker: BreakerArea.global, child: create()), screen: Breaker(breaker: breakerArea, child: create()),
item: ItemConfig( item: ItemConfig(
activeForegroundColor: Theme.of(context).primaryColor, activeForegroundColor: Theme.of(context).primaryColor,
inactiveForegroundColor: Theme.of(context).colorScheme.secondary, inactiveForegroundColor: Theme.of(context).colorScheme.secondary,
icon: itemBuilder == null ? Icon(icon) : itemBuilder(icon), icon: icon(),
title: name title: name
), ),
); );

View File

@@ -24,8 +24,12 @@ mixin _$GradeAveragesState {
throw _privateConstructorUsedError; throw _privateConstructorUsedError;
List<int> get grades => throw _privateConstructorUsedError; List<int> get grades => throw _privateConstructorUsedError;
/// Serializes this GradeAveragesState to a JSON map.
Map<String, dynamic> toJson() => throw _privateConstructorUsedError; Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
@JsonKey(ignore: true)
/// Create a copy of GradeAveragesState
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
$GradeAveragesStateCopyWith<GradeAveragesState> get copyWith => $GradeAveragesStateCopyWith<GradeAveragesState> get copyWith =>
throw _privateConstructorUsedError; throw _privateConstructorUsedError;
} }
@@ -49,6 +53,8 @@ class _$GradeAveragesStateCopyWithImpl<$Res, $Val extends GradeAveragesState>
// ignore: unused_field // ignore: unused_field
final $Res Function($Val) _then; final $Res Function($Val) _then;
/// Create a copy of GradeAveragesState
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline') @pragma('vm:prefer-inline')
@override @override
$Res call({ $Res call({
@@ -87,6 +93,8 @@ class __$$GradeAveragesStateImplCopyWithImpl<$Res>
$Res Function(_$GradeAveragesStateImpl) _then) $Res Function(_$GradeAveragesStateImpl) _then)
: super(_value, _then); : super(_value, _then);
/// Create a copy of GradeAveragesState
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline') @pragma('vm:prefer-inline')
@override @override
$Res call({ $Res call({
@@ -141,12 +149,14 @@ class _$GradeAveragesStateImpl implements _GradeAveragesState {
const DeepCollectionEquality().equals(other._grades, _grades)); const DeepCollectionEquality().equals(other._grades, _grades));
} }
@JsonKey(ignore: true) @JsonKey(includeFromJson: false, includeToJson: false)
@override @override
int get hashCode => Object.hash( int get hashCode => Object.hash(
runtimeType, gradingSystem, const DeepCollectionEquality().hash(_grades)); runtimeType, gradingSystem, const DeepCollectionEquality().hash(_grades));
@JsonKey(ignore: true) /// Create a copy of GradeAveragesState
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@override @override
@pragma('vm:prefer-inline') @pragma('vm:prefer-inline')
_$$GradeAveragesStateImplCopyWith<_$GradeAveragesStateImpl> get copyWith => _$$GradeAveragesStateImplCopyWith<_$GradeAveragesStateImpl> get copyWith =>
@@ -173,8 +183,11 @@ abstract class _GradeAveragesState implements GradeAveragesState {
GradeAveragesGradingSystem get gradingSystem; GradeAveragesGradingSystem get gradingSystem;
@override @override
List<int> get grades; List<int> get grades;
/// Create a copy of GradeAveragesState
/// with the given fields replaced by the non-null parameter values.
@override @override
@JsonKey(ignore: true) @JsonKey(includeFromJson: false, includeToJson: false)
_$$GradeAveragesStateImplCopyWith<_$GradeAveragesStateImpl> get copyWith => _$$GradeAveragesStateImplCopyWith<_$GradeAveragesStateImpl> get copyWith =>
throw _privateConstructorUsedError; throw _privateConstructorUsedError;
} }

View File

@@ -11,7 +11,9 @@ _$GradeAveragesStateImpl _$$GradeAveragesStateImplFromJson(
_$GradeAveragesStateImpl( _$GradeAveragesStateImpl(
gradingSystem: $enumDecode( gradingSystem: $enumDecode(
_$GradeAveragesGradingSystemEnumMap, json['gradingSystem']), _$GradeAveragesGradingSystemEnumMap, json['gradingSystem']),
grades: (json['grades'] as List<dynamic>).map((e) => e as int).toList(), grades: (json['grades'] as List<dynamic>)
.map((e) => (e as num).toInt())
.toList(),
); );
Map<String, dynamic> _$$GradeAveragesStateImplToJson( Map<String, dynamic> _$$GradeAveragesStateImplToJson(

View File

@@ -16,6 +16,7 @@ class HolidaysBloc extends LoadableHydratedBloc<HolidaysEvent, HolidaysState, Ho
} }
bool showPastHolidays() => innerState?.showPastHolidays ?? false; bool showPastHolidays() => innerState?.showPastHolidays ?? false;
bool showDisclaimerOnEntry() => innerState?.showDisclaimer ?? false;
List<Holiday>? getHolidays() => innerState?.holidays List<Holiday>? getHolidays() => innerState?.holidays
.where((element) => showPastHolidays() || DateTime.parse(element.end).isAfter(DateTime.now())) .where((element) => showPastHolidays() || DateTime.parse(element.end).isAfter(DateTime.now()))
.toList() ?? []; .toList() ?? [];

View File

@@ -24,8 +24,12 @@ mixin _$HolidaysState {
bool get showDisclaimer => throw _privateConstructorUsedError; bool get showDisclaimer => throw _privateConstructorUsedError;
List<Holiday> get holidays => throw _privateConstructorUsedError; List<Holiday> get holidays => throw _privateConstructorUsedError;
/// Serializes this HolidaysState to a JSON map.
Map<String, dynamic> toJson() => throw _privateConstructorUsedError; Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
@JsonKey(ignore: true)
/// Create a copy of HolidaysState
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
$HolidaysStateCopyWith<HolidaysState> get copyWith => $HolidaysStateCopyWith<HolidaysState> get copyWith =>
throw _privateConstructorUsedError; throw _privateConstructorUsedError;
} }
@@ -50,6 +54,8 @@ class _$HolidaysStateCopyWithImpl<$Res, $Val extends HolidaysState>
// ignore: unused_field // ignore: unused_field
final $Res Function($Val) _then; final $Res Function($Val) _then;
/// Create a copy of HolidaysState
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline') @pragma('vm:prefer-inline')
@override @override
$Res call({ $Res call({
@@ -94,6 +100,8 @@ class __$$HolidaysStateImplCopyWithImpl<$Res>
_$HolidaysStateImpl _value, $Res Function(_$HolidaysStateImpl) _then) _$HolidaysStateImpl _value, $Res Function(_$HolidaysStateImpl) _then)
: super(_value, _then); : super(_value, _then);
/// Create a copy of HolidaysState
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline') @pragma('vm:prefer-inline')
@override @override
$Res call({ $Res call({
@@ -171,12 +179,14 @@ class _$HolidaysStateImpl
const DeepCollectionEquality().equals(other._holidays, _holidays)); const DeepCollectionEquality().equals(other._holidays, _holidays));
} }
@JsonKey(ignore: true) @JsonKey(includeFromJson: false, includeToJson: false)
@override @override
int get hashCode => Object.hash(runtimeType, showPastHolidays, showDisclaimer, int get hashCode => Object.hash(runtimeType, showPastHolidays, showDisclaimer,
const DeepCollectionEquality().hash(_holidays)); const DeepCollectionEquality().hash(_holidays));
@JsonKey(ignore: true) /// Create a copy of HolidaysState
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@override @override
@pragma('vm:prefer-inline') @pragma('vm:prefer-inline')
_$$HolidaysStateImplCopyWith<_$HolidaysStateImpl> get copyWith => _$$HolidaysStateImplCopyWith<_$HolidaysStateImpl> get copyWith =>
@@ -205,8 +215,11 @@ abstract class _HolidaysState implements HolidaysState {
bool get showDisclaimer; bool get showDisclaimer;
@override @override
List<Holiday> get holidays; List<Holiday> get holidays;
/// Create a copy of HolidaysState
/// with the given fields replaced by the non-null parameter values.
@override @override
@JsonKey(ignore: true) @JsonKey(includeFromJson: false, includeToJson: false)
_$$HolidaysStateImplCopyWith<_$HolidaysStateImpl> get copyWith => _$$HolidaysStateImplCopyWith<_$HolidaysStateImpl> get copyWith =>
throw _privateConstructorUsedError; throw _privateConstructorUsedError;
} }
@@ -224,8 +237,12 @@ mixin _$Holiday {
String get name => throw _privateConstructorUsedError; String get name => throw _privateConstructorUsedError;
String get slug => throw _privateConstructorUsedError; String get slug => throw _privateConstructorUsedError;
/// Serializes this Holiday to a JSON map.
Map<String, dynamic> toJson() => throw _privateConstructorUsedError; Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
@JsonKey(ignore: true)
/// Create a copy of Holiday
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
$HolidayCopyWith<Holiday> get copyWith => throw _privateConstructorUsedError; $HolidayCopyWith<Holiday> get copyWith => throw _privateConstructorUsedError;
} }
@@ -253,6 +270,8 @@ class _$HolidayCopyWithImpl<$Res, $Val extends Holiday>
// ignore: unused_field // ignore: unused_field
final $Res Function($Val) _then; final $Res Function($Val) _then;
/// Create a copy of Holiday
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline') @pragma('vm:prefer-inline')
@override @override
$Res call({ $Res call({
@@ -316,6 +335,8 @@ class __$$HolidayImplCopyWithImpl<$Res>
_$HolidayImpl _value, $Res Function(_$HolidayImpl) _then) _$HolidayImpl _value, $Res Function(_$HolidayImpl) _then)
: super(_value, _then); : super(_value, _then);
/// Create a copy of Holiday
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline') @pragma('vm:prefer-inline')
@override @override
$Res call({ $Res call({
@@ -414,12 +435,14 @@ class _$HolidayImpl with DiagnosticableTreeMixin implements _Holiday {
(identical(other.slug, slug) || other.slug == slug)); (identical(other.slug, slug) || other.slug == slug));
} }
@JsonKey(ignore: true) @JsonKey(includeFromJson: false, includeToJson: false)
@override @override
int get hashCode => int get hashCode =>
Object.hash(runtimeType, start, end, year, stateCode, name, slug); Object.hash(runtimeType, start, end, year, stateCode, name, slug);
@JsonKey(ignore: true) /// Create a copy of Holiday
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@override @override
@pragma('vm:prefer-inline') @pragma('vm:prefer-inline')
_$$HolidayImplCopyWith<_$HolidayImpl> get copyWith => _$$HolidayImplCopyWith<_$HolidayImpl> get copyWith =>
@@ -456,8 +479,11 @@ abstract class _Holiday implements Holiday {
String get name; String get name;
@override @override
String get slug; String get slug;
/// Create a copy of Holiday
/// with the given fields replaced by the non-null parameter values.
@override @override
@JsonKey(ignore: true) @JsonKey(includeFromJson: false, includeToJson: false)
_$$HolidayImplCopyWith<_$HolidayImpl> get copyWith => _$$HolidayImplCopyWith<_$HolidayImpl> get copyWith =>
throw _privateConstructorUsedError; throw _privateConstructorUsedError;
} }

View File

@@ -26,7 +26,7 @@ _$HolidayImpl _$$HolidayImplFromJson(Map<String, dynamic> json) =>
_$HolidayImpl( _$HolidayImpl(
start: json['start'] as String, start: json['start'] as String,
end: json['end'] as String, end: json['end'] as String,
year: json['year'] as int, year: (json['year'] as num).toInt(),
stateCode: json['stateCode'] as String, stateCode: json['stateCode'] as String,
name: json['name'] as String, name: json['name'] as String,
slug: json['slug'] as String, slug: json['slug'] as String,

View File

@@ -6,6 +6,7 @@ import '../../../../../widget/list_view_util.dart';
import '../../../../../widget/centeredLeading.dart'; import '../../../../../widget/centeredLeading.dart';
import '../../../../../widget/debug/debugTile.dart'; import '../../../../../widget/debug/debugTile.dart';
import '../../../../../widget/string_extensions.dart'; import '../../../../../widget/string_extensions.dart';
import '../../../infrastructure/loadableState/loadable_state.dart';
import '../../../infrastructure/loadableState/view/loadable_state_consumer.dart'; import '../../../infrastructure/loadableState/view/loadable_state_consumer.dart';
import '../../../infrastructure/utilityWidgets/bloc_module.dart'; import '../../../infrastructure/utilityWidgets/bloc_module.dart';
import '../bloc/holidays_bloc.dart'; import '../bloc/holidays_bloc.dart';
@@ -16,7 +17,7 @@ class HolidaysView extends StatelessWidget {
const HolidaysView({super.key}); const HolidaysView({super.key});
@override @override
Widget build(BuildContext context) => BlocModule( Widget build(BuildContext context) => BlocModule<HolidaysBloc, LoadableState<HolidaysState>>(
create: (context) => HolidaysBloc(), create: (context) => HolidaysBloc(),
autoRebuild: true, autoRebuild: true,
child: (context, bloc, state) { child: (context, bloc, state) {
@@ -28,10 +29,7 @@ class HolidaysView extends StatelessWidget {
'Ich übernehme weder Verantwortung für die Richtigkeit der Daten noch hafte ich für wirtschaftliche Schäden die aus der Verwendung dieser Daten entstehen können.\n\n' 'Ich übernehme weder Verantwortung für die Richtigkeit der Daten noch hafte ich für wirtschaftliche Schäden die aus der Verwendung dieser Daten entstehen können.\n\n'
'Die Daten stammen von https://ferien-api.de/'), 'Die Daten stammen von https://ferien-api.de/'),
actions: [ actions: [
TextButton(child: const Text('Okay'), onPressed: () { TextButton(child: const Text('Okay'), onPressed: () => Navigator.of(context).pop()),
bloc.add(DisclaimerDismissed());
Navigator.of(context).pop();
}),
], ],
)); ));
} }
@@ -63,6 +61,10 @@ class HolidaysView extends StatelessWidget {
], ],
), ),
body: LoadableStateConsumer<HolidaysBloc, HolidaysState>( body: LoadableStateConsumer<HolidaysBloc, HolidaysState>(
onLoad: (state) {
if(state.showDisclaimer) showDisclaimer();
bloc.add(DisclaimerDismissed());
},
child: (state, loading) => ListViewUtil.fromList<Holiday>(bloc.getHolidays(), (holiday) { child: (state, loading) => ListViewUtil.fromList<Holiday>(bloc.getHolidays(), (holiday) {
var holidayType = holiday.name.split(' ').first.capitalize(); var holidayType = holiday.name.split(' ').first.capitalize();
String formatDate(String date) => Jiffy.parse(date).format(pattern: 'dd.MM.yyyy'); String formatDate(String date) => Jiffy.parse(date).format(pattern: 'dd.MM.yyyy');

View File

@@ -22,8 +22,12 @@ MarianumMessageState _$MarianumMessageStateFromJson(Map<String, dynamic> json) {
mixin _$MarianumMessageState { mixin _$MarianumMessageState {
MarianumMessageList get messageList => throw _privateConstructorUsedError; MarianumMessageList get messageList => throw _privateConstructorUsedError;
/// Serializes this MarianumMessageState to a JSON map.
Map<String, dynamic> toJson() => throw _privateConstructorUsedError; Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
@JsonKey(ignore: true)
/// Create a copy of MarianumMessageState
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
$MarianumMessageStateCopyWith<MarianumMessageState> get copyWith => $MarianumMessageStateCopyWith<MarianumMessageState> get copyWith =>
throw _privateConstructorUsedError; throw _privateConstructorUsedError;
} }
@@ -50,6 +54,8 @@ class _$MarianumMessageStateCopyWithImpl<$Res,
// ignore: unused_field // ignore: unused_field
final $Res Function($Val) _then; final $Res Function($Val) _then;
/// Create a copy of MarianumMessageState
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline') @pragma('vm:prefer-inline')
@override @override
$Res call({ $Res call({
@@ -63,6 +69,8 @@ class _$MarianumMessageStateCopyWithImpl<$Res,
) as $Val); ) as $Val);
} }
/// Create a copy of MarianumMessageState
/// with the given fields replaced by the non-null parameter values.
@override @override
@pragma('vm:prefer-inline') @pragma('vm:prefer-inline')
$MarianumMessageListCopyWith<$Res> get messageList { $MarianumMessageListCopyWith<$Res> get messageList {
@@ -94,6 +102,8 @@ class __$$MarianumMessageStateImplCopyWithImpl<$Res>
$Res Function(_$MarianumMessageStateImpl) _then) $Res Function(_$MarianumMessageStateImpl) _then)
: super(_value, _then); : super(_value, _then);
/// Create a copy of MarianumMessageState
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline') @pragma('vm:prefer-inline')
@override @override
$Res call({ $Res call({
@@ -133,11 +143,13 @@ class _$MarianumMessageStateImpl implements _MarianumMessageState {
other.messageList == messageList)); other.messageList == messageList));
} }
@JsonKey(ignore: true) @JsonKey(includeFromJson: false, includeToJson: false)
@override @override
int get hashCode => Object.hash(runtimeType, messageList); int get hashCode => Object.hash(runtimeType, messageList);
@JsonKey(ignore: true) /// Create a copy of MarianumMessageState
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@override @override
@pragma('vm:prefer-inline') @pragma('vm:prefer-inline')
_$$MarianumMessageStateImplCopyWith<_$MarianumMessageStateImpl> _$$MarianumMessageStateImplCopyWith<_$MarianumMessageStateImpl>
@@ -163,8 +175,11 @@ abstract class _MarianumMessageState implements MarianumMessageState {
@override @override
MarianumMessageList get messageList; MarianumMessageList get messageList;
/// Create a copy of MarianumMessageState
/// with the given fields replaced by the non-null parameter values.
@override @override
@JsonKey(ignore: true) @JsonKey(includeFromJson: false, includeToJson: false)
_$$MarianumMessageStateImplCopyWith<_$MarianumMessageStateImpl> _$$MarianumMessageStateImplCopyWith<_$MarianumMessageStateImpl>
get copyWith => throw _privateConstructorUsedError; get copyWith => throw _privateConstructorUsedError;
} }
@@ -178,8 +193,12 @@ mixin _$MarianumMessageList {
String get base => throw _privateConstructorUsedError; String get base => throw _privateConstructorUsedError;
List<MarianumMessage> get messages => throw _privateConstructorUsedError; List<MarianumMessage> get messages => throw _privateConstructorUsedError;
/// Serializes this MarianumMessageList to a JSON map.
Map<String, dynamic> toJson() => throw _privateConstructorUsedError; Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
@JsonKey(ignore: true)
/// Create a copy of MarianumMessageList
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
$MarianumMessageListCopyWith<MarianumMessageList> get copyWith => $MarianumMessageListCopyWith<MarianumMessageList> get copyWith =>
throw _privateConstructorUsedError; throw _privateConstructorUsedError;
} }
@@ -203,6 +222,8 @@ class _$MarianumMessageListCopyWithImpl<$Res, $Val extends MarianumMessageList>
// ignore: unused_field // ignore: unused_field
final $Res Function($Val) _then; final $Res Function($Val) _then;
/// Create a copy of MarianumMessageList
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline') @pragma('vm:prefer-inline')
@override @override
$Res call({ $Res call({
@@ -241,6 +262,8 @@ class __$$MarianumMessageListImplCopyWithImpl<$Res>
$Res Function(_$MarianumMessageListImpl) _then) $Res Function(_$MarianumMessageListImpl) _then)
: super(_value, _then); : super(_value, _then);
/// Create a copy of MarianumMessageList
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline') @pragma('vm:prefer-inline')
@override @override
$Res call({ $Res call({
@@ -294,12 +317,14 @@ class _$MarianumMessageListImpl implements _MarianumMessageList {
const DeepCollectionEquality().equals(other._messages, _messages)); const DeepCollectionEquality().equals(other._messages, _messages));
} }
@JsonKey(ignore: true) @JsonKey(includeFromJson: false, includeToJson: false)
@override @override
int get hashCode => Object.hash( int get hashCode => Object.hash(
runtimeType, base, const DeepCollectionEquality().hash(_messages)); runtimeType, base, const DeepCollectionEquality().hash(_messages));
@JsonKey(ignore: true) /// Create a copy of MarianumMessageList
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@override @override
@pragma('vm:prefer-inline') @pragma('vm:prefer-inline')
_$$MarianumMessageListImplCopyWith<_$MarianumMessageListImpl> get copyWith => _$$MarianumMessageListImplCopyWith<_$MarianumMessageListImpl> get copyWith =>
@@ -327,8 +352,11 @@ abstract class _MarianumMessageList implements MarianumMessageList {
String get base; String get base;
@override @override
List<MarianumMessage> get messages; List<MarianumMessage> get messages;
/// Create a copy of MarianumMessageList
/// with the given fields replaced by the non-null parameter values.
@override @override
@JsonKey(ignore: true) @JsonKey(includeFromJson: false, includeToJson: false)
_$$MarianumMessageListImplCopyWith<_$MarianumMessageListImpl> get copyWith => _$$MarianumMessageListImplCopyWith<_$MarianumMessageListImpl> get copyWith =>
throw _privateConstructorUsedError; throw _privateConstructorUsedError;
} }
@@ -343,8 +371,12 @@ mixin _$MarianumMessage {
String get date => throw _privateConstructorUsedError; String get date => throw _privateConstructorUsedError;
String get url => throw _privateConstructorUsedError; String get url => throw _privateConstructorUsedError;
/// Serializes this MarianumMessage to a JSON map.
Map<String, dynamic> toJson() => throw _privateConstructorUsedError; Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
@JsonKey(ignore: true)
/// Create a copy of MarianumMessage
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
$MarianumMessageCopyWith<MarianumMessage> get copyWith => $MarianumMessageCopyWith<MarianumMessage> get copyWith =>
throw _privateConstructorUsedError; throw _privateConstructorUsedError;
} }
@@ -368,6 +400,8 @@ class _$MarianumMessageCopyWithImpl<$Res, $Val extends MarianumMessage>
// ignore: unused_field // ignore: unused_field
final $Res Function($Val) _then; final $Res Function($Val) _then;
/// Create a copy of MarianumMessage
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline') @pragma('vm:prefer-inline')
@override @override
$Res call({ $Res call({
@@ -411,6 +445,8 @@ class __$$MarianumMessageImplCopyWithImpl<$Res>
_$MarianumMessageImpl _value, $Res Function(_$MarianumMessageImpl) _then) _$MarianumMessageImpl _value, $Res Function(_$MarianumMessageImpl) _then)
: super(_value, _then); : super(_value, _then);
/// Create a copy of MarianumMessage
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline') @pragma('vm:prefer-inline')
@override @override
$Res call({ $Res call({
@@ -466,11 +502,13 @@ class _$MarianumMessageImpl implements _MarianumMessage {
(identical(other.url, url) || other.url == url)); (identical(other.url, url) || other.url == url));
} }
@JsonKey(ignore: true) @JsonKey(includeFromJson: false, includeToJson: false)
@override @override
int get hashCode => Object.hash(runtimeType, name, date, url); int get hashCode => Object.hash(runtimeType, name, date, url);
@JsonKey(ignore: true) /// Create a copy of MarianumMessage
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@override @override
@pragma('vm:prefer-inline') @pragma('vm:prefer-inline')
_$$MarianumMessageImplCopyWith<_$MarianumMessageImpl> get copyWith => _$$MarianumMessageImplCopyWith<_$MarianumMessageImpl> get copyWith =>
@@ -500,8 +538,11 @@ abstract class _MarianumMessage implements MarianumMessage {
String get date; String get date;
@override @override
String get url; String get url;
/// Create a copy of MarianumMessage
/// with the given fields replaced by the non-null parameter values.
@override @override
@JsonKey(ignore: true) @JsonKey(includeFromJson: false, includeToJson: false)
_$$MarianumMessageImplCopyWith<_$MarianumMessageImpl> get copyWith => _$$MarianumMessageImplCopyWith<_$MarianumMessageImpl> get copyWith =>
throw _privateConstructorUsedError; throw _privateConstructorUsedError;
} }

View File

@@ -4,6 +4,7 @@ import 'package:json_annotation/json_annotation.dart';
import '../devTools/devToolsSettings.dart'; import '../devTools/devToolsSettings.dart';
import '../file/fileSettings.dart'; import '../file/fileSettings.dart';
import '../fileView/fileViewSettings.dart'; import '../fileView/fileViewSettings.dart';
import '../general/modulesSettings.dart';
import '../holidays/holidaysSettings.dart'; import '../holidays/holidaysSettings.dart';
import '../notification/notificationSettings.dart'; import '../notification/notificationSettings.dart';
import '../talk/talkSettings.dart'; import '../talk/talkSettings.dart';
@@ -20,6 +21,7 @@ class Settings {
ThemeMode appTheme; ThemeMode appTheme;
bool devToolsEnabled; bool devToolsEnabled;
ModulesSettings modulesSettings;
TimetableSettings timetableSettings; TimetableSettings timetableSettings;
TalkSettings talkSettings; TalkSettings talkSettings;
FileSettings fileSettings; FileSettings fileSettings;
@@ -31,6 +33,7 @@ class Settings {
Settings({ Settings({
required this.appTheme, required this.appTheme,
required this.devToolsEnabled, required this.devToolsEnabled,
required this.modulesSettings,
required this.timetableSettings, required this.timetableSettings,
required this.talkSettings, required this.talkSettings,
required this.fileSettings, required this.fileSettings,

View File

@@ -9,6 +9,8 @@ part of 'settings.dart';
Settings _$SettingsFromJson(Map<String, dynamic> json) => Settings( Settings _$SettingsFromJson(Map<String, dynamic> json) => Settings(
appTheme: Settings._themeFromJson(json['appTheme'] as String), appTheme: Settings._themeFromJson(json['appTheme'] as String),
devToolsEnabled: json['devToolsEnabled'] as bool, devToolsEnabled: json['devToolsEnabled'] as bool,
modulesSettings: ModulesSettings.fromJson(
json['modulesSettings'] as Map<String, dynamic>),
timetableSettings: TimetableSettings.fromJson( timetableSettings: TimetableSettings.fromJson(
json['timetableSettings'] as Map<String, dynamic>), json['timetableSettings'] as Map<String, dynamic>),
talkSettings: talkSettings:
@@ -28,6 +30,7 @@ Settings _$SettingsFromJson(Map<String, dynamic> json) => Settings(
Map<String, dynamic> _$SettingsToJson(Settings instance) => <String, dynamic>{ Map<String, dynamic> _$SettingsToJson(Settings instance) => <String, dynamic>{
'appTheme': Settings._themeToJson(instance.appTheme), 'appTheme': Settings._themeToJson(instance.appTheme),
'devToolsEnabled': instance.devToolsEnabled, 'devToolsEnabled': instance.devToolsEnabled,
'modulesSettings': instance.modulesSettings.toJson(),
'timetableSettings': instance.timetableSettings.toJson(), 'timetableSettings': instance.timetableSettings.toJson(),
'talkSettings': instance.talkSettings.toJson(), 'talkSettings': instance.talkSettings.toJson(),
'fileSettings': instance.fileSettings.toJson(), 'fileSettings': instance.fileSettings.toJson(),

View File

@@ -0,0 +1,19 @@
import 'package:freezed_annotation/freezed_annotation.dart';
import '../../state/app/modules/app_modules.dart';
part 'modulesSettings.g.dart';
@JsonSerializable()
class ModulesSettings {
List<Modules> moduleOrder;
List<Modules> hiddenModules;
ModulesSettings({
required this.moduleOrder,
required this.hiddenModules
});
factory ModulesSettings.fromJson(Map<String, dynamic> json) => _$ModulesSettingsFromJson(json);
Map<String, dynamic> toJson() => _$ModulesSettingsToJson(this);
}

View File

@@ -0,0 +1,35 @@
// GENERATED CODE - DO NOT MODIFY BY HAND
part of 'modulesSettings.dart';
// **************************************************************************
// JsonSerializableGenerator
// **************************************************************************
ModulesSettings _$ModulesSettingsFromJson(Map<String, dynamic> json) =>
ModulesSettings(
moduleOrder: (json['moduleOrder'] as List<dynamic>)
.map((e) => $enumDecode(_$ModulesEnumMap, e))
.toList(),
hiddenModules: (json['hiddenModules'] as List<dynamic>)
.map((e) => $enumDecode(_$ModulesEnumMap, e))
.toList(),
);
Map<String, dynamic> _$ModulesSettingsToJson(ModulesSettings instance) =>
<String, dynamic>{
'moduleOrder':
instance.moduleOrder.map((e) => _$ModulesEnumMap[e]!).toList(),
'hiddenModules':
instance.hiddenModules.map((e) => _$ModulesEnumMap[e]!).toList(),
};
const _$ModulesEnumMap = {
Modules.timetable: 'timetable',
Modules.talk: 'talk',
Modules.files: 'files',
Modules.marianumMessage: 'marianumMessage',
Modules.roomPlan: 'roomPlan',
Modules.gradeAveragesCalculator: 'gradeAveragesCalculator',
Modules.holidays: 'holidays',
};

View File

@@ -1,12 +1,18 @@
import 'package:json_annotation/json_annotation.dart'; import 'package:json_annotation/json_annotation.dart';
import '../../view/pages/timetable/timetableNameMode.dart';
part 'timetableSettings.g.dart'; part 'timetableSettings.g.dart';
@JsonSerializable() @JsonSerializable()
class TimetableSettings { class TimetableSettings {
bool connectDoubleLessons; bool connectDoubleLessons;
TimetableNameMode timetableNameMode;
TimetableSettings({required this.connectDoubleLessons}); TimetableSettings({
required this.connectDoubleLessons,
required this.timetableNameMode
});
factory TimetableSettings.fromJson(Map<String, dynamic> json) => _$TimetableSettingsFromJson(json); factory TimetableSettings.fromJson(Map<String, dynamic> json) => _$TimetableSettingsFromJson(json);
Map<String, dynamic> toJson() => _$TimetableSettingsToJson(this); Map<String, dynamic> toJson() => _$TimetableSettingsToJson(this);

View File

@@ -9,9 +9,19 @@ part of 'timetableSettings.dart';
TimetableSettings _$TimetableSettingsFromJson(Map<String, dynamic> json) => TimetableSettings _$TimetableSettingsFromJson(Map<String, dynamic> json) =>
TimetableSettings( TimetableSettings(
connectDoubleLessons: json['connectDoubleLessons'] as bool, connectDoubleLessons: json['connectDoubleLessons'] as bool,
timetableNameMode:
$enumDecode(_$TimetableNameModeEnumMap, json['timetableNameMode']),
); );
Map<String, dynamic> _$TimetableSettingsToJson(TimetableSettings instance) => Map<String, dynamic> _$TimetableSettingsToJson(TimetableSettings instance) =>
<String, dynamic>{ <String, dynamic>{
'connectDoubleLessons': instance.connectDoubleLessons, 'connectDoubleLessons': instance.connectDoubleLessons,
'timetableNameMode':
_$TimetableNameModeEnumMap[instance.timetableNameMode]!,
}; };
const _$TimetableNameModeEnumMap = {
TimetableNameMode.name: 'name',
TimetableNameMode.longName: 'longName',
TimetableNameMode.alternateName: 'alternateName',
};

View File

@@ -1,26 +1,21 @@
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import '../widget/dropdownDisplay.dart';
class AppTheme { class AppTheme {
static ThemeModeDisplay getDisplayOptions(ThemeMode theme) { static DropdownDisplay getDisplayOptions(ThemeMode theme) {
switch(theme) { switch(theme) {
case ThemeMode.system: case ThemeMode.system:
return ThemeModeDisplay(icon: Icons.auto_fix_high_outlined, displayName: 'Systemvorgabe'); return DropdownDisplay(icon: Icons.auto_fix_high_outlined, displayName: 'Systemvorgabe');
case ThemeMode.light: case ThemeMode.light:
return ThemeModeDisplay(icon: Icons.wb_sunny_outlined, displayName: 'Hell'); return DropdownDisplay(icon: Icons.wb_sunny_outlined, displayName: 'Hell');
case ThemeMode.dark: case ThemeMode.dark:
return ThemeModeDisplay(icon: Icons.dark_mode_outlined, displayName: 'Dunkel'); return DropdownDisplay(icon: Icons.dark_mode_outlined, displayName: 'Dunkel');
} }
} }
static bool isDarkMode(BuildContext context) => Theme.of(context).brightness == Brightness.dark; static bool isDarkMode(BuildContext context) => Theme.of(context).brightness == Brightness.dark;
} }
class ThemeModeDisplay {
final IconData icon;
final String displayName;
ThemeModeDisplay({required this.icon, required this.displayName});
}

View File

@@ -1,11 +1,11 @@
import 'dart:io'; import 'dart:io';
import 'package:better_open_file/better_open_file.dart';
import 'package:filesize/filesize.dart'; import 'package:filesize/filesize.dart';
import 'package:flowder/flowder.dart'; import 'package:flowder/flowder.dart';
import 'package:flutter/foundation.dart'; import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:jiffy/jiffy.dart'; import 'package:jiffy/jiffy.dart';
import 'package:open_filex/open_filex.dart';
import '../../../widget/infoDialog.dart'; import '../../../widget/infoDialog.dart';
import 'package:nextcloud/nextcloud.dart'; import 'package:nextcloud/nextcloud.dart';
import 'package:path_provider/path_provider.dart'; import 'package:path_provider/path_provider.dart';

View File

@@ -5,7 +5,7 @@ import 'dart:typed_data';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:image_picker/image_picker.dart'; import 'package:image_picker/image_picker.dart';
import 'package:loader_overlay/loader_overlay.dart'; import 'package:loader_overlay/loader_overlay.dart';
import 'package:package_info/package_info.dart'; import 'package:package_info_plus/package_info_plus.dart';
import 'package:provider/provider.dart'; import 'package:provider/provider.dart';
import 'package:badges/badges.dart' as badges; import 'package:badges/badges.dart' as badges;
@@ -70,7 +70,7 @@ class _FeedbackDialogState extends State<FeedbackDialog> {
decoration: InputDecoration( decoration: InputDecoration(
border: const OutlineInputBorder(), border: const OutlineInputBorder(),
label: const Text('Feedback und Verbesserungen'), label: const Text('Feedback und Verbesserungen'),
errorText: _textFieldEmpty ? 'Bitte gib eine Beschreibung an???' : null, errorText: _textFieldEmpty ? 'Bitte gib eine Beschreibung an!' : null,
), ),
minLines: 4, minLines: 4,
maxLines: 7, maxLines: 7,

View File

@@ -3,76 +3,124 @@ import 'dart:io';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:in_app_review/in_app_review.dart'; import 'package:in_app_review/in_app_review.dart';
import 'package:provider/provider.dart';
import '../../extensions/renderNotNull.dart'; import '../../extensions/renderNotNull.dart';
import 'package:persistent_bottom_nav_bar_v2/persistent_bottom_nav_bar_v2.dart'; import 'package:persistent_bottom_nav_bar_v2/persistent_bottom_nav_bar_v2.dart';
import '../../state/app/modules/app_modules.dart'; import '../../state/app/modules/app_modules.dart';
import '../../storage/base/settingsProvider.dart';
import '../../widget/centeredLeading.dart'; import '../../widget/centeredLeading.dart';
import '../../widget/infoDialog.dart'; import '../../widget/infoDialog.dart';
import '../settings/defaultSettings.dart';
import '../settings/settings.dart'; import '../settings/settings.dart';
import 'more/feedback/feedbackDialog.dart'; import 'more/feedback/feedbackDialog.dart';
import 'more/share/selectShareTypeDialog.dart'; import 'more/share/selectShareTypeDialog.dart';
class Overhang extends StatelessWidget { class Overhang extends StatefulWidget {
const Overhang({super.key}); const Overhang({super.key});
@override @override
Widget build(BuildContext context) => Scaffold( State<Overhang> createState() => _OverhangState();
}
class _OverhangState extends State<Overhang> {
bool editMode = false;
@override
Widget build(BuildContext context) => Consumer<SettingsProvider>(builder: (context, settings, child) => Scaffold(
appBar: AppBar( appBar: AppBar(
title: const Text('Mehr'), title: const Text('Mehr'),
actions: [ actions: [
IconButton(onPressed: () => pushScreen(context, screen: const Settings(), withNavBar: false), icon: const Icon(Icons.settings)) if(editMode) IconButton(
onPressed: settings.val().modulesSettings.toJson().toString() != DefaultSettings.get().modulesSettings.toJson().toString()
? () => settings.val(write: true).modulesSettings = DefaultSettings.get().modulesSettings
: null,
icon: Icon(Icons.undo_outlined)
),
IconButton(onPressed: () => setState(() => editMode = !editMode), icon: Icon(Icons.edit_note_outlined), color: editMode ? Theme.of(context).primaryColor : null),
IconButton(onPressed: editMode ? null : () => pushScreen(context, screen: const Settings(), withNavBar: false), icon: const Icon(Icons.settings)),
], ],
), ),
body: ListView( body: editMode ? _sorting() : _overhang(),
children: [ ));
AppModule.getModule(Modules.marianumMessage).toListTile(context),
AppModule.getModule(Modules.roomPlan).toListTile(context),
AppModule.getModule(Modules.gradeAveragesCalculator).toListTile(context),
AppModule.getModule(Modules.holidays).toListTile(context),
const Divider(), Widget _sorting() => Consumer<SettingsProvider>(builder: (context, settings, child) {
void changeVisibility(Modules module) {
var hidden = settings.val(write: true).modulesSettings.hiddenModules;
hidden.contains(module) ? hidden.remove(module) : (hidden.length < 3 ? hidden.add(module) : null);
}
ListTile( return ReorderableListView(
header: const Center(
heightFactor: 2,
child: Text('Halte und ziehe einen Eintrag, um ihn zu verschieben.\nEs können 3 Bereiche ausgeblendet werden.', textAlign: TextAlign.center)
),
children: AppModule.modules(context, showFiltered: true)
.map((key, value) => MapEntry(key, value.toListTile(
context,
key: Key(key.name),
isReorder: true,
onVisibleChange: () => changeVisibility(key),
isVisible: !settings.val().modulesSettings.hiddenModules.contains(key)
)))
.values
.toList(),
onReorder: (oldIndex, newIndex) {
if (newIndex > oldIndex) newIndex -= 1;
var order = settings.val().modulesSettings.moduleOrder.toList();
final movedModule = order.removeAt(oldIndex);
order.insert(newIndex, movedModule);
settings.val(write: true).modulesSettings.moduleOrder = order;
}
);
});
Widget _overhang() => ListView(
children: [
...AppModule.getOverhangModules(context).map((e) => e.toListTile(context)),
const Divider(),
ListTile(
leading: const Icon(Icons.share_outlined), leading: const Icon(Icons.share_outlined),
title: const Text('Teile die App'), title: const Text('Teile die App'),
subtitle: const Text('Mit Freunden und deiner Klasse teilen'), subtitle: const Text('Mit Freunden und deiner Klasse teilen'),
trailing: const Icon(Icons.arrow_right), trailing: const Icon(Icons.arrow_right),
onTap: () => showDialog(context: context, builder: (context) => const SelectShareTypeDialog()) onTap: () => showDialog(context: context, builder: (context) => const SelectShareTypeDialog())
), ),
FutureBuilder( FutureBuilder(
future: InAppReview.instance.isAvailable(), future: InAppReview.instance.isAvailable(),
builder: (context, snapshot) { builder: (context, snapshot) {
if(!snapshot.hasData) return const SizedBox.shrink(); if(!snapshot.hasData) return const SizedBox.shrink();
String? getPlatformStoreName() { String? getPlatformStoreName() {
if(Platform.isAndroid) return 'Play store'; if(Platform.isAndroid) return 'Play store';
if(Platform.isIOS) return 'App store'; if(Platform.isIOS) return 'App store';
return null; return null;
} }
return ListTile( return ListTile(
leading: const CenteredLeading(Icon(Icons.star_rate_outlined)), leading: const CenteredLeading(Icon(Icons.star_rate_outlined)),
title: const Text('App bewerten'), title: const Text('App bewerten'),
subtitle: getPlatformStoreName().wrapNullable((data) => Text('Im $data')), subtitle: getPlatformStoreName().wrapNullable((data) => Text('Im $data')),
trailing: const Icon(Icons.arrow_right), trailing: const Icon(Icons.arrow_right),
onTap: () { onTap: () {
InAppReview.instance.openStoreListing(appStoreId: '6458789560').then( InAppReview.instance.openStoreListing(appStoreId: '6458789560').then(
(value) => InfoDialog.show(context, 'Vielen Dank!'), (value) => InfoDialog.show(context, 'Vielen Dank!'),
onError: (error) => InfoDialog.show(context, error.toString()) onError: (error) => InfoDialog.show(context, error.toString())
); );
}, },
); );
}, },
), ),
ListTile( ListTile(
leading: const CenteredLeading(Icon(Icons.feedback_outlined)), leading: const CenteredLeading(Icon(Icons.feedback_outlined)),
title: const Text('Du hast eine Idee?'), title: const Text('Du hast eine Idee?'),
subtitle: const Text('Fehler und Verbessungsvorschläge'), subtitle: const Text('Fehler und Verbessungsvorschläge'),
trailing: const Icon(Icons.arrow_right), trailing: const Icon(Icons.arrow_right),
onTap: () => pushScreen(context, withNavBar: false, screen: const FeedbackDialog()), onTap: () => pushScreen(context, withNavBar: false, screen: const FeedbackDialog()),
), ),
], ],
),
); );
} }

View File

@@ -66,7 +66,7 @@ class _ChatInfoState extends State<ChatInfo> {
if(participants != null) ...[ if(participants != null) ...[
ListTile( ListTile(
leading: const Icon(Icons.supervised_user_circle), leading: const Icon(Icons.supervised_user_circle),
title: Text('${participants!.data.length} Teilnehmer'), title: Text('${participants!.data.length} Mitglieder'),
trailing: const Icon(Icons.arrow_right), trailing: const Icon(Icons.arrow_right),
onTap: () => TalkNavigator.pushSplitView(context, ParticipantsListView(participants!)), onTap: () => TalkNavigator.pushSplitView(context, ParticipantsListView(participants!)),
), ),

View File

@@ -1,28 +1,44 @@
import 'package:collection/collection.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import '../../../../../api/marianumcloud/talk/getParticipants/getParticipantsResponse.dart'; import '../../../../../api/marianumcloud/talk/getParticipants/getParticipantsResponse.dart';
import '../../../../../widget/userAvatar.dart'; import '../../../../../widget/userAvatar.dart';
class ParticipantsListView extends StatefulWidget { class ParticipantsListView extends StatelessWidget {
final GetParticipantsResponse participantsResponse; final GetParticipantsResponse participantsResponse;
const ParticipantsListView(this.participantsResponse, {super.key}); const ParticipantsListView(this.participantsResponse, {super.key});
@override @override
State<ParticipantsListView> createState() => _ParticipantsListViewState(); Widget build(BuildContext context) {
} lastname(participant) => participant.displayName.toString().split(' ').last;
final participants = participantsResponse.data
.sorted((a, b) => lastname(a).compareTo(lastname(b)))
.sorted((a, b) => a.participantType.index.compareTo(b.participantType.index));
var groupedParticipants = participants.groupListsBy((participant) => participant.participantType);
class _ParticipantsListViewState extends State<ParticipantsListView> { return Scaffold(
@override
Widget build(BuildContext context) => Scaffold(
appBar: AppBar( appBar: AppBar(
title: const Text('Teilnehmende'), title: const Text('Mitglieder'),
), ),
body: ListView( body: ListView(
children: widget.participantsResponse.data.map((participant) => ListTile( children: [
leading: UserAvatar(id: participant.actorId), ...groupedParticipants.entries.map((entry) => Column(
title: Text(participant.displayName), children: [
subtitle: participant.statusMessage != null ? Text(participant.statusMessage!) : null, ListTile(
)).toList(), title: Text(entry.key.prettyName),
), titleTextStyle: TextStyle(fontWeight: FontWeight.bold),
),
...entry.value.map((participant) => ListTile(
leading: UserAvatar(id: participant.actorId),
title: Text(participant.displayName),
subtitle: participant.statusMessage != null ? Text(participant.statusMessage!) : null,
)),
Divider(),
],
))
],
)
); );
}
} }

View File

@@ -1,4 +1,3 @@
import 'package:better_open_file/better_open_file.dart';
import 'package:bubble/bubble.dart'; import 'package:bubble/bubble.dart';
import 'package:emoji_picker_flutter/emoji_picker_flutter.dart' as emojis; import 'package:emoji_picker_flutter/emoji_picker_flutter.dart' as emojis;
import 'package:flowder/flowder.dart'; import 'package:flowder/flowder.dart';
@@ -6,6 +5,7 @@ import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter/services.dart'; import 'package:flutter/services.dart';
import 'package:jiffy/jiffy.dart'; import 'package:jiffy/jiffy.dart';
import 'package:open_filex/open_filex.dart';
import '../../../../extensions/text.dart'; import '../../../../extensions/text.dart';
import 'package:provider/provider.dart'; import 'package:provider/provider.dart';
@@ -130,7 +130,7 @@ class _ChatBubbleState extends State<ChatBubble> with SingleTickerProviderStateM
emojis.EmojiPicker( emojis.EmojiPicker(
config: emojis.Config( config: emojis.Config(
height: 256, height: 256,
swapCategoryAndBottomBar: true, // swapCategoryAndBottomBar: true, // TODO this property is no longer supported, need to find an replacement
emojiViewConfig: emojis.EmojiViewConfig( emojiViewConfig: emojis.EmojiViewConfig(
backgroundColor: Theme.of(context).canvasColor, backgroundColor: Theme.of(context).canvasColor,
recentsLimit: 67, recentsLimit: 67,
@@ -148,7 +148,7 @@ class _ChatBubbleState extends State<ChatBubble> with SingleTickerProviderStateM
), ),
searchViewConfig: emojis.SearchViewConfig( searchViewConfig: emojis.SearchViewConfig(
backgroundColor: Theme.of(context).dividerColor, backgroundColor: Theme.of(context).dividerColor,
buttonColor: Theme.of(context).dividerColor, // buttonColor: Theme.of(context).dividerColor, // TODO property no longer supported
hintText: 'Suchen', hintText: 'Suchen',
buttonIconColor: Colors.white, buttonIconColor: Colors.white,
), ),
@@ -206,7 +206,7 @@ class _ChatBubbleState extends State<ChatBubble> with SingleTickerProviderStateM
), ),
), ),
Visibility( Visibility(
visible: !message.containsFile, visible: widget.bubbleData.message != '{file}',
child: ListTile( child: ListTile(
leading: const Icon(Icons.copy), leading: const Icon(Icons.copy),
title: const Text('Nachricht kopieren'), title: const Text('Nachricht kopieren'),
@@ -282,14 +282,15 @@ class _ChatBubbleState extends State<ChatBubble> with SingleTickerProviderStateM
if(!widget.bubbleData.isReplyable) return; if(!widget.bubbleData.isReplyable) return;
var dx = details.delta.dx - _dragStartPosition.dx; var dx = details.delta.dx - _dragStartPosition.dx;
setState(() { setState(() {
_position = (_position.dx + dx).abs() > 30 ? Offset(_position.dx, 0) : Offset(_position.dx + dx, 0); _position = (_position.dx + dx).abs() > 60 ? Offset(_position.dx, 0) : Offset(_position.dx + dx, 0);
}); });
}, },
onHorizontalDragEnd: (DragEndDetails details) { onHorizontalDragEnd: (DragEndDetails details) {
var isAction = _position.dx.abs() > 50;
setState(() { setState(() {
_position = const Offset(0, 0); _position = const Offset(0, 0);
}); });
if(widget.bubbleData.isReplyable) { if(widget.bubbleData.isReplyable && isAction) {
Provider.of<ChatProps>(context, listen: false).setReferenceMessageId(widget.bubbleData.id, context, widget.chatData.token); Provider.of<ChatProps>(context, listen: false).setReferenceMessageId(widget.bubbleData.id, context, widget.chatData.token);
} }
}, },
@@ -322,7 +323,9 @@ class _ChatBubbleState extends State<ChatBubble> with SingleTickerProviderStateM
return; return;
} }
downloadProgress = 1; setState(() {
downloadProgress = 1;
});
downloadCore = FileElement.download(context, message.file!.path!, message.file!.name, (progress) { downloadCore = FileElement.download(context, message.file!.path!, message.file!.name, (progress) {
if(progress > 1) { if(progress > 1) {
setState(() { setState(() {
@@ -407,7 +410,7 @@ class _ChatBubbleState extends State<ChatBubble> with SingleTickerProviderStateM
bottom: 0, bottom: 0,
right: 0, right: 0,
left: 0, left: 0,
child: LinearProgressIndicator(value: downloadProgress/100), child: LinearProgressIndicator(value: downloadProgress == 1 ? null : downloadProgress/100),
), ),
), ),
], ],

View File

@@ -21,38 +21,48 @@ class ChatMessage {
ChatMessage({required this.originalMessage, this.originalData}) { ChatMessage({required this.originalMessage, this.originalData}) {
if(originalData?.containsKey('file') ?? false) { if(originalData?.containsKey('file') ?? false) {
file = originalData?['file']; file = originalData?['file'];
content = file?.name ?? 'Datei';
} else {
content = RichObjectStringProcessor.parseToString(originalMessage, originalData);
} }
content = RichObjectStringProcessor.parseToString(originalMessage, originalData);
} }
Widget getWidget() { Widget getWidget() {
if(file == null) { var contentWidget = Linkify(
return Linkify( text: content,
text: content, onOpen: onOpen,
onOpen: onOpen, );
);
}
return CachedNetworkImage( if(file == null) return contentWidget;
errorWidget: (context, url, error) => Padding(padding: const EdgeInsets.only(top: 10), child: Row(
mainAxisSize: MainAxisSize.min, return Padding(
crossAxisAlignment: CrossAxisAlignment.center, padding: const EdgeInsets.only(top: 5),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
const Icon(Icons.file_open_outlined, size: 35), CachedNetworkImage(
const SizedBox(width: 10), errorWidget: (context, url, error) => Row(
Flexible(child: Text(file!.name, maxLines: 2, overflow: TextOverflow.ellipsis, style: const TextStyle(fontWeight: FontWeight.bold))), mainAxisSize: MainAxisSize.min,
const SizedBox(width: 10), crossAxisAlignment: CrossAxisAlignment.center,
children: [
const Icon(Icons.file_open_outlined, size: 35),
const SizedBox(width: 10),
Flexible(child: Text(file!.name, maxLines: 2, overflow: TextOverflow.ellipsis, style: const TextStyle(fontWeight: FontWeight.bold))),
const SizedBox(width: 10),
],
),
alignment: Alignment.center,
placeholder: (context, url) => const Padding(padding: EdgeInsets.all(15), child: SizedBox(width: 50, child: LinearProgressIndicator())),
fadeInDuration: Duration.zero,
fadeOutDuration: Duration.zero,
errorListener: (value) {},
imageUrl: 'https://${AccountData().buildHttpAuthString()}@${EndpointData().nextcloud().full()}/index.php/core/preview?fileId=${file!.id}&x=130&y=-1&a=1',
),
if(originalMessage != '{file}') ...[
SizedBox(height: 5),
contentWidget
]
], ],
)), )
alignment: Alignment.center,
placeholder: (context, url) => const Padding(padding: EdgeInsets.all(10), child: CircularProgressIndicator()),
fadeInDuration: Duration.zero,
fadeOutDuration: Duration.zero,
errorListener: (value) {},
imageUrl: 'https://${AccountData().buildHttpAuthString()}@${EndpointData().nextcloud().full()}/index.php/core/preview?fileId=${file!.id}&x=100&y=-1&a=1',
); );
} }

View File

@@ -1,4 +1,3 @@
import 'package:flutter/foundation.dart'; import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
@@ -38,7 +37,7 @@ class _MessageReactionsState extends State<MessageReactions> {
future: data, future: data,
builder: (context, snapshot) { builder: (context, snapshot) {
if(snapshot.connectionState == ConnectionState.waiting) return const LoadingSpinner(); if(snapshot.connectionState == ConnectionState.waiting) return const LoadingSpinner();
if(snapshot.data == null) return const PlaceholderView(icon: Icons.search_off_outlined, text: 'Keine Reaktionen gefunden!'); if(snapshot.data!.data.isEmpty) return const PlaceholderView(icon: Icons.search_off_outlined, text: 'Keine Reaktionen gefunden!');
return ListView( return ListView(
children: [ children: [
...snapshot.data!.data.entries.map<Widget>((entry) => ExpansionTile( ...snapshot.data!.data.entries.map<Widget>((entry) => ExpansionTile(

View File

@@ -1,6 +1,6 @@
import 'dart:async'; import 'dart:async';
import 'package:collection/collection.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import '../../../extensions/dateTime.dart'; import '../../../extensions/dateTime.dart';
import 'package:provider/provider.dart'; import 'package:provider/provider.dart';
@@ -19,6 +19,7 @@ import 'customTimetableColors.dart';
import 'customTimetableEventEditDialog.dart'; import 'customTimetableEventEditDialog.dart';
import 'timeRegionComponent.dart'; import 'timeRegionComponent.dart';
import 'timetableEvents.dart'; import 'timetableEvents.dart';
import 'timetableNameMode.dart';
import 'viewCustomTimetableEvents.dart'; import 'viewCustomTimetableEvents.dart';
class Timetable extends StatefulWidget { class Timetable extends StatefulWidget {
@@ -72,7 +73,6 @@ class _TimetableState extends State<Timetable> {
title = 'Kalendereintrag hinzufügen'; title = 'Kalendereintrag hinzufügen';
icon = const Icon(Icons.add); icon = const Icon(Icons.add);
case CalendarActions.viewEvents: case CalendarActions.viewEvents:
default:
title = 'Kalendereinträge anzeigen'; title = 'Kalendereinträge anzeigen';
icon = const Icon(Icons.perm_contact_calendar_outlined); icon = const Icon(Icons.perm_contact_calendar_outlined);
} }
@@ -123,6 +123,7 @@ class _TimetableState extends State<Timetable> {
return RefreshIndicator( return RefreshIndicator(
child: SfCalendar( child: SfCalendar(
timeZone: 'W. Europe Standard Time',
view: CalendarView.workWeek, view: CalendarView.workWeek,
dataSource: _buildTableEvents(value), dataSource: _buildTableEvents(value),
@@ -300,15 +301,26 @@ class _TimetableState extends State<Timetable> {
try { try {
var startTime = _parseWebuntisTimestamp(element.date, element.startTime); var startTime = _parseWebuntisTimestamp(element.date, element.startTime);
var endTime = _parseWebuntisTimestamp(element.date, element.endTime); var endTime = _parseWebuntisTimestamp(element.date, element.endTime);
var subject = subjects.result.firstWhereOrNull((subject) => subject.id == element.su.firstOrNull?.id);
var subjectName = 'Unbekannt';
if(subject != null) {
subjectName = {
TimetableNameMode.name: subject.name,
TimetableNameMode.longName: subject.longName,
TimetableNameMode.alternateName: subject.alternateName,
}[settings.val().timetableSettings.timetableNameMode]!;
}
return Appointment( return Appointment(
id: ArbitraryAppointment(webuntis: element), id: ArbitraryAppointment(webuntis: element),
startTime: startTime, startTime: startTime,
endTime: endTime, endTime: endTime,
subject: subjects.result.firstWhere((subject) => subject.id == element.su[0].id).name, subject: subjectName,
location: '' location: ''
'${rooms.result.firstWhere((room) => room.id == element.ro[0].id).name}' '${rooms.result.firstWhereOrNull((room) => room.id == element.ro.firstOrNull?.id)?.name ?? 'Unbekannt'}'
'\n' '\n'
'${element.te.first.longname}', '${element.te.firstOrNull?.longname ?? 'Unbekannt'}',
notes: element.activityType, notes: element.activityType,
color: _getEventColor(element, startTime, endTime), color: _getEventColor(element, startTime, endTime),
); );
@@ -321,7 +333,7 @@ class _TimetableState extends State<Timetable> {
subject: 'Änderung', subject: 'Änderung',
notes: element.info, notes: element.info,
location: 'Unbekannt', location: 'Unbekannt',
color: endTime.isBefore(DateTime.now()) ? Theme.of(context).primaryColor.withAlpha(100) : Theme.of(context).primaryColor, color: const Color(0xff404040).withAlpha(endTime.isBefore(DateTime.now()) ? 100 : 255),
startTimeZone: '', startTimeZone: '',
endTimeZone: '', endTimeZone: '',
); );
@@ -358,6 +370,9 @@ class _TimetableState extends State<Timetable> {
// Any changes or no teacher at this element // Any changes or no teacher at this element
if(webuntisElement.code == 'irregular' || webuntisElement.te.first.id == 0) return const Color(0xff8F19B3).withAlpha(alpha); if(webuntisElement.code == 'irregular' || webuntisElement.te.first.id == 0) return const Color(0xff8F19B3).withAlpha(alpha);
// Teacher has changed
if(webuntisElement.te.any((element) => element.orgname != null)) return const Color(0xFF29639B).withAlpha(alpha);
// Event was in the past // Event was in the past
if(endTime.isBefore(DateTime.now())) return Theme.of(context).primaryColor.withAlpha(alpha); if(endTime.isBefore(DateTime.now())) return Theme.of(context).primaryColor.withAlpha(alpha);

View File

@@ -0,0 +1,25 @@
import 'package:flutter/material.dart';
import '../../../widget/dropdownDisplay.dart';
enum TimetableNameMode {
name,
longName,
alternateName
}
class TimetableNameModes {
static DropdownDisplay getDisplayOptions(TimetableNameMode theme) {
switch(theme) {
case TimetableNameMode.name:
return DropdownDisplay(icon: Icons.device_unknown_outlined, displayName: 'Name');
case TimetableNameMode.longName:
return DropdownDisplay(icon: Icons.perm_device_info_outlined, displayName: 'Langname');
case TimetableNameMode.alternateName:
return DropdownDisplay(icon: Icons.on_device_training_outlined, displayName: 'Kurzform');
}
}
}

View File

@@ -2,22 +2,38 @@ import 'dart:io';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import '../../state/app/modules/app_modules.dart';
import '../../storage/base/settings.dart'; import '../../storage/base/settings.dart';
import '../../storage/devTools/devToolsSettings.dart'; import '../../storage/devTools/devToolsSettings.dart';
import '../../storage/file/fileSettings.dart'; import '../../storage/file/fileSettings.dart';
import '../../storage/fileView/fileViewSettings.dart'; import '../../storage/fileView/fileViewSettings.dart';
import '../../storage/general/modulesSettings.dart';
import '../../storage/holidays/holidaysSettings.dart'; import '../../storage/holidays/holidaysSettings.dart';
import '../../storage/notification/notificationSettings.dart'; import '../../storage/notification/notificationSettings.dart';
import '../../storage/talk/talkSettings.dart'; import '../../storage/talk/talkSettings.dart';
import '../../storage/timetable/timetableSettings.dart'; import '../../storage/timetable/timetableSettings.dart';
import '../pages/files/files.dart'; import '../pages/files/files.dart';
import '../pages/timetable/timetableNameMode.dart';
class DefaultSettings { class DefaultSettings {
static Settings get() => Settings( static Settings get() => Settings(
appTheme: ThemeMode.system, appTheme: ThemeMode.system,
devToolsEnabled: false, devToolsEnabled: false,
modulesSettings: ModulesSettings(
moduleOrder: [
Modules.timetable,
Modules.talk,
Modules.files,
Modules.marianumMessage,
Modules.roomPlan,
Modules.gradeAveragesCalculator,
Modules.holidays
],
hiddenModules: [],
),
timetableSettings: TimetableSettings( timetableSettings: TimetableSettings(
connectDoubleLessons: false, connectDoubleLessons: true,
timetableNameMode: TimetableNameMode.name
), ),
talkSettings: TalkSettings( talkSettings: TalkSettings(
sortFavoritesToTop: true, sortFavoritesToTop: true,

View File

@@ -10,15 +10,15 @@ import '../../widget/confirmDialog.dart';
import '../../widget/debug/cacheView.dart'; import '../../widget/debug/cacheView.dart';
import '../../widget/debug/jsonViewer.dart'; import '../../widget/debug/jsonViewer.dart';
class DevToolsSettingsDialog extends StatefulWidget { class DevToolsSettings extends StatefulWidget {
final SettingsProvider settings; final SettingsProvider settings;
const DevToolsSettingsDialog({required this.settings, super.key}); const DevToolsSettings({required this.settings, super.key});
@override @override
State<DevToolsSettingsDialog> createState() => _DevToolsSettingsDialogState(); State<DevToolsSettings> createState() => _DevToolsSettingsState();
} }
class _DevToolsSettingsDialogState extends State<DevToolsSettingsDialog> { class _DevToolsSettingsState extends State<DevToolsSettings> {
@override @override
Widget build(BuildContext context) => Column( Widget build(BuildContext context) => Column(
children: [ children: [
@@ -59,9 +59,9 @@ class _DevToolsSettingsDialogState extends State<DevToolsSettingsDialog> {
), ),
ListTile( ListTile(
leading: const CenteredLeading(Icon(Icons.image_outlined)), leading: const CenteredLeading(Icon(Icons.image_outlined)),
title: const Text('Cached Thumbnails löschen'), title: const Text('Thumb-storage'),
subtitle: Text('etwa ${filesize(PaintingBinding.instance.imageCache.currentSizeBytes)}'), subtitle: Text('etwa ${filesize(PaintingBinding.instance.imageCache.currentSizeBytes)}\nLange tippen um zu löschen'),
onTap: () { onLongPress: () {
ConfirmDialog( ConfirmDialog(
title: 'Thumbs cache löschen', title: 'Thumbs cache löschen',
content: 'Alle zwischengespeicherten Bilder werden gelöscht.', content: 'Alle zwischengespeicherten Bilder werden gelöscht.',
@@ -69,7 +69,6 @@ class _DevToolsSettingsDialogState extends State<DevToolsSettingsDialog> {
onConfirm: () => PaintingBinding.instance.imageCache.clear(), onConfirm: () => PaintingBinding.instance.imageCache.clear(),
).asDialog(context); ).asDialog(context);
}, },
trailing: const Icon(Icons.arrow_right),
), ),
ListTile( ListTile(
leading: const CenteredLeading(Icon(Icons.settings_applications_outlined)), leading: const CenteredLeading(Icon(Icons.settings_applications_outlined)),
@@ -80,7 +79,7 @@ class _DevToolsSettingsDialogState extends State<DevToolsSettingsDialog> {
}, },
onLongPress: () { onLongPress: () {
ConfirmDialog( ConfirmDialog(
title: 'App-Speicher löschen', title: 'Einstellungen löschen',
content: 'Alle Einstellungen gehen verloren! Accountdaten sowie App-Daten sind nicht betroffen.', content: 'Alle Einstellungen gehen verloren! Accountdaten sowie App-Daten sind nicht betroffen.',
confirmButton: 'Unwiederruflich Löschen', confirmButton: 'Unwiederruflich Löschen',
onConfirm: () { onConfirm: () {
@@ -112,7 +111,7 @@ class _DevToolsSettingsDialogState extends State<DevToolsSettingsDialog> {
), ),
ListTile( ListTile(
leading: const CenteredLeading(Icon(Icons.data_object)), leading: const CenteredLeading(Icon(Icons.data_object)),
title: const Text('BLOC State cache'), title: const Text('BLOC-storage state cache'),
subtitle: const Text('Lange tippen um zu löschen'), subtitle: const Text('Lange tippen um zu löschen'),
onTap: () { onTap: () {
// Navigator.push(context, MaterialPageRoute(builder: (context) => const CacheView())); // Navigator.push(context, MaterialPageRoute(builder: (context) => const CacheView()));
@@ -125,7 +124,6 @@ class _DevToolsSettingsDialogState extends State<DevToolsSettingsDialog> {
onConfirm: () => HydratedBloc.storage.clear(), onConfirm: () => HydratedBloc.storage.clear(),
).asDialog(context); ).asDialog(context);
}, },
trailing: const Icon(Icons.arrow_right),
), ),
], ],
); );

View File

@@ -2,7 +2,7 @@
import 'package:flutter/foundation.dart'; import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:jiffy/jiffy.dart'; import 'package:jiffy/jiffy.dart';
import 'package:package_info/package_info.dart'; import 'package:package_info_plus/package_info_plus.dart';
import 'package:provider/provider.dart'; import 'package:provider/provider.dart';
import 'package:shared_preferences/shared_preferences.dart'; import 'package:shared_preferences/shared_preferences.dart';
@@ -14,8 +14,9 @@ import '../../theming/appTheme.dart';
import '../../widget/centeredLeading.dart'; import '../../widget/centeredLeading.dart';
import '../../widget/confirmDialog.dart'; import '../../widget/confirmDialog.dart';
import '../../widget/debug/cacheView.dart'; import '../../widget/debug/cacheView.dart';
import '../pages/timetable/timetableNameMode.dart';
import 'defaultSettings.dart'; import 'defaultSettings.dart';
import 'devToolsSettingsDialog.dart'; import 'devToolsSettings.dart';
import 'privacyInfo.dart'; import 'privacyInfo.dart';
class Settings extends StatefulWidget { class Settings extends StatefulWidget {
@@ -95,6 +96,29 @@ class _SettingsState extends State<Settings> {
const Divider(), const Divider(),
ListTile(
leading: const Icon(Icons.abc_outlined),
title: const Text('Fachbezeichnung'),
trailing: DropdownButton<TimetableNameMode>(
value: settings.val().timetableSettings.timetableNameMode,
icon: Icon(Icons.arrow_drop_down),
items: TimetableNameMode.values.map((e) => DropdownMenuItem(
value: e,
enabled: e != settings.val().timetableSettings.timetableNameMode,
child: Row(
children: [
Icon(TimetableNameModes.getDisplayOptions(e).icon),
const SizedBox(width: 10),
Text(TimetableNameModes.getDisplayOptions(e).displayName),
],
),
)).toList(),
onChanged: (value) {
settings.val(write: true).timetableSettings.timetableNameMode = value!;
Provider.of<TimetableProps>(context, listen: false).run(renew: false);
},
)
),
ListTile( ListTile(
leading: const Icon(Icons.calendar_view_day_outlined), leading: const Icon(Icons.calendar_view_day_outlined),
title: const Text('Doppelstunden zusammenhängend anzeigen'), title: const Text('Doppelstunden zusammenhängend anzeigen'),
@@ -131,34 +155,6 @@ class _SettingsState extends State<Settings> {
), ),
), ),
const Divider(),
ListTile(
leading: const Icon(Icons.drive_folder_upload_outlined),
title: const Text('Ordner in Dateien nach oben sortieren'),
trailing: Checkbox(
value: settings.val().fileSettings.sortFoldersToTop,
onChanged: (e) {
settings.val(write: true).fileSettings.sortFoldersToTop = e!;
},
),
),
const Divider(),
ListTile(
leading: const Icon(Icons.open_in_new_outlined),
title: const Text('Dateien immer mit Systemdialog öffnen'),
trailing: Checkbox(
value: settings.val().fileViewSettings.alwaysOpenExternally,
onChanged: (e) {
settings.val(write: true).fileViewSettings.alwaysOpenExternally = e!;
},
),
),
const Divider(),
ListTile( ListTile(
leading: const CenteredLeading(Icon(Icons.notifications_active_outlined)), leading: const CenteredLeading(Icon(Icons.notifications_active_outlined)),
title: const Text('Push-Benachrichtigungen aktivieren'), title: const Text('Push-Benachrichtigungen aktivieren'),
@@ -190,6 +186,30 @@ class _SettingsState extends State<Settings> {
const Divider(), const Divider(),
ListTile(
leading: const Icon(Icons.drive_folder_upload_outlined),
title: const Text('Ordner in Dateien nach oben sortieren'),
trailing: Checkbox(
value: settings.val().fileSettings.sortFoldersToTop,
onChanged: (e) {
settings.val(write: true).fileSettings.sortFoldersToTop = e!;
},
),
),
ListTile(
leading: const Icon(Icons.open_in_new_outlined),
title: const Text('Dateien immer mit Systemdialog öffnen'),
trailing: Checkbox(
value: settings.val().fileViewSettings.alwaysOpenExternally,
onChanged: (e) {
settings.val(write: true).fileViewSettings.alwaysOpenExternally = e!;
},
),
),
const Divider(),
ListTile( ListTile(
leading: const Icon(Icons.live_help_outlined), leading: const Icon(Icons.live_help_outlined),
title: const Text('Informationen und Lizenzen'), title: const Text('Informationen und Lizenzen'),
@@ -226,7 +246,7 @@ class _SettingsState extends State<Settings> {
ListTile( ListTile(
leading: const CenteredLeading(Icon(Icons.date_range_outlined)), leading: const CenteredLeading(Icon(Icons.date_range_outlined)),
title: const Text('Infos zu Web-/ Untis'), title: const Text('Infos zu Web-/ Untis'),
subtitle: const Text('Für den Vertretungsplan'), subtitle: const Text('Für den Stundenplan'),
trailing: const Icon(Icons.arrow_right), trailing: const Icon(Icons.arrow_right),
onTap: () => PrivacyInfo(providerText: 'Untis', imprintUrl: 'https://www.untis.at/impressum', privacyUrl: 'https://www.untis.at/datenschutz-wu-apps').showPopup(context) onTap: () => PrivacyInfo(providerText: 'Untis', imprintUrl: 'https://www.untis.at/impressum', privacyUrl: 'https://www.untis.at/datenschutz-wu-apps').showPopup(context)
), ),
@@ -245,14 +265,11 @@ class _SettingsState extends State<Settings> {
const Divider(), const Divider(),
Visibility( ListTile(
visible: !kReleaseMode, leading: const CenteredLeading(Icon(Icons.code)),
child: ListTile( title: const Text('Quellcode MarianumMobile/Client'),
leading: const CenteredLeading(Icon(Icons.code)), subtitle: const Text('GNU GPL v3'),
title: const Text('Quellcode MarianumMobile/Client'), onTap: () => ConfirmDialog.openBrowser(context, 'https://mhsl.eu/gitea/MarianumMobile/Client'),
subtitle: const Text('GNU GPL v3'),
onTap: () => ConfirmDialog.openBrowser(context, 'https://mhsl.eu/gitea/MarianumMobile/Client'),
),
), ),
ListTile( ListTile(
@@ -287,7 +304,7 @@ class _SettingsState extends State<Settings> {
Visibility( Visibility(
visible: settings.val().devToolsEnabled, visible: settings.val().devToolsEnabled,
child: DevToolsSettingsDialog(settings: settings), child: DevToolsSettings(settings: settings),
), ),
], ],
), ),

View File

@@ -3,7 +3,6 @@ import 'dart:async';
import 'dart:convert'; import 'dart:convert';
import 'package:filesize/filesize.dart'; import 'package:filesize/filesize.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:jiffy/jiffy.dart'; import 'package:jiffy/jiffy.dart';
import 'package:localstore/localstore.dart'; import 'package:localstore/localstore.dart';
@@ -41,7 +40,7 @@ class _CacheViewState extends State<CacheView> {
@override @override
Widget build(BuildContext context) => Scaffold( Widget build(BuildContext context) => Scaffold(
appBar: AppBar( appBar: AppBar(
title: const Text('Lokaler cache'), title: const Text('Cache storage'),
), ),
body: FutureBuilder( body: FutureBuilder(
future: files, future: files,
@@ -58,27 +57,7 @@ class _CacheViewState extends State<CacheView> {
title: Text(filename), title: Text(filename),
subtitle: Text("${filesize(jsonEncode(element).length * 8)}, ${Jiffy.parseFromMillisecondsSinceEpoch(element['lastupdate']).fromNow()}"), subtitle: Text("${filesize(jsonEncode(element).length * 8)}, ${Jiffy.parseFromMillisecondsSinceEpoch(element['lastupdate']).fromNow()}"),
trailing: const Icon(Icons.arrow_right), trailing: const Icon(Icons.arrow_right),
onTap: () { onTap: () => JsonViewer.asDialog(context, jsonDecode(element['json'])),
Navigator.push(context, MaterialPageRoute(builder: (context) => JsonViewer(title: filename, data: jsonDecode(element['json'])),));
},
onLongPress: () {
showDialog(context: context, builder: (context) => SimpleDialog(
children: [
const ListTile(
leading: Icon(Icons.delete_forever),
title: Text('Diese Datei löschen'),
),
ListTile(
leading: const Icon(Icons.copy),
title: const Text('Dateitext kopieren'),
onTap: () {
Clipboard.setData(ClipboardData(text: jsonEncode(element)));
Navigator.of(context).pop();
},
)
],
));
},
); );
}, },
); );

View File

@@ -0,0 +1,8 @@
import 'package:flutter/material.dart';
class DropdownDisplay {
final IconData icon;
final String displayName;
DropdownDisplay({required this.icon, required this.displayName});
}

View File

@@ -1,8 +1,8 @@
import 'dart:io'; import 'dart:io';
import 'dart:math'; import 'dart:math';
import 'package:better_open_file/better_open_file.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:open_filex/open_filex.dart';
import 'package:photo_view/photo_view.dart'; import 'package:photo_view/photo_view.dart';
import 'package:provider/provider.dart'; import 'package:provider/provider.dart';
import 'package:share_plus/share_plus.dart'; import 'package:share_plus/share_plus.dart';
@@ -93,7 +93,7 @@ class _FileViewerState extends State<FileViewer> {
); );
default: default:
OpenFile.open(widget.path).then((result) { OpenFilex.open(widget.path).then((result) {
Navigator.of(context).pop(); Navigator.of(context).pop();
if(result.type != ResultType.done) { if(result.type != ResultType.done) {
showDialog(context: context, builder: (context) => AlertDialog( showDialog(context: context, builder: (context) => AlertDialog(

View File

@@ -7,29 +7,26 @@ class PlaceholderView extends StatelessWidget {
const PlaceholderView({super.key, required this.icon, required this.text, this.button}); const PlaceholderView({super.key, required this.icon, required this.text, this.button});
@override @override
Widget build(BuildContext context) => DefaultTextStyle( Widget build(BuildContext context) => Scaffold(
style: const TextStyle(), body: Center(
child: Center( child: Container(
child: Container( margin: const EdgeInsets.only(top: 100, left: 20, right: 20),
margin: const EdgeInsets.only(top: 100, left: 20, right: 20), child: Column(
child: Column( children: [
children: [ Container(
Container( margin: const EdgeInsets.all(30),
margin: const EdgeInsets.all(30), child: Icon(icon, size: 60),
child: Icon(icon, color: Colors.grey, size: 60), ),
), Text(
Text(text, text,
style: const TextStyle( style: const TextStyle(fontSize: 20,),
fontSize: 20, textAlign: TextAlign.center,
color: Colors.grey, ),
), const SizedBox(height: 30),
textAlign: TextAlign.center, if(button != null) button!,
), ],
const SizedBox(height: 30),
if(button != null) button!,
],
),
), ),
), ),
); ),
);
} }

View File

@@ -1,3 +1,3 @@
extension StringExtensions on String { extension StringExtensions on String {
String capitalize() => '${this[0].toUpperCase()}${substring(1).toLowerCase()}'; String capitalize() => '${this[0].toUpperCase()}${substring(1).toLowerCase()}';
} }

View File

Before

Width:  |  Height:  |  Size: 100 KiB

After

Width:  |  Height:  |  Size: 100 KiB

Some files were not shown because too many files have changed in this diff Show More