Compare commits
2 Commits
develop-wi
...
develop-bl
| Author | SHA1 | Date | |
|---|---|---|---|
| 5bdfb9f766 | |||
| 54b777237f |
@@ -25,16 +25,15 @@ if (flutterVersionName == null) {
|
||||
android {
|
||||
namespace "eu.mhsl.marianum.mobile.client"
|
||||
compileSdk flutter.compileSdkVersion
|
||||
ndkVersion "27.0.12077973"
|
||||
ndkVersion flutter.ndkVersion
|
||||
|
||||
compileOptions {
|
||||
sourceCompatibility JavaVersion.VERSION_17
|
||||
targetCompatibility JavaVersion.VERSION_17
|
||||
coreLibraryDesugaringEnabled true
|
||||
sourceCompatibility JavaVersion.VERSION_1_8
|
||||
targetCompatibility JavaVersion.VERSION_1_8
|
||||
}
|
||||
|
||||
kotlinOptions {
|
||||
jvmTarget = '17'
|
||||
jvmTarget = '1.8'
|
||||
}
|
||||
|
||||
sourceSets {
|
||||
@@ -42,8 +41,11 @@ android {
|
||||
}
|
||||
|
||||
defaultConfig {
|
||||
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
|
||||
applicationId "eu.mhsl.marianum.mobile.client"
|
||||
minSdkVersion 26
|
||||
// You can update the following values to match your application needs.
|
||||
// For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-gradle-build-configuration.
|
||||
minSdkVersion 21
|
||||
targetSdkVersion flutter.targetSdkVersion
|
||||
versionCode flutterVersionCode.toInteger()
|
||||
versionName flutterVersionName
|
||||
@@ -57,9 +59,6 @@ android {
|
||||
signingConfig signingConfigs.debug
|
||||
}
|
||||
}
|
||||
buildFeatures {
|
||||
viewBinding true
|
||||
}
|
||||
}
|
||||
|
||||
flutter {
|
||||
@@ -67,6 +66,5 @@ flutter {
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation 'com.android.support:multidex:2.0.1'
|
||||
coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:2.1.4'
|
||||
implementation 'com.android.support:multidex:1.0.3'
|
||||
}
|
||||
|
||||
@@ -1,73 +1,45 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<manifest
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
>
|
||||
|
||||
<!--
|
||||
Required to query activities that can process text, see:
|
||||
https://developer.android.com/training/package-visibility?hl=en and
|
||||
https://developer.android.com/reference/android/content/Intent#ACTION_PROCESS_TEXT.
|
||||
|
||||
In particular, this is used by the Flutter engine in io.flutter.plugin.text.ProcessTextPlugin.
|
||||
-->
|
||||
<queries>
|
||||
<intent>
|
||||
<action android:name="android.intent.action.PROCESS_TEXT" />
|
||||
|
||||
<data android:mimeType="text/plain" />
|
||||
</intent>
|
||||
</queries>
|
||||
|
||||
<uses-permission android:name="android.permission.INTERNET" />
|
||||
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<application
|
||||
tools:replace="android:label"
|
||||
android:label="Marianum Fulda"
|
||||
android:name="${applicationName}"
|
||||
android:icon="@mipmap/ic_launcher"
|
||||
android:label="Marianum Fulda">
|
||||
<receiver
|
||||
android:name=".TimetableWidget"
|
||||
android:exported="false">
|
||||
<intent-filter>
|
||||
<action android:name="android.appwidget.action.APPWIDGET_UPDATE" />
|
||||
</intent-filter>
|
||||
|
||||
<meta-data
|
||||
android:name="android.appwidget.provider"
|
||||
android:resource="@xml/timetable_widget_info" />
|
||||
</receiver>
|
||||
|
||||
android:icon="@mipmap/ic_launcher">
|
||||
<activity
|
||||
android:name=".MainActivity"
|
||||
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
|
||||
android:exported="true"
|
||||
android:hardwareAccelerated="true"
|
||||
android:launchMode="singleTop"
|
||||
android:theme="@style/LaunchTheme"
|
||||
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
|
||||
android:hardwareAccelerated="true"
|
||||
android:windowSoftInputMode="adjustResize">
|
||||
|
||||
<!--
|
||||
Specifies an Android theme to apply to this Activity as soon as
|
||||
<!-- Specifies an Android theme to apply to this Activity as soon as
|
||||
the Android process has started. This theme is visible to the user
|
||||
while the Flutter UI initializes. After that, this theme continues
|
||||
to determine the Window background behind the Flutter UI.
|
||||
-->
|
||||
to determine the Window background behind the Flutter UI. -->
|
||||
<meta-data
|
||||
android:name="io.flutter.embedding.android.NormalTheme"
|
||||
android:resource="@style/NormalTheme" />
|
||||
|
||||
android:name="io.flutter.embedding.android.NormalTheme"
|
||||
android:resource="@style/NormalTheme"
|
||||
/>
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.MAIN" />
|
||||
<category android:name="android.intent.category.LAUNCHER" />
|
||||
<action android:name="android.intent.action.MAIN"/>
|
||||
<category android:name="android.intent.category.LAUNCHER"/>
|
||||
</intent-filter>
|
||||
</activity>
|
||||
<!--
|
||||
Don't delete the meta-data below.
|
||||
This is used by the Flutter tool to generate GeneratedPluginRegistrant.java
|
||||
-->
|
||||
<!-- Don't delete the meta-data below.
|
||||
This is used by the Flutter tool to generate GeneratedPluginRegistrant.java -->
|
||||
<meta-data
|
||||
android:name="flutterEmbedding"
|
||||
android:value="2" />
|
||||
</application>
|
||||
<!-- Required to query activities that can process text, see:
|
||||
https://developer.android.com/training/package-visibility?hl=en and
|
||||
https://developer.android.com/reference/android/content/Intent#ACTION_PROCESS_TEXT.
|
||||
|
||||
In particular, this is used by the Flutter engine in io.flutter.plugin.text.ProcessTextPlugin. -->
|
||||
<queries>
|
||||
<intent>
|
||||
<action android:name="android.intent.action.PROCESS_TEXT"/>
|
||||
<data android:mimeType="text/plain"/>
|
||||
</intent>
|
||||
</queries>
|
||||
<uses-permission android:name="android.permission.INTERNET"/>
|
||||
</manifest>
|
||||
@@ -1,39 +0,0 @@
|
||||
package eu.mhsl.marianum.mobile.client
|
||||
|
||||
import android.app.PendingIntent
|
||||
import android.appwidget.AppWidgetManager
|
||||
import android.appwidget.AppWidgetProvider
|
||||
import android.content.Context
|
||||
import android.graphics.Bitmap
|
||||
import android.graphics.BitmapFactory
|
||||
import android.widget.RemoteViews
|
||||
|
||||
import es.antonborri.home_widget.HomeWidgetPlugin
|
||||
import android.util.Base64
|
||||
|
||||
/**
|
||||
* Implementation of App Widget functionality.
|
||||
*/
|
||||
class TimetableWidget : AppWidgetProvider() {
|
||||
override fun onUpdate(
|
||||
context: Context,
|
||||
appWidgetManager: AppWidgetManager,
|
||||
appWidgetIds: IntArray,
|
||||
) {
|
||||
for (appWidgetId in appWidgetIds) {
|
||||
val widgetData = HomeWidgetPlugin.getData(context)
|
||||
val views = RemoteViews(context.packageName, R.layout.timetable_widget).apply {
|
||||
val imageBase64 = widgetData.getString("screen", null) ?: return@apply
|
||||
val imageBytes = Base64.decode(imageBase64, Base64.DEFAULT);
|
||||
val imageBitmap: Bitmap = BitmapFactory.decodeByteArray(imageBytes, 0, imageBytes.size)
|
||||
setImageViewBitmap(R.id.widget_image, imageBitmap)
|
||||
}
|
||||
|
||||
val launchIntent = context.packageManager.getLaunchIntentForPackage(context.packageName)
|
||||
val pendingIntent = PendingIntent.getActivity(context, 0, launchIntent, PendingIntent.FLAG_UPDATE_CURRENT or PendingIntent.FLAG_IMMUTABLE)
|
||||
views.setOnClickPendingIntent(R.id.background, pendingIntent)
|
||||
|
||||
appWidgetManager.updateAppWidget(appWidgetId, views)
|
||||
}
|
||||
}
|
||||
}
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 98 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 48 KiB |
@@ -1,10 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?><!--
|
||||
Background for widgets to make the rounded corners based on the
|
||||
appWidgetRadius attribute value
|
||||
-->
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="rectangle">
|
||||
|
||||
<corners android:radius="?attr/appWidgetRadius" />
|
||||
<solid android:color="?android:attr/colorBackground" />
|
||||
</shape>
|
||||
@@ -1,10 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?><!--
|
||||
Background for views inside widgets to make the rounded corners based on the
|
||||
appWidgetInnerRadius attribute value
|
||||
-->
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="rectangle">
|
||||
|
||||
<corners android:radius="?attr/appWidgetInnerRadius" />
|
||||
<solid android:color="?android:attr/colorAccent" />
|
||||
</shape>
|
||||
@@ -1,26 +0,0 @@
|
||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:id="@+id/background"
|
||||
style="@style/Widget.Android.AppWidget.Container"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@android:color/transparent"
|
||||
android:padding="0dp"
|
||||
android:theme="@style/Theme.Android.AppWidgetContainer">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/widget_image"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_alignParentLeft="true"
|
||||
android:layout_marginLeft="0dp"
|
||||
android:layout_marginTop="0dp"
|
||||
android:layout_marginBottom="0dp"
|
||||
android:layout_weight="1"
|
||||
android:adjustViewBounds="false"
|
||||
android:background="@android:color/transparent"
|
||||
android:scaleType="fitCenter"
|
||||
android:src="@drawable/timetable_widget_default"
|
||||
android:visibility="visible"
|
||||
tools:visibility="visible" />
|
||||
</RelativeLayout>
|
||||
@@ -1,10 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<!--
|
||||
Having themes.xml for night-v31 because of the priority order of the resource qualifiers.
|
||||
-->
|
||||
<style name="Theme.Android.AppWidgetContainerParent" parent="@android:style/Theme.DeviceDefault.DayNight">
|
||||
<item name="appWidgetRadius">@android:dimen/system_app_widget_background_radius</item>
|
||||
<item name="appWidgetInnerRadius">@android:dimen/system_app_widget_inner_radius</item>
|
||||
</style>
|
||||
</resources>
|
||||
@@ -1,14 +0,0 @@
|
||||
<resources>
|
||||
|
||||
<style name="Widget.Android.AppWidget.Container" parent="android:Widget">
|
||||
<item name="android:id">@android:id/background</item>
|
||||
<item name="android:padding">?attr/appWidgetPadding</item>
|
||||
<item name="android:background">@drawable/app_widget_background</item>
|
||||
</style>
|
||||
|
||||
<style name="Widget.Android.AppWidget.InnerView" parent="android:Widget">
|
||||
<item name="android:padding">?attr/appWidgetPadding</item>
|
||||
<item name="android:background">@drawable/app_widget_inner_view_background</item>
|
||||
<item name="android:textColor">?android:attr/textColorPrimary</item>
|
||||
</style>
|
||||
</resources>
|
||||
@@ -18,18 +18,4 @@
|
||||
<style name="NormalTheme" parent="@android:style/Theme.Light.NoTitleBar">
|
||||
<item name="android:windowBackground">?android:colorBackground</item>
|
||||
</style>
|
||||
|
||||
<style name="Widget.Android.AppWidget.Container" parent="android:Widget">
|
||||
<item name="android:id">@android:id/background</item>
|
||||
<item name="android:padding">?attr/appWidgetPadding</item>
|
||||
<item name="android:background">@drawable/app_widget_background</item>
|
||||
<item name="android:clipToOutline">true</item>
|
||||
</style>
|
||||
|
||||
<style name="Widget.Android.AppWidget.InnerView" parent="android:Widget">
|
||||
<item name="android:padding">?attr/appWidgetPadding</item>
|
||||
<item name="android:background">@drawable/app_widget_inner_view_background</item>
|
||||
<item name="android:textColor">?android:attr/textColorPrimary</item>
|
||||
<item name="android:clipToOutline">true</item>
|
||||
</style>
|
||||
</resources>
|
||||
|
||||
@@ -1,11 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<!--
|
||||
Having themes.xml for v31 variant because @android:dimen/system_app_widget_background_radius
|
||||
and @android:dimen/system_app_widget_internal_padding requires API level 31
|
||||
-->
|
||||
<style name="Theme.Android.AppWidgetContainerParent" parent="@android:style/Theme.DeviceDefault.DayNight">
|
||||
<item name="appWidgetRadius">@android:dimen/system_app_widget_background_radius</item>
|
||||
<item name="appWidgetInnerRadius">@android:dimen/system_app_widget_inner_radius</item>
|
||||
</style>
|
||||
</resources>
|
||||
@@ -1,7 +0,0 @@
|
||||
<resources>
|
||||
<declare-styleable name="AppWidgetAttrs">
|
||||
<attr name="appWidgetPadding" format="dimension" />
|
||||
<attr name="appWidgetInnerRadius" format="dimension" />
|
||||
<attr name="appWidgetRadius" format="dimension" />
|
||||
</declare-styleable>
|
||||
</resources>
|
||||
@@ -1,6 +0,0 @@
|
||||
<resources>
|
||||
<color name="light_blue_50">#FFE1F5FE</color>
|
||||
<color name="light_blue_200">#FF81D4FA</color>
|
||||
<color name="light_blue_600">#FF039BE5</color>
|
||||
<color name="light_blue_900">#FF01579B</color>
|
||||
</resources>
|
||||
@@ -1,10 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
|
||||
<!--
|
||||
Refer to App Widget Documentation for margin information
|
||||
http://developer.android.com/guide/topics/appwidgets/index.html#CreatingLayout
|
||||
-->
|
||||
<dimen name="widget_margin">0dp</dimen>
|
||||
|
||||
</resources>
|
||||
@@ -1,6 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<string name="appwidget_text">Marianum Vertretungsplan</string>
|
||||
<string name="add_widget">Hinzufügen</string>
|
||||
<string name="app_widget_description">Übersicht zum Vertretungsplan</string>
|
||||
</resources>
|
||||
@@ -19,14 +19,4 @@
|
||||
<style name="NormalTheme" parent="@android:style/Theme.Light.NoTitleBar">
|
||||
<item name="android:windowBackground">?android:colorBackground</item>
|
||||
</style>
|
||||
|
||||
<style name="Widget.Android.AppWidget.Container" parent="android:Widget">
|
||||
<item name="android:id">@android:id/background</item>
|
||||
<item name="android:background">?android:attr/colorBackground</item>
|
||||
</style>
|
||||
|
||||
<style name="Widget.Android.AppWidget.InnerView" parent="android:Widget">
|
||||
<item name="android:background">?android:attr/colorBackground</item>
|
||||
<item name="android:textColor">?android:attr/textColorPrimary</item>
|
||||
</style>
|
||||
</resources>
|
||||
|
||||
@@ -1,17 +0,0 @@
|
||||
<resources>
|
||||
|
||||
<style name="Theme.Android.AppWidgetContainerParent" parent="@android:style/Theme.DeviceDefault">
|
||||
<!-- Radius of the outer bound of widgets to make the rounded corners -->
|
||||
<item name="appWidgetRadius">16dp</item>
|
||||
<!--
|
||||
Radius of the inner view's bound of widgets to make the rounded corners.
|
||||
It needs to be 8dp or less than the value of appWidgetRadius
|
||||
-->
|
||||
<item name="appWidgetInnerRadius">8dp</item>
|
||||
</style>
|
||||
|
||||
<style name="Theme.Android.AppWidgetContainer" parent="Theme.Android.AppWidgetContainerParent">
|
||||
<!-- Apply padding to avoid the content of the widget colliding with the rounded corners -->
|
||||
<item name="appWidgetPadding">16dp</item>
|
||||
</style>
|
||||
</resources>
|
||||
@@ -1,16 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<appwidget-provider xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:description="@string/app_widget_description"
|
||||
android:initialKeyguardLayout="@layout/timetable_widget"
|
||||
android:initialLayout="@layout/timetable_widget"
|
||||
android:minWidth="220dp"
|
||||
android:minHeight="294dp"
|
||||
android:minResizeWidth="110dp"
|
||||
android:minResizeHeight="147dp"
|
||||
android:previewImage="@drawable/timetable_widget_preview"
|
||||
android:previewLayout="@layout/timetable_widget"
|
||||
android:resizeMode="horizontal|vertical"
|
||||
android:targetCellWidth="3"
|
||||
android:targetCellHeight="4"
|
||||
android:updatePeriodMillis="86400000"
|
||||
android:widgetCategory="home_screen" />
|
||||
@@ -2,21 +2,6 @@ allprojects {
|
||||
repositories {
|
||||
google()
|
||||
mavenCentral()
|
||||
|
||||
// [required] background_fetch
|
||||
maven {
|
||||
url "${project(':background_fetch').projectDir}/libs"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
buildscript {
|
||||
repositories {
|
||||
google()
|
||||
mavenCentral()
|
||||
}
|
||||
dependencies {
|
||||
classpath 'org.jetbrains.kotlin:kotlin-gradle-plugin:1.8.10'
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,6 +1,3 @@
|
||||
org.gradle.jvmargs=-Xmx4G
|
||||
android.useAndroidX=true
|
||||
android.enableJetifier=true
|
||||
android.defaults.buildfeatures.buildconfig=true
|
||||
android.nonTransitiveRClass=false
|
||||
android.nonFinalResIds=false
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.9-bin.zip
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6.1-bin.zip
|
||||
networkTimeout=10000
|
||||
validateDistributionUrl=true
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
zipStorePath=wrapper/dists
|
||||
|
||||
@@ -19,8 +19,8 @@ pluginManagement {
|
||||
|
||||
plugins {
|
||||
id "dev.flutter.flutter-plugin-loader" version "1.0.0"
|
||||
id "com.android.application" version '8.7.3' apply false
|
||||
id "org.jetbrains.kotlin.android" version "2.1.10" apply false
|
||||
id "com.android.application" version "7.3.0" apply false
|
||||
id "org.jetbrains.kotlin.android" version "1.8.10" apply false
|
||||
}
|
||||
|
||||
include ":app"
|
||||
|
||||
@@ -1,29 +0,0 @@
|
||||
-----BEGIN CERTIFICATE-----
|
||||
MIIFBTCCAu2gAwIBAgIQWgDyEtjUtIDzkkFX6imDBTANBgkqhkiG9w0BAQsFADBP
|
||||
MQswCQYDVQQGEwJVUzEpMCcGA1UEChMgSW50ZXJuZXQgU2VjdXJpdHkgUmVzZWFy
|
||||
Y2ggR3JvdXAxFTATBgNVBAMTDElTUkcgUm9vdCBYMTAeFw0yNDAzMTMwMDAwMDBa
|
||||
Fw0yNzAzMTIyMzU5NTlaMDMxCzAJBgNVBAYTAlVTMRYwFAYDVQQKEw1MZXQncyBF
|
||||
bmNyeXB0MQwwCgYDVQQDEwNSMTMwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEK
|
||||
AoIBAQClZ3CN0FaBZBUXYc25BtStGZCMJlA3mBZjklTb2cyEBZPs0+wIG6BgUUNI
|
||||
fSvHSJaetC3ancgnO1ehn6vw1g7UDjDKb5ux0daknTI+WE41b0VYaHEX/D7YXYKg
|
||||
L7JRbLAaXbhZzjVlyIuhrxA3/+OcXcJJFzT/jCuLjfC8cSyTDB0FxLrHzarJXnzR
|
||||
yQH3nAP2/Apd9Np75tt2QnDr9E0i2gB3b9bJXxf92nUupVcM9upctuBzpWjPoXTi
|
||||
dYJ+EJ/B9aLrAek4sQpEzNPCifVJNYIKNLMc6YjCR06CDgo28EdPivEpBHXazeGa
|
||||
XP9enZiVuppD0EqiFwUBBDDTMrOPAgMBAAGjgfgwgfUwDgYDVR0PAQH/BAQDAgGG
|
||||
MB0GA1UdJQQWMBQGCCsGAQUFBwMCBggrBgEFBQcDATASBgNVHRMBAf8ECDAGAQH/
|
||||
AgEAMB0GA1UdDgQWBBTnq58PLDOgU9NeT3jIsoQOO9aSMzAfBgNVHSMEGDAWgBR5
|
||||
tFnme7bl5AFzgAiIyBpY9umbbjAyBggrBgEFBQcBAQQmMCQwIgYIKwYBBQUHMAKG
|
||||
Fmh0dHA6Ly94MS5pLmxlbmNyLm9yZy8wEwYDVR0gBAwwCjAIBgZngQwBAgEwJwYD
|
||||
VR0fBCAwHjAcoBqgGIYWaHR0cDovL3gxLmMubGVuY3Iub3JnLzANBgkqhkiG9w0B
|
||||
AQsFAAOCAgEAUTdYUqEimzW7TbrOypLqCfL7VOwYf/Q79OH5cHLCZeggfQhDconl
|
||||
k7Kgh8b0vi+/XuWu7CN8n/UPeg1vo3G+taXirrytthQinAHGwc/UdbOygJa9zuBc
|
||||
VyqoH3CXTXDInT+8a+c3aEVMJ2St+pSn4ed+WkDp8ijsijvEyFwE47hulW0Ltzjg
|
||||
9fOV5Pmrg/zxWbRuL+k0DBDHEJennCsAen7c35Pmx7jpmJ/HtgRhcnz0yjSBvyIw
|
||||
6L1QIupkCv2SBODT/xDD3gfQQyKv6roV4G2EhfEyAsWpmojxjCUCGiyg97FvDtm/
|
||||
NK2LSc9lybKxB73I2+P2G3CaWpvvpAiHCVu30jW8GCxKdfhsXtnIy2imskQqVZ2m
|
||||
0Pmxobb28Tucr7xBK7CtwvPrb79os7u2XP3O5f9b/H66GNyRrglRXlrYjI1oGYL/
|
||||
f4I1n/Sgusda6WvA6C190kxjU15Y12mHU4+BxyR9cx2hhGS9fAjMZKJss28qxvz6
|
||||
Axu4CaDmRNZpK/pQrXF17yXCXkmEWgvSOEZy6Z9pcbLIVEGckV/iVeq0AOo2pkg9
|
||||
p4QRIy0tK2diRENLSF2KysFwbY6B26BFeFs3v1sYVRhFW9nLkOrQVporCS0KyZmf
|
||||
wVD89qSTlnctLcZnIavjKsKUu1nA1iU0yYMdYepKR7lWbnwhdx3ewok=
|
||||
-----END CERTIFICATE-----
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 101 KiB After Width: | Height: | Size: 108 KiB |
BIN
ios/.DS_Store
vendored
Normal file
BIN
ios/.DS_Store
vendored
Normal file
Binary file not shown.
@@ -21,6 +21,6 @@
|
||||
<key>CFBundleVersion</key>
|
||||
<string>1.0</string>
|
||||
<key>MinimumOSVersion</key>
|
||||
<string>13.0</string>
|
||||
<string>11.0</string>
|
||||
</dict>
|
||||
</plist>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
# Uncomment this line to define a global platform for your project
|
||||
platform :ios, '15.0'
|
||||
platform :ios, '11.0'
|
||||
|
||||
# CocoaPods analytics sends network stats synchronously affecting flutter build latency.
|
||||
ENV['COCOAPODS_DISABLE_STATS'] = 'true'
|
||||
@@ -31,8 +31,6 @@ target 'Runner' do
|
||||
use_frameworks!
|
||||
use_modular_headers!
|
||||
|
||||
pod 'PhoneNumberKit', '~> 3.7.6'
|
||||
|
||||
flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__))
|
||||
# target 'RunnerTests' do
|
||||
# inherit! :search_paths
|
||||
|
||||
318
ios/Podfile.lock
318
ios/Podfile.lock
@@ -1,190 +1,185 @@
|
||||
PODS:
|
||||
- connectivity_plus (0.0.1):
|
||||
- better_open_file (0.0.1):
|
||||
- Flutter
|
||||
- device_info_plus (0.0.1):
|
||||
- Flutter
|
||||
- DKImagePickerController/Core (4.3.9):
|
||||
- DKImagePickerController/Core (4.3.4):
|
||||
- DKImagePickerController/ImageDataManager
|
||||
- DKImagePickerController/Resource
|
||||
- DKImagePickerController/ImageDataManager (4.3.9)
|
||||
- DKImagePickerController/PhotoGallery (4.3.9):
|
||||
- DKImagePickerController/ImageDataManager (4.3.4)
|
||||
- DKImagePickerController/PhotoGallery (4.3.4):
|
||||
- DKImagePickerController/Core
|
||||
- DKPhotoGallery
|
||||
- DKImagePickerController/Resource (4.3.9)
|
||||
- DKPhotoGallery (0.0.19):
|
||||
- DKPhotoGallery/Core (= 0.0.19)
|
||||
- DKPhotoGallery/Model (= 0.0.19)
|
||||
- DKPhotoGallery/Preview (= 0.0.19)
|
||||
- DKPhotoGallery/Resource (= 0.0.19)
|
||||
- DKImagePickerController/Resource (4.3.4)
|
||||
- DKPhotoGallery (0.0.17):
|
||||
- DKPhotoGallery/Core (= 0.0.17)
|
||||
- DKPhotoGallery/Model (= 0.0.17)
|
||||
- DKPhotoGallery/Preview (= 0.0.17)
|
||||
- DKPhotoGallery/Resource (= 0.0.17)
|
||||
- SDWebImage
|
||||
- SwiftyGif
|
||||
- DKPhotoGallery/Core (0.0.19):
|
||||
- DKPhotoGallery/Core (0.0.17):
|
||||
- DKPhotoGallery/Model
|
||||
- DKPhotoGallery/Preview
|
||||
- SDWebImage
|
||||
- SwiftyGif
|
||||
- DKPhotoGallery/Model (0.0.19):
|
||||
- DKPhotoGallery/Model (0.0.17):
|
||||
- SDWebImage
|
||||
- SwiftyGif
|
||||
- DKPhotoGallery/Preview (0.0.19):
|
||||
- DKPhotoGallery/Preview (0.0.17):
|
||||
- DKPhotoGallery/Model
|
||||
- DKPhotoGallery/Resource
|
||||
- SDWebImage
|
||||
- SwiftyGif
|
||||
- DKPhotoGallery/Resource (0.0.19):
|
||||
- DKPhotoGallery/Resource (0.0.17):
|
||||
- SDWebImage
|
||||
- SwiftyGif
|
||||
- emoji_picker_flutter (0.0.1):
|
||||
- Flutter
|
||||
- fast_rsa (0.7.0):
|
||||
- fast_rsa (0.6.0):
|
||||
- Flutter
|
||||
- file_picker (0.0.1):
|
||||
- DKImagePickerController/PhotoGallery
|
||||
- Flutter
|
||||
- Firebase/CoreOnly (12.4.0):
|
||||
- FirebaseCore (~> 12.4.0)
|
||||
- Firebase/InAppMessaging (12.4.0):
|
||||
- Firebase/CoreOnly (10.12.0):
|
||||
- FirebaseCore (= 10.12.0)
|
||||
- Firebase/InAppMessaging (10.12.0):
|
||||
- Firebase/CoreOnly
|
||||
- FirebaseInAppMessaging (~> 12.4.0-beta)
|
||||
- Firebase/Messaging (12.4.0):
|
||||
- FirebaseInAppMessaging (~> 10.12.0-beta)
|
||||
- Firebase/Messaging (10.12.0):
|
||||
- Firebase/CoreOnly
|
||||
- FirebaseMessaging (~> 12.4.0)
|
||||
- firebase_core (4.2.1):
|
||||
- Firebase/CoreOnly (= 12.4.0)
|
||||
- FirebaseMessaging (~> 10.12.0)
|
||||
- firebase_core (2.15.1):
|
||||
- Firebase/CoreOnly (= 10.12.0)
|
||||
- Flutter
|
||||
- firebase_in_app_messaging (0.9.0-4):
|
||||
- Firebase/InAppMessaging (= 12.4.0)
|
||||
- firebase_in_app_messaging (0.7.3-5):
|
||||
- Firebase/InAppMessaging (= 10.12.0)
|
||||
- firebase_core
|
||||
- Flutter
|
||||
- firebase_messaging (16.0.4):
|
||||
- Firebase/Messaging (= 12.4.0)
|
||||
- firebase_messaging (14.6.6):
|
||||
- Firebase/Messaging (= 10.12.0)
|
||||
- firebase_core
|
||||
- Flutter
|
||||
- FirebaseABTesting (12.4.0):
|
||||
- FirebaseCore (~> 12.4.0)
|
||||
- FirebaseCore (12.4.0):
|
||||
- FirebaseCoreInternal (~> 12.4.0)
|
||||
- GoogleUtilities/Environment (~> 8.1)
|
||||
- GoogleUtilities/Logger (~> 8.1)
|
||||
- FirebaseCoreInternal (12.4.0):
|
||||
- "GoogleUtilities/NSData+zlib (~> 8.1)"
|
||||
- FirebaseInAppMessaging (12.4.0-beta):
|
||||
- FirebaseABTesting (~> 12.4.0)
|
||||
- FirebaseCore (~> 12.4.0)
|
||||
- FirebaseInstallations (~> 12.4.0)
|
||||
- GoogleUtilities/Environment (~> 8.1)
|
||||
- GoogleUtilities/UserDefaults (~> 8.1)
|
||||
- nanopb (~> 3.30910.0)
|
||||
- FirebaseInstallations (12.4.0):
|
||||
- FirebaseCore (~> 12.4.0)
|
||||
- GoogleUtilities/Environment (~> 8.1)
|
||||
- GoogleUtilities/UserDefaults (~> 8.1)
|
||||
- PromisesObjC (~> 2.4)
|
||||
- FirebaseMessaging (12.4.0):
|
||||
- FirebaseCore (~> 12.4.0)
|
||||
- FirebaseInstallations (~> 12.4.0)
|
||||
- GoogleDataTransport (~> 10.1)
|
||||
- GoogleUtilities/AppDelegateSwizzler (~> 8.1)
|
||||
- GoogleUtilities/Environment (~> 8.1)
|
||||
- GoogleUtilities/Reachability (~> 8.1)
|
||||
- GoogleUtilities/UserDefaults (~> 8.1)
|
||||
- nanopb (~> 3.30910.0)
|
||||
- FirebaseABTesting (10.13.0):
|
||||
- FirebaseCore (~> 10.0)
|
||||
- FirebaseCore (10.12.0):
|
||||
- FirebaseCoreInternal (~> 10.0)
|
||||
- GoogleUtilities/Environment (~> 7.8)
|
||||
- GoogleUtilities/Logger (~> 7.8)
|
||||
- FirebaseCoreInternal (10.13.0):
|
||||
- "GoogleUtilities/NSData+zlib (~> 7.8)"
|
||||
- FirebaseInAppMessaging (10.12.0-beta):
|
||||
- FirebaseABTesting (~> 10.0)
|
||||
- FirebaseCore (~> 10.0)
|
||||
- FirebaseInstallations (~> 10.0)
|
||||
- GoogleUtilities/Environment (~> 7.8)
|
||||
- nanopb (< 2.30910.0, >= 2.30908.0)
|
||||
- FirebaseInstallations (10.13.0):
|
||||
- FirebaseCore (~> 10.0)
|
||||
- GoogleUtilities/Environment (~> 7.8)
|
||||
- GoogleUtilities/UserDefaults (~> 7.8)
|
||||
- PromisesObjC (~> 2.1)
|
||||
- FirebaseMessaging (10.12.0):
|
||||
- FirebaseCore (~> 10.0)
|
||||
- FirebaseInstallations (~> 10.0)
|
||||
- GoogleDataTransport (~> 9.2)
|
||||
- GoogleUtilities/AppDelegateSwizzler (~> 7.8)
|
||||
- GoogleUtilities/Environment (~> 7.8)
|
||||
- GoogleUtilities/Reachability (~> 7.8)
|
||||
- GoogleUtilities/UserDefaults (~> 7.8)
|
||||
- nanopb (< 2.30910.0, >= 2.30908.0)
|
||||
- Flutter (1.0.0)
|
||||
- flutter_app_badge (2.0.0):
|
||||
- flutter_app_badger (1.3.0):
|
||||
- Flutter
|
||||
- flutter_local_notifications (0.0.1):
|
||||
- Flutter
|
||||
- flutter_native_splash (2.4.3):
|
||||
- flutter_native_splash (0.0.1):
|
||||
- Flutter
|
||||
- GoogleDataTransport (10.1.0):
|
||||
- nanopb (~> 3.30910.0)
|
||||
- PromisesObjC (~> 2.4)
|
||||
- GoogleUtilities/AppDelegateSwizzler (8.1.0):
|
||||
- fluttertoast (0.0.2):
|
||||
- Flutter
|
||||
- Toast
|
||||
- FMDB (2.7.5):
|
||||
- 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/Logger
|
||||
- GoogleUtilities/Network
|
||||
- GoogleUtilities/Privacy
|
||||
- GoogleUtilities/Environment (8.1.0):
|
||||
- GoogleUtilities/Privacy
|
||||
- GoogleUtilities/Logger (8.1.0):
|
||||
- GoogleUtilities/Environment (7.11.5):
|
||||
- PromisesObjC (< 3.0, >= 1.2)
|
||||
- GoogleUtilities/Logger (7.11.5):
|
||||
- GoogleUtilities/Environment
|
||||
- GoogleUtilities/Privacy
|
||||
- GoogleUtilities/Network (8.1.0):
|
||||
- GoogleUtilities/Network (7.11.5):
|
||||
- GoogleUtilities/Logger
|
||||
- "GoogleUtilities/NSData+zlib"
|
||||
- GoogleUtilities/Privacy
|
||||
- GoogleUtilities/Reachability
|
||||
- "GoogleUtilities/NSData+zlib (8.1.0)":
|
||||
- GoogleUtilities/Privacy
|
||||
- GoogleUtilities/Privacy (8.1.0)
|
||||
- GoogleUtilities/Reachability (8.1.0):
|
||||
- "GoogleUtilities/NSData+zlib (7.11.5)"
|
||||
- GoogleUtilities/Reachability (7.11.5):
|
||||
- GoogleUtilities/Logger
|
||||
- GoogleUtilities/Privacy
|
||||
- GoogleUtilities/UserDefaults (8.1.0):
|
||||
- GoogleUtilities/UserDefaults (7.11.5):
|
||||
- GoogleUtilities/Logger
|
||||
- GoogleUtilities/Privacy
|
||||
- image_picker_ios (0.0.1):
|
||||
- Flutter
|
||||
- in_app_review (2.0.0):
|
||||
- libphonenumber_plugin (0.0.1):
|
||||
- Flutter
|
||||
- nanopb (3.30910.0):
|
||||
- nanopb/decode (= 3.30910.0)
|
||||
- nanopb/encode (= 3.30910.0)
|
||||
- nanopb/decode (3.30910.0)
|
||||
- nanopb/encode (3.30910.0)
|
||||
- open_filex (0.0.2):
|
||||
- Flutter
|
||||
- package_info_plus (0.4.5):
|
||||
- PhoneNumberKit
|
||||
- nanopb (2.30909.0):
|
||||
- nanopb/decode (= 2.30909.0)
|
||||
- nanopb/encode (= 2.30909.0)
|
||||
- nanopb/decode (2.30909.0)
|
||||
- nanopb/encode (2.30909.0)
|
||||
- package_info (0.0.1):
|
||||
- Flutter
|
||||
- path_provider_foundation (0.0.1):
|
||||
- Flutter
|
||||
- FlutterMacOS
|
||||
- PhoneNumberKit (3.7.11):
|
||||
- PhoneNumberKit/PhoneNumberKitCore (= 3.7.11)
|
||||
- PhoneNumberKit/UIKit (= 3.7.11)
|
||||
- PhoneNumberKit/PhoneNumberKitCore (3.7.11)
|
||||
- PhoneNumberKit/UIKit (3.7.11):
|
||||
- PhoneNumberKit (3.6.7):
|
||||
- PhoneNumberKit/PhoneNumberKitCore (= 3.6.7)
|
||||
- PhoneNumberKit/UIKit (= 3.6.7)
|
||||
- PhoneNumberKit/PhoneNumberKitCore (3.6.7)
|
||||
- PhoneNumberKit/UIKit (3.6.7):
|
||||
- PhoneNumberKit/PhoneNumberKitCore
|
||||
- PromisesObjC (2.4.0)
|
||||
- SDWebImage (5.21.2):
|
||||
- SDWebImage/Core (= 5.21.2)
|
||||
- SDWebImage/Core (5.21.2)
|
||||
- PromisesObjC (2.3.1)
|
||||
- SDWebImage (5.17.0):
|
||||
- SDWebImage/Core (= 5.17.0)
|
||||
- SDWebImage/Core (5.17.0)
|
||||
- share_plus (0.0.1):
|
||||
- Flutter
|
||||
- shared_preferences_foundation (0.0.1):
|
||||
- Flutter
|
||||
- FlutterMacOS
|
||||
- sqflite_darwin (0.0.4):
|
||||
- sqflite (0.0.3):
|
||||
- Flutter
|
||||
- FlutterMacOS
|
||||
- SwiftyGif (5.4.5)
|
||||
- FMDB (>= 2.7.5)
|
||||
- SwiftyGif (5.4.4)
|
||||
- syncfusion_flutter_pdfviewer (0.0.1):
|
||||
- Flutter
|
||||
- Toast (4.0.0)
|
||||
- url_launcher_ios (0.0.1):
|
||||
- Flutter
|
||||
|
||||
DEPENDENCIES:
|
||||
- connectivity_plus (from `.symlinks/plugins/connectivity_plus/ios`)
|
||||
- better_open_file (from `.symlinks/plugins/better_open_file/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`)
|
||||
- file_picker (from `.symlinks/plugins/file_picker/ios`)
|
||||
- firebase_core (from `.symlinks/plugins/firebase_core/ios`)
|
||||
- firebase_in_app_messaging (from `.symlinks/plugins/firebase_in_app_messaging/ios`)
|
||||
- firebase_messaging (from `.symlinks/plugins/firebase_messaging/ios`)
|
||||
- Flutter (from `Flutter`)
|
||||
- flutter_app_badge (from `.symlinks/plugins/flutter_app_badge/ios`)
|
||||
- flutter_app_badger (from `.symlinks/plugins/flutter_app_badger/ios`)
|
||||
- flutter_local_notifications (from `.symlinks/plugins/flutter_local_notifications/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`)
|
||||
- in_app_review (from `.symlinks/plugins/in_app_review/ios`)
|
||||
- open_filex (from `.symlinks/plugins/open_filex/ios`)
|
||||
- package_info_plus (from `.symlinks/plugins/package_info_plus/ios`)
|
||||
- libphonenumber_plugin (from `.symlinks/plugins/libphonenumber_plugin/ios`)
|
||||
- package_info (from `.symlinks/plugins/package_info/ios`)
|
||||
- path_provider_foundation (from `.symlinks/plugins/path_provider_foundation/darwin`)
|
||||
- PhoneNumberKit (~> 3.7.6)
|
||||
- share_plus (from `.symlinks/plugins/share_plus/ios`)
|
||||
- shared_preferences_foundation (from `.symlinks/plugins/shared_preferences_foundation/darwin`)
|
||||
- sqflite_darwin (from `.symlinks/plugins/sqflite_darwin/darwin`)
|
||||
- sqflite (from `.symlinks/plugins/sqflite/ios`)
|
||||
- syncfusion_flutter_pdfviewer (from `.symlinks/plugins/syncfusion_flutter_pdfviewer/ios`)
|
||||
- url_launcher_ios (from `.symlinks/plugins/url_launcher_ios/ios`)
|
||||
|
||||
@@ -199,6 +194,7 @@ SPEC REPOS:
|
||||
- FirebaseInAppMessaging
|
||||
- FirebaseInstallations
|
||||
- FirebaseMessaging
|
||||
- FMDB
|
||||
- GoogleDataTransport
|
||||
- GoogleUtilities
|
||||
- nanopb
|
||||
@@ -206,14 +202,13 @@ SPEC REPOS:
|
||||
- PromisesObjC
|
||||
- SDWebImage
|
||||
- SwiftyGif
|
||||
- Toast
|
||||
|
||||
EXTERNAL SOURCES:
|
||||
connectivity_plus:
|
||||
:path: ".symlinks/plugins/connectivity_plus/ios"
|
||||
better_open_file:
|
||||
:path: ".symlinks/plugins/better_open_file/ios"
|
||||
device_info_plus:
|
||||
:path: ".symlinks/plugins/device_info_plus/ios"
|
||||
emoji_picker_flutter:
|
||||
:path: ".symlinks/plugins/emoji_picker_flutter/ios"
|
||||
fast_rsa:
|
||||
:path: ".symlinks/plugins/fast_rsa/ios"
|
||||
file_picker:
|
||||
@@ -226,73 +221,74 @@ EXTERNAL SOURCES:
|
||||
:path: ".symlinks/plugins/firebase_messaging/ios"
|
||||
Flutter:
|
||||
:path: Flutter
|
||||
flutter_app_badge:
|
||||
:path: ".symlinks/plugins/flutter_app_badge/ios"
|
||||
flutter_app_badger:
|
||||
:path: ".symlinks/plugins/flutter_app_badger/ios"
|
||||
flutter_local_notifications:
|
||||
:path: ".symlinks/plugins/flutter_local_notifications/ios"
|
||||
flutter_native_splash:
|
||||
:path: ".symlinks/plugins/flutter_native_splash/ios"
|
||||
fluttertoast:
|
||||
:path: ".symlinks/plugins/fluttertoast/ios"
|
||||
image_picker_ios:
|
||||
:path: ".symlinks/plugins/image_picker_ios/ios"
|
||||
in_app_review:
|
||||
:path: ".symlinks/plugins/in_app_review/ios"
|
||||
open_filex:
|
||||
:path: ".symlinks/plugins/open_filex/ios"
|
||||
package_info_plus:
|
||||
:path: ".symlinks/plugins/package_info_plus/ios"
|
||||
libphonenumber_plugin:
|
||||
:path: ".symlinks/plugins/libphonenumber_plugin/ios"
|
||||
package_info:
|
||||
:path: ".symlinks/plugins/package_info/ios"
|
||||
path_provider_foundation:
|
||||
:path: ".symlinks/plugins/path_provider_foundation/darwin"
|
||||
share_plus:
|
||||
:path: ".symlinks/plugins/share_plus/ios"
|
||||
shared_preferences_foundation:
|
||||
:path: ".symlinks/plugins/shared_preferences_foundation/darwin"
|
||||
sqflite_darwin:
|
||||
:path: ".symlinks/plugins/sqflite_darwin/darwin"
|
||||
sqflite:
|
||||
:path: ".symlinks/plugins/sqflite/ios"
|
||||
syncfusion_flutter_pdfviewer:
|
||||
:path: ".symlinks/plugins/syncfusion_flutter_pdfviewer/ios"
|
||||
url_launcher_ios:
|
||||
:path: ".symlinks/plugins/url_launcher_ios/ios"
|
||||
|
||||
SPEC CHECKSUMS:
|
||||
connectivity_plus: cb623214f4e1f6ef8fe7403d580fdad517d2f7dd
|
||||
device_info_plus: 21fcca2080fbcd348be798aa36c3e5ed849eefbe
|
||||
DKImagePickerController: 946cec48c7873164274ecc4624d19e3da4c1ef3c
|
||||
DKPhotoGallery: b3834fecb755ee09a593d7c9e389d8b5d6deed60
|
||||
emoji_picker_flutter: ece213fc274bdddefb77d502d33080dc54e616cc
|
||||
fast_rsa: fb70897d51040b094c780d5f1d7358614738b879
|
||||
file_picker: a0560bc09d61de87f12d246fc47d2119e6ef37be
|
||||
Firebase: f07b15ae5a6ec0f93713e30b923d9970d144af3e
|
||||
firebase_core: f1aafb21c14f497e5498f7ffc4dc63cbb52b2594
|
||||
firebase_in_app_messaging: 04dfc07ab81578ef83bf0c0229be258ddf287c4f
|
||||
firebase_messaging: c17a29984eafce4b2997fe078bb0a9e0b06f5dde
|
||||
FirebaseABTesting: c05b5ec9f1d9f21a65909525de301d375032d9a4
|
||||
FirebaseCore: bb595f3114953664e3c1dc032f008a244147cfd3
|
||||
FirebaseCoreInternal: d7f5a043c2cd01a08103ab586587c1468047bca6
|
||||
FirebaseInAppMessaging: 606dd4d4d5590a3d8229f363fdebb485235985b2
|
||||
FirebaseInstallations: ae9f4902cb5bf1d0c5eaa31ec1f4e5495a0714e2
|
||||
FirebaseMessaging: d33971b7bb252745ea6cd31ab190d1a1df4b8ed5
|
||||
Flutter: cabc95a1d2626b1b06e7179b784ebcf0c0cde467
|
||||
flutter_app_badge: ca742dd659a157c1090ef7cd881cb78f48f3bcdf
|
||||
flutter_local_notifications: a5a732f069baa862e728d839dd2ebb904737effb
|
||||
flutter_native_splash: c32d145d68aeda5502d5f543ee38c192065986cf
|
||||
GoogleDataTransport: aae35b7ea0c09004c3797d53c8c41f66f219d6a7
|
||||
GoogleUtilities: 00c88b9a86066ef77f0da2fab05f65d7768ed8e1
|
||||
image_picker_ios: e0ece4aa2a75771a7de3fa735d26d90817041326
|
||||
in_app_review: 7dd1ea365263f834b8464673f9df72c80c17c937
|
||||
nanopb: fad817b59e0457d11a5dfbde799381cd727c1275
|
||||
open_filex: 432f3cd11432da3e39f47fcc0df2b1603854eff1
|
||||
package_info_plus: af8e2ca6888548050f16fa2f1938db7b5a5df499
|
||||
path_provider_foundation: bb55f6dbba17d0dccd6737fe6f7f34fbd0376880
|
||||
PhoneNumberKit: ced55861269312a5e3bc2ef82a58d6255b1c976a
|
||||
PromisesObjC: f5707f49cb48b9636751c5b2e7d227e43fba9f47
|
||||
SDWebImage: 9f177d83116802728e122410fb25ad88f5c7608a
|
||||
share_plus: 50da8cb520a8f0f65671c6c6a99b3617ed10a58a
|
||||
shared_preferences_foundation: 7036424c3d8ec98dfe75ff1667cb0cd531ec82bb
|
||||
sqflite_darwin: 20b2a3a3b70e43edae938624ce550a3cbf66a3d0
|
||||
SwiftyGif: 706c60cf65fa2bc5ee0313beece843c8eb8194d4
|
||||
syncfusion_flutter_pdfviewer: 90dc48305d2e33d4aa20681d1e98ddeda891bc14
|
||||
url_launcher_ios: 7a95fa5b60cc718a708b8f2966718e93db0cef1b
|
||||
better_open_file: 03cf320415d4d3f46b6e00adc4a567d76c1a399d
|
||||
device_info_plus: 7545d84d8d1b896cb16a4ff98c19f07ec4b298ea
|
||||
DKImagePickerController: b512c28220a2b8ac7419f21c491fc8534b7601ac
|
||||
DKPhotoGallery: fdfad5125a9fdda9cc57df834d49df790dbb4179
|
||||
fast_rsa: f696740d492d562e76f17b0a81dfc8ec3e635374
|
||||
file_picker: ce3938a0df3cc1ef404671531facef740d03f920
|
||||
Firebase: 07150e75d142fb9399f6777fa56a187b17f833a0
|
||||
firebase_core: 4a3246a02f828a01c74a2c26427037786d90f17f
|
||||
firebase_in_app_messaging: aebdbc10109a0ce44a3294f4ea57ed89ebe1d8bd
|
||||
firebase_messaging: 13b378c8449cae7ec96c79570170943dd73d4738
|
||||
FirebaseABTesting: 86ac5a4fc749088bb4d55a1cbfb2c4cb42c6d5de
|
||||
FirebaseCore: f86a1394906b97ac445ae49c92552a9425831bed
|
||||
FirebaseCoreInternal: b342e37cd4f5b4454ec34308f073420e7920858e
|
||||
FirebaseInAppMessaging: dc24f50aebaf81a377f0b8abf360778f94208931
|
||||
FirebaseInstallations: b28af1b9f997f1a799efe818c94695a3728c352f
|
||||
FirebaseMessaging: bb2c4f6422a753038fe137d90ae7c1af57251316
|
||||
Flutter: f04841e97a9d0b0a8025694d0796dd46242b2854
|
||||
flutter_app_badger: b87fc231847b03b92ce1412aa351842e7e97932f
|
||||
flutter_local_notifications: 0c0b1ae97e741e1521e4c1629a459d04b9aec743
|
||||
flutter_native_splash: 52501b97d1c0a5f898d687f1646226c1f93c56ef
|
||||
fluttertoast: fafc4fa4d01a6a9e4f772ecd190ffa525e9e2d9c
|
||||
FMDB: 2ce00b547f966261cd18927a3ddb07cb6f3db82a
|
||||
GoogleDataTransport: 54dee9d48d14580407f8f5fbf2f496e92437a2f2
|
||||
GoogleUtilities: 13e2c67ede716b8741c7989e26893d151b2b2084
|
||||
image_picker_ios: 4a8aadfbb6dc30ad5141a2ce3832af9214a705b5
|
||||
libphonenumber_plugin: e8a7d64a6624a7c25f2c4ab0b7ead2a8e341e35e
|
||||
nanopb: b552cce312b6c8484180ef47159bc0f65a1f0431
|
||||
package_info: 873975fc26034f0b863a300ad47e7f1ac6c7ec62
|
||||
path_provider_foundation: 29f094ae23ebbca9d3d0cec13889cd9060c0e943
|
||||
PhoneNumberKit: 43b5169526cc417398c8f13f77c97552c1c6ed76
|
||||
PromisesObjC: c50d2056b5253dadbd6c2bea79b0674bd5a52fa4
|
||||
SDWebImage: 750adf017a315a280c60fde706ab1e552a3ae4e9
|
||||
share_plus: 599aa54e4ea31d4b4c0e9c911bcc26c55e791028
|
||||
shared_preferences_foundation: 5b919d13b803cadd15ed2dc053125c68730e5126
|
||||
sqflite: 31f7eba61e3074736dff8807a9b41581e4f7f15a
|
||||
SwiftyGif: 93a1cc87bf3a51916001cf8f3d63835fb64c819f
|
||||
syncfusion_flutter_pdfviewer: bb9998884b864cfedf72628df3503bdf57e397c0
|
||||
Toast: 91b396c56ee72a5790816f40d3a94dd357abc196
|
||||
url_launcher_ios: 08a3dfac5fb39e8759aeb0abbd5d9480f30fc8b4
|
||||
|
||||
PODFILE CHECKSUM: e21c9d4c7b9623c73c6784ddc132fd50a603ad93
|
||||
PODFILE CHECKSUM: 3d89a90682e2cd438911ad748b8ba5992f8b6a0e
|
||||
|
||||
COCOAPODS: 1.16.2
|
||||
COCOAPODS: 1.12.1
|
||||
|
||||
@@ -8,8 +8,8 @@
|
||||
|
||||
/* Begin PBXBuildFile section */
|
||||
1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; };
|
||||
33FDB0982EE9ABDC000B2391 /* GoogleService-Info.plist in Resources */ = {isa = PBXBuildFile; fileRef = 33FDB0972EE9ABDC000B2391 /* GoogleService-Info.plist */; };
|
||||
3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; };
|
||||
6483E4432A911EA00063B51E /* GoogleService-Info.plist in Resources */ = {isa = PBXBuildFile; fileRef = 6483E4422A911EA00063B51E /* GoogleService-Info.plist */; };
|
||||
74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; };
|
||||
97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; };
|
||||
97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; };
|
||||
@@ -33,10 +33,10 @@
|
||||
/* Begin PBXFileReference section */
|
||||
1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = "<group>"; };
|
||||
1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = "<group>"; };
|
||||
33FDB0972EE9ABDC000B2391 /* GoogleService-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "GoogleService-Info.plist"; sourceTree = "<group>"; };
|
||||
3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = "<group>"; };
|
||||
4509EC31CB08BA9BF367AF6C /* Pods-Runner.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.profile.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig"; sourceTree = "<group>"; };
|
||||
64801C012A9112D500E8B558 /* Runner.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = Runner.entitlements; sourceTree = "<group>"; };
|
||||
6483E4422A911EA00063B51E /* GoogleService-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = "GoogleService-Info.plist"; path = "../../../../Downloads/GoogleService-Info.plist"; sourceTree = "<group>"; };
|
||||
74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = "<group>"; };
|
||||
74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
|
||||
7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = "<group>"; };
|
||||
@@ -115,12 +115,12 @@
|
||||
97C146F01CF9000F007C117D /* Runner */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
33FDB0972EE9ABDC000B2391 /* GoogleService-Info.plist */,
|
||||
64801C012A9112D500E8B558 /* Runner.entitlements */,
|
||||
97C146FA1CF9000F007C117D /* Main.storyboard */,
|
||||
97C146FD1CF9000F007C117D /* Assets.xcassets */,
|
||||
97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */,
|
||||
97C147021CF9000F007C117D /* Info.plist */,
|
||||
6483E4422A911EA00063B51E /* GoogleService-Info.plist */,
|
||||
1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */,
|
||||
1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */,
|
||||
74858FAE1ED2DC5600515810 /* AppDelegate.swift */,
|
||||
@@ -144,7 +144,6 @@
|
||||
9705A1C41CF9048500538489 /* Embed Frameworks */,
|
||||
3B06AD1E1E4923F5004D2608 /* Thin Binary */,
|
||||
174B54D80220E5F588BD9737 /* [CP] Embed Pods Frameworks */,
|
||||
859FAB4E05FAC31B7B1A62D7 /* [CP] Copy Pods Resources */,
|
||||
);
|
||||
buildRules = (
|
||||
);
|
||||
@@ -162,7 +161,7 @@
|
||||
isa = PBXProject;
|
||||
attributes = {
|
||||
BuildIndependentTargetsInParallel = YES;
|
||||
LastUpgradeCheck = 1510;
|
||||
LastUpgradeCheck = 1430;
|
||||
ORGANIZATIONNAME = "";
|
||||
TargetAttributes = {
|
||||
97C146ED1CF9000F007C117D = {
|
||||
@@ -196,7 +195,7 @@
|
||||
files = (
|
||||
97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */,
|
||||
3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */,
|
||||
33FDB0982EE9ABDC000B2391 /* GoogleService-Info.plist in Resources */,
|
||||
6483E4432A911EA00063B51E /* GoogleService-Info.plist in Resources */,
|
||||
97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */,
|
||||
97C146FC1CF9000F007C117D /* Main.storyboard in Resources */,
|
||||
);
|
||||
@@ -213,14 +212,10 @@
|
||||
inputFileListPaths = (
|
||||
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-input-files.xcfilelist",
|
||||
);
|
||||
inputPaths = (
|
||||
);
|
||||
name = "[CP] Embed Pods Frameworks";
|
||||
outputFileListPaths = (
|
||||
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-output-files.xcfilelist",
|
||||
);
|
||||
outputPaths = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
shellPath = /bin/sh;
|
||||
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\"\n";
|
||||
@@ -242,27 +237,6 @@
|
||||
shellPath = /bin/sh;
|
||||
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",
|
||||
);
|
||||
inputPaths = (
|
||||
);
|
||||
name = "[CP] Copy Pods Resources";
|
||||
outputFileListPaths = (
|
||||
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources-${CONFIGURATION}-output-files.xcfilelist",
|
||||
);
|
||||
outputPaths = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
shellPath = /bin/sh;
|
||||
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources.sh\"\n";
|
||||
showEnvVarsInLog = 0;
|
||||
};
|
||||
9740EEB61CF901F6004384FC /* Run Script */ = {
|
||||
isa = PBXShellScriptBuildPhase;
|
||||
alwaysOutOfDate = 1;
|
||||
@@ -375,7 +349,7 @@
|
||||
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
||||
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
|
||||
MTL_ENABLE_DEBUG_INFO = NO;
|
||||
SDKROOT = iphoneos;
|
||||
SUPPORTED_PLATFORMS = iphoneos;
|
||||
@@ -460,7 +434,7 @@
|
||||
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
||||
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
|
||||
MTL_ENABLE_DEBUG_INFO = YES;
|
||||
ONLY_ACTIVE_ARCH = YES;
|
||||
SDKROOT = iphoneos;
|
||||
@@ -509,7 +483,7 @@
|
||||
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
||||
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
|
||||
MTL_ENABLE_DEBUG_INFO = NO;
|
||||
SDKROOT = iphoneos;
|
||||
SUPPORTED_PLATFORMS = iphoneos;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Scheme
|
||||
LastUpgradeVersion = "1510"
|
||||
LastUpgradeVersion = "1430"
|
||||
version = "1.3">
|
||||
<BuildAction
|
||||
parallelizeBuildables = "YES"
|
||||
@@ -26,7 +26,6 @@
|
||||
buildConfiguration = "Debug"
|
||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||
customLLDBInitFile = "$(SRCROOT)/Flutter/ephemeral/flutter_lldbinit"
|
||||
shouldUseLaunchSchemeArgsEnv = "YES">
|
||||
<MacroExpansion>
|
||||
<BuildableReference
|
||||
@@ -44,13 +43,11 @@
|
||||
buildConfiguration = "Debug"
|
||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||
customLLDBInitFile = "$(SRCROOT)/Flutter/ephemeral/flutter_lldbinit"
|
||||
launchStyle = "0"
|
||||
useCustomWorkingDirectory = "NO"
|
||||
ignoresPersistentStateOnLaunch = "NO"
|
||||
debugDocumentVersioning = "YES"
|
||||
debugServiceExtension = "internal"
|
||||
enableGPUValidationMode = "1"
|
||||
allowLocationSimulation = "YES">
|
||||
<BuildableProductRunnable
|
||||
runnableDebuggingMode = "0">
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import UIKit
|
||||
import Flutter
|
||||
|
||||
@main
|
||||
@UIApplicationMain
|
||||
@objc class AppDelegate: FlutterAppDelegate {
|
||||
override func application(
|
||||
_ application: UIApplication,
|
||||
|
||||
@@ -5,5 +5,5 @@ abstract class ApiResponse {
|
||||
late http.Response rawResponse;
|
||||
|
||||
@JsonKey(includeIfNull: false)
|
||||
Map<String, String>? headers;
|
||||
late Map<String, String>? headers;
|
||||
}
|
||||
|
||||
@@ -16,12 +16,19 @@ GetHolidaysResponse _$GetHolidaysResponseFromJson(Map<String, dynamic> json) =>
|
||||
(k, e) => MapEntry(k, e as String),
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$GetHolidaysResponseToJson(
|
||||
GetHolidaysResponse instance) =>
|
||||
<String, dynamic>{
|
||||
if (instance.headers case final value?) 'headers': value,
|
||||
'data': instance.data.map((e) => e.toJson()).toList(),
|
||||
};
|
||||
Map<String, dynamic> _$GetHolidaysResponseToJson(GetHolidaysResponse instance) {
|
||||
final val = <String, dynamic>{};
|
||||
|
||||
void writeNotNull(String key, dynamic value) {
|
||||
if (value != null) {
|
||||
val[key] = value;
|
||||
}
|
||||
}
|
||||
|
||||
writeNotNull('headers', instance.headers);
|
||||
val['data'] = instance.data.map((e) => e.toJson()).toList();
|
||||
return val;
|
||||
}
|
||||
|
||||
GetHolidaysResponseObject _$GetHolidaysResponseObjectFromJson(
|
||||
Map<String, dynamic> json) =>
|
||||
|
||||
@@ -18,7 +18,7 @@ class AutocompleteResponseObject {
|
||||
String label;
|
||||
String? icon;
|
||||
String? source;
|
||||
String? status;
|
||||
List<String>? status;
|
||||
String? subline;
|
||||
String? shareWithDisplayNameUniqe;
|
||||
|
||||
|
||||
@@ -28,7 +28,7 @@ AutocompleteResponseObject _$AutocompleteResponseObjectFromJson(
|
||||
json['label'] as String,
|
||||
json['icon'] as String?,
|
||||
json['source'] as String?,
|
||||
json['status'] as String?,
|
||||
(json['status'] as List<dynamic>?)?.map((e) => e as String).toList(),
|
||||
json['subline'] as String?,
|
||||
json['shareWithDisplayNameUniqe'] as String?,
|
||||
);
|
||||
|
||||
@@ -20,22 +20,27 @@ GetChatParams _$GetChatParamsFromJson(Map<String, dynamic> json) =>
|
||||
_$GetChatParamsSwitchEnumMap, json['includeLastKnown']),
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$GetChatParamsToJson(GetChatParams instance) =>
|
||||
<String, dynamic>{
|
||||
'lookIntoFuture': _$GetChatParamsSwitchEnumMap[instance.lookIntoFuture]!,
|
||||
if (instance.limit case final value?) 'limit': value,
|
||||
if (instance.lastKnownMessageId case final value?)
|
||||
'lastKnownMessageId': value,
|
||||
if (instance.lastCommonReadId case final value?)
|
||||
'lastCommonReadId': value,
|
||||
if (instance.timeout case final value?) 'timeout': value,
|
||||
if (_$GetChatParamsSwitchEnumMap[instance.setReadMarker]
|
||||
case final value?)
|
||||
'setReadMarker': value,
|
||||
if (_$GetChatParamsSwitchEnumMap[instance.includeLastKnown]
|
||||
case final value?)
|
||||
'includeLastKnown': value,
|
||||
};
|
||||
Map<String, dynamic> _$GetChatParamsToJson(GetChatParams instance) {
|
||||
final val = <String, dynamic>{
|
||||
'lookIntoFuture': _$GetChatParamsSwitchEnumMap[instance.lookIntoFuture]!,
|
||||
};
|
||||
|
||||
void writeNotNull(String key, dynamic value) {
|
||||
if (value != null) {
|
||||
val[key] = value;
|
||||
}
|
||||
}
|
||||
|
||||
writeNotNull('limit', instance.limit);
|
||||
writeNotNull('lastKnownMessageId', instance.lastKnownMessageId);
|
||||
writeNotNull('lastCommonReadId', instance.lastCommonReadId);
|
||||
writeNotNull('timeout', instance.timeout);
|
||||
writeNotNull(
|
||||
'setReadMarker', _$GetChatParamsSwitchEnumMap[instance.setReadMarker]);
|
||||
writeNotNull('includeLastKnown',
|
||||
_$GetChatParamsSwitchEnumMap[instance.includeLastKnown]);
|
||||
return val;
|
||||
}
|
||||
|
||||
const _$GetChatParamsSwitchEnumMap = {
|
||||
GetChatParamsSwitch.on: 1,
|
||||
|
||||
@@ -120,5 +120,4 @@ enum RichObjectStringObjectType {
|
||||
@JsonValue('guest') guest,
|
||||
@JsonValue('highlight') highlight,
|
||||
@JsonValue('talk-poll') talkPoll,
|
||||
@JsonValue('geo-location') geoLocation,
|
||||
}
|
||||
|
||||
@@ -15,11 +15,19 @@ GetChatResponse _$GetChatResponseFromJson(Map<String, dynamic> json) =>
|
||||
(k, e) => MapEntry(k, e as String),
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$GetChatResponseToJson(GetChatResponse instance) =>
|
||||
<String, dynamic>{
|
||||
if (instance.headers case final value?) 'headers': value,
|
||||
'data': instance.data.map((e) => e.toJson()).toList(),
|
||||
};
|
||||
Map<String, dynamic> _$GetChatResponseToJson(GetChatResponse instance) {
|
||||
final val = <String, dynamic>{};
|
||||
|
||||
void writeNotNull(String key, dynamic value) {
|
||||
if (value != null) {
|
||||
val[key] = value;
|
||||
}
|
||||
}
|
||||
|
||||
writeNotNull('headers', instance.headers);
|
||||
val['data'] = instance.data.map((e) => e.toJson()).toList();
|
||||
return val;
|
||||
}
|
||||
|
||||
GetChatResponseObject _$GetChatResponseObjectFromJson(
|
||||
Map<String, dynamic> json) =>
|
||||
@@ -113,5 +121,4 @@ const _$RichObjectStringObjectTypeEnumMap = {
|
||||
RichObjectStringObjectType.guest: 'guest',
|
||||
RichObjectStringObjectType.highlight: 'highlight',
|
||||
RichObjectStringObjectType.talkPoll: 'talk-poll',
|
||||
RichObjectStringObjectType.geoLocation: 'geo-location',
|
||||
};
|
||||
|
||||
@@ -55,15 +55,12 @@ class GetParticipantsResponseObject {
|
||||
}
|
||||
|
||||
enum GetParticipantsResponseObjectParticipantType {
|
||||
@JsonValue(1) owner('Besitzer'),
|
||||
@JsonValue(2) moderator('Moderator'),
|
||||
@JsonValue(3) user('Teilnehmer'),
|
||||
@JsonValue(4) guest('Gast'),
|
||||
@JsonValue(5) userFollowingPublicLink('Teilnehmer über Link'),
|
||||
@JsonValue(6) guestWithModeratorPermissions('Gast Moderator');
|
||||
|
||||
const GetParticipantsResponseObjectParticipantType(this.prettyName);
|
||||
final String prettyName;
|
||||
@JsonValue(1) owner,
|
||||
@JsonValue(2) moderator,
|
||||
@JsonValue(3) user,
|
||||
@JsonValue(4) guest,
|
||||
@JsonValue(5) userFollowingPublicLink,
|
||||
@JsonValue(6) guestWithModeratorPermissions
|
||||
}
|
||||
|
||||
enum GetParticipantsResponseObjectParticipantsInCallFlags {
|
||||
|
||||
@@ -18,11 +18,19 @@ GetParticipantsResponse _$GetParticipantsResponseFromJson(
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$GetParticipantsResponseToJson(
|
||||
GetParticipantsResponse instance) =>
|
||||
<String, dynamic>{
|
||||
if (instance.headers case final value?) 'headers': value,
|
||||
'data': instance.data.map((e) => e.toJson()).toList(),
|
||||
};
|
||||
GetParticipantsResponse instance) {
|
||||
final val = <String, dynamic>{};
|
||||
|
||||
void writeNotNull(String key, dynamic value) {
|
||||
if (value != null) {
|
||||
val[key] = value;
|
||||
}
|
||||
}
|
||||
|
||||
writeNotNull('headers', instance.headers);
|
||||
val['data'] = instance.data.map((e) => e.toJson()).toList();
|
||||
return val;
|
||||
}
|
||||
|
||||
GetParticipantsResponseObject _$GetParticipantsResponseObjectFromJson(
|
||||
Map<String, dynamic> json) =>
|
||||
|
||||
@@ -22,12 +22,20 @@ GetReactionsResponse _$GetReactionsResponseFromJson(
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$GetReactionsResponseToJson(
|
||||
GetReactionsResponse instance) =>
|
||||
<String, dynamic>{
|
||||
if (instance.headers case final value?) 'headers': value,
|
||||
'data': instance.data
|
||||
.map((k, e) => MapEntry(k, e.map((e) => e.toJson()).toList())),
|
||||
};
|
||||
GetReactionsResponse instance) {
|
||||
final val = <String, dynamic>{};
|
||||
|
||||
void writeNotNull(String key, dynamic value) {
|
||||
if (value != null) {
|
||||
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(
|
||||
Map<String, dynamic> json) =>
|
||||
|
||||
@@ -110,7 +110,6 @@ enum GetRoomResponseObjectConversationType {
|
||||
@JsonValue(3) public,
|
||||
@JsonValue(4) changelog,
|
||||
@JsonValue(5) deleted,
|
||||
@JsonValue(6) noteToSelf,
|
||||
}
|
||||
|
||||
enum GetRoomResponseObjectParticipantNotificationLevel {
|
||||
|
||||
@@ -15,11 +15,19 @@ GetRoomResponse _$GetRoomResponseFromJson(Map<String, dynamic> json) =>
|
||||
(k, e) => MapEntry(k, e as String),
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$GetRoomResponseToJson(GetRoomResponse instance) =>
|
||||
<String, dynamic>{
|
||||
if (instance.headers case final value?) 'headers': value,
|
||||
'data': instance.data.map((e) => e.toJson()).toList(),
|
||||
};
|
||||
Map<String, dynamic> _$GetRoomResponseToJson(GetRoomResponse instance) {
|
||||
final val = <String, dynamic>{};
|
||||
|
||||
void writeNotNull(String key, dynamic value) {
|
||||
if (value != null) {
|
||||
val[key] = value;
|
||||
}
|
||||
}
|
||||
|
||||
writeNotNull('headers', instance.headers);
|
||||
val['data'] = instance.data.map((e) => e.toJson()).toList();
|
||||
return val;
|
||||
}
|
||||
|
||||
GetRoomResponseObject _$GetRoomResponseObjectFromJson(
|
||||
Map<String, dynamic> json) =>
|
||||
@@ -102,7 +110,6 @@ const _$GetRoomResponseObjectConversationTypeEnumMap = {
|
||||
GetRoomResponseObjectConversationType.public: 3,
|
||||
GetRoomResponseObjectConversationType.changelog: 4,
|
||||
GetRoomResponseObjectConversationType.deleted: 5,
|
||||
GetRoomResponseObjectConversationType.noteToSelf: 6,
|
||||
};
|
||||
|
||||
const _$GetRoomResponseObjectParticipantNotificationLevelEnumMap = {
|
||||
|
||||
@@ -12,8 +12,17 @@ SendMessageParams _$SendMessageParamsFromJson(Map<String, dynamic> json) =>
|
||||
replyTo: json['replyTo'] as String?,
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$SendMessageParamsToJson(SendMessageParams instance) =>
|
||||
<String, dynamic>{
|
||||
'message': instance.message,
|
||||
if (instance.replyTo case final value?) 'replyTo': value,
|
||||
};
|
||||
Map<String, dynamic> _$SendMessageParamsToJson(SendMessageParams instance) {
|
||||
final val = <String, dynamic>{
|
||||
'message': instance.message,
|
||||
};
|
||||
|
||||
void writeNotNull(String key, dynamic value) {
|
||||
if (value != null) {
|
||||
val[key] = value;
|
||||
}
|
||||
}
|
||||
|
||||
writeNotNull('replyTo', instance.replyTo);
|
||||
return val;
|
||||
}
|
||||
|
||||
@@ -58,9 +58,11 @@ abstract class TalkApi<T extends ApiResponse?> extends ApiRequest {
|
||||
assembled?.headers = data.headers;
|
||||
return assembled;
|
||||
} catch (e) {
|
||||
var message = 'Error assembling Talk API ${T.toString()} message: ${e.toString()} response with request body: $body and request headers: ${headers.toString()}';
|
||||
log(message);
|
||||
throw Exception(message);
|
||||
// TODO report error
|
||||
log('Error assembling Talk API ${T.toString()} message: ${e.toString()} response on ${endpoint.path} with request body: $body and request headers: ${headers.toString()}');
|
||||
}
|
||||
|
||||
throw Exception('Error assembling Talk API response');
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -15,8 +15,16 @@ ListFilesResponse _$ListFilesResponseFromJson(Map<String, dynamic> json) =>
|
||||
(k, e) => MapEntry(k, e as String),
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$ListFilesResponseToJson(ListFilesResponse instance) =>
|
||||
<String, dynamic>{
|
||||
if (instance.headers case final value?) 'headers': value,
|
||||
'files': instance.files.map((e) => e.toJson()).toList(),
|
||||
};
|
||||
Map<String, dynamic> _$ListFilesResponseToJson(ListFilesResponse instance) {
|
||||
final val = <String, dynamic>{};
|
||||
|
||||
void writeNotNull(String key, dynamic value) {
|
||||
if (value != null) {
|
||||
val[key] = value;
|
||||
}
|
||||
}
|
||||
|
||||
writeNotNull('headers', instance.headers);
|
||||
val['files'] = instance.files.map((e) => e.toJson()).toList();
|
||||
return val;
|
||||
}
|
||||
|
||||
@@ -17,13 +17,20 @@ GetBreakersResponse _$GetBreakersResponseFromJson(Map<String, dynamic> json) =>
|
||||
(k, e) => MapEntry(k, e as String),
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$GetBreakersResponseToJson(
|
||||
GetBreakersResponse instance) =>
|
||||
<String, dynamic>{
|
||||
if (instance.headers case final value?) 'headers': value,
|
||||
'global': instance.global.toJson(),
|
||||
'regional': instance.regional.map((k, e) => MapEntry(k, e.toJson())),
|
||||
};
|
||||
Map<String, dynamic> _$GetBreakersResponseToJson(GetBreakersResponse instance) {
|
||||
final val = <String, dynamic>{};
|
||||
|
||||
void writeNotNull(String key, dynamic value) {
|
||||
if (value != null) {
|
||||
val[key] = value;
|
||||
}
|
||||
}
|
||||
|
||||
writeNotNull('headers', instance.headers);
|
||||
val['global'] = instance.global.toJson();
|
||||
val['regional'] = instance.regional.map((k, e) => MapEntry(k, e.toJson()));
|
||||
return val;
|
||||
}
|
||||
|
||||
GetBreakersReponseObject _$GetBreakersReponseObjectFromJson(
|
||||
Map<String, dynamic> json) =>
|
||||
|
||||
@@ -17,8 +17,16 @@ GetCustomTimetableEventResponse _$GetCustomTimetableEventResponseFromJson(
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$GetCustomTimetableEventResponseToJson(
|
||||
GetCustomTimetableEventResponse instance) =>
|
||||
<String, dynamic>{
|
||||
if (instance.headers case final value?) 'headers': value,
|
||||
'events': instance.events,
|
||||
};
|
||||
GetCustomTimetableEventResponse instance) {
|
||||
final val = <String, dynamic>{};
|
||||
|
||||
void writeNotNull(String key, dynamic value) {
|
||||
if (value != null) {
|
||||
val[key] = value;
|
||||
}
|
||||
}
|
||||
|
||||
writeNotNull('headers', instance.headers);
|
||||
val['events'] = instance.events;
|
||||
return val;
|
||||
}
|
||||
|
||||
@@ -4,7 +4,7 @@ import 'dart:developer';
|
||||
|
||||
import 'package:device_info_plus/device_info_plus.dart';
|
||||
import 'package:http/http.dart' as http;
|
||||
import 'package:package_info_plus/package_info_plus.dart';
|
||||
import 'package:package_info/package_info.dart';
|
||||
|
||||
import '../../../../../model/accountData.dart';
|
||||
import '../../../mhslApi.dart';
|
||||
|
||||
@@ -3,6 +3,7 @@ import 'dart:convert';
|
||||
import 'package:localstore/localstore.dart';
|
||||
|
||||
import 'apiResponse.dart';
|
||||
import 'webuntis/webuntisError.dart';
|
||||
|
||||
abstract class RequestCache<T extends ApiResponse?> {
|
||||
static const int cacheNothing = 0;
|
||||
@@ -39,7 +40,7 @@ abstract class RequestCache<T extends ApiResponse?> {
|
||||
'json': jsonEncode(newValue),
|
||||
'lastupdate': DateTime.now().millisecondsSinceEpoch
|
||||
});
|
||||
} on Exception catch(e) {
|
||||
} on WebuntisError catch(e) {
|
||||
onError(e);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -18,11 +18,19 @@ AuthenticateResponse _$AuthenticateResponseFromJson(
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$AuthenticateResponseToJson(
|
||||
AuthenticateResponse instance) =>
|
||||
<String, dynamic>{
|
||||
if (instance.headers case final value?) 'headers': value,
|
||||
'sessionId': instance.sessionId,
|
||||
'personType': instance.personType,
|
||||
'personId': instance.personId,
|
||||
'klasseId': instance.klasseId,
|
||||
};
|
||||
AuthenticateResponse instance) {
|
||||
final val = <String, dynamic>{};
|
||||
|
||||
void writeNotNull(String key, dynamic value) {
|
||||
if (value != null) {
|
||||
val[key] = value;
|
||||
}
|
||||
}
|
||||
|
||||
writeNotNull('headers', instance.headers);
|
||||
val['sessionId'] = instance.sessionId;
|
||||
val['personType'] = instance.personType;
|
||||
val['personId'] = instance.personId;
|
||||
val['klasseId'] = instance.klasseId;
|
||||
return val;
|
||||
}
|
||||
|
||||
@@ -16,12 +16,19 @@ GetHolidaysResponse _$GetHolidaysResponseFromJson(Map<String, dynamic> json) =>
|
||||
(k, e) => MapEntry(k, e as String),
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$GetHolidaysResponseToJson(
|
||||
GetHolidaysResponse instance) =>
|
||||
<String, dynamic>{
|
||||
if (instance.headers case final value?) 'headers': value,
|
||||
'result': instance.result.map((e) => e.toJson()).toList(),
|
||||
};
|
||||
Map<String, dynamic> _$GetHolidaysResponseToJson(GetHolidaysResponse instance) {
|
||||
final val = <String, dynamic>{};
|
||||
|
||||
void writeNotNull(String key, dynamic value) {
|
||||
if (value != null) {
|
||||
val[key] = value;
|
||||
}
|
||||
}
|
||||
|
||||
writeNotNull('headers', instance.headers);
|
||||
val['result'] = instance.result.map((e) => e.toJson()).toList();
|
||||
return val;
|
||||
}
|
||||
|
||||
GetHolidaysResponseObject _$GetHolidaysResponseObjectFromJson(
|
||||
Map<String, dynamic> json) =>
|
||||
|
||||
@@ -16,11 +16,19 @@ GetRoomsResponse _$GetRoomsResponseFromJson(Map<String, dynamic> json) =>
|
||||
(k, e) => MapEntry(k, e as String),
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$GetRoomsResponseToJson(GetRoomsResponse instance) =>
|
||||
<String, dynamic>{
|
||||
if (instance.headers case final value?) 'headers': value,
|
||||
'result': instance.result.map((e) => e.toJson()).toList(),
|
||||
};
|
||||
Map<String, dynamic> _$GetRoomsResponseToJson(GetRoomsResponse instance) {
|
||||
final val = <String, dynamic>{};
|
||||
|
||||
void writeNotNull(String key, dynamic value) {
|
||||
if (value != null) {
|
||||
val[key] = value;
|
||||
}
|
||||
}
|
||||
|
||||
writeNotNull('headers', instance.headers);
|
||||
val['result'] = instance.result.map((e) => e.toJson()).toList();
|
||||
return val;
|
||||
}
|
||||
|
||||
GetRoomsResponseObject _$GetRoomsResponseObjectFromJson(
|
||||
Map<String, dynamic> json) =>
|
||||
|
||||
@@ -16,12 +16,19 @@ GetSubjectsResponse _$GetSubjectsResponseFromJson(Map<String, dynamic> json) =>
|
||||
(k, e) => MapEntry(k, e as String),
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$GetSubjectsResponseToJson(
|
||||
GetSubjectsResponse instance) =>
|
||||
<String, dynamic>{
|
||||
if (instance.headers case final value?) 'headers': value,
|
||||
'result': instance.result.map((e) => e.toJson()).toList(),
|
||||
};
|
||||
Map<String, dynamic> _$GetSubjectsResponseToJson(GetSubjectsResponse instance) {
|
||||
final val = <String, dynamic>{};
|
||||
|
||||
void writeNotNull(String key, dynamic value) {
|
||||
if (value != null) {
|
||||
val[key] = value;
|
||||
}
|
||||
}
|
||||
|
||||
writeNotNull('headers', instance.headers);
|
||||
val['result'] = instance.result.map((e) => e.toJson()).toList();
|
||||
return val;
|
||||
}
|
||||
|
||||
GetSubjectsResponseObject _$GetSubjectsResponseObjectFromJson(
|
||||
Map<String, dynamic> json) =>
|
||||
|
||||
@@ -46,41 +46,48 @@ GetTimetableParamsOptions _$GetTimetableParamsOptionsFromJson(
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$GetTimetableParamsOptionsToJson(
|
||||
GetTimetableParamsOptions instance) =>
|
||||
<String, dynamic>{
|
||||
'element': instance.element.toJson(),
|
||||
if (instance.startDate case final value?) 'startDate': value,
|
||||
if (instance.endDate case final value?) 'endDate': value,
|
||||
if (instance.onlyBaseTimetable case final value?)
|
||||
'onlyBaseTimetable': 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,
|
||||
if (instance.showLsNumber case final value?) 'showLsNumber': value,
|
||||
if (instance.showStudentgroup case final value?)
|
||||
'showStudentgroup': value,
|
||||
if (instance.klasseFields
|
||||
?.map((e) => _$GetTimetableParamsOptionsFieldsEnumMap[e]!)
|
||||
.toList()
|
||||
case final value?)
|
||||
'klasseFields': value,
|
||||
if (instance.roomFields
|
||||
?.map((e) => _$GetTimetableParamsOptionsFieldsEnumMap[e]!)
|
||||
.toList()
|
||||
case final value?)
|
||||
'roomFields': value,
|
||||
if (instance.subjectFields
|
||||
?.map((e) => _$GetTimetableParamsOptionsFieldsEnumMap[e]!)
|
||||
.toList()
|
||||
case final value?)
|
||||
'subjectFields': value,
|
||||
if (instance.teacherFields
|
||||
?.map((e) => _$GetTimetableParamsOptionsFieldsEnumMap[e]!)
|
||||
.toList()
|
||||
case final value?)
|
||||
'teacherFields': value,
|
||||
};
|
||||
GetTimetableParamsOptions instance) {
|
||||
final val = <String, dynamic>{
|
||||
'element': instance.element.toJson(),
|
||||
};
|
||||
|
||||
void writeNotNull(String key, dynamic value) {
|
||||
if (value != null) {
|
||||
val[key] = value;
|
||||
}
|
||||
}
|
||||
|
||||
writeNotNull('startDate', instance.startDate);
|
||||
writeNotNull('endDate', instance.endDate);
|
||||
writeNotNull('onlyBaseTimetable', instance.onlyBaseTimetable);
|
||||
writeNotNull('showBooking', instance.showBooking);
|
||||
writeNotNull('showInfo', instance.showInfo);
|
||||
writeNotNull('showSubstText', instance.showSubstText);
|
||||
writeNotNull('showLsText', instance.showLsText);
|
||||
writeNotNull('showLsNumber', instance.showLsNumber);
|
||||
writeNotNull('showStudentgroup', instance.showStudentgroup);
|
||||
writeNotNull(
|
||||
'klasseFields',
|
||||
instance.klasseFields
|
||||
?.map((e) => _$GetTimetableParamsOptionsFieldsEnumMap[e]!)
|
||||
.toList());
|
||||
writeNotNull(
|
||||
'roomFields',
|
||||
instance.roomFields
|
||||
?.map((e) => _$GetTimetableParamsOptionsFieldsEnumMap[e]!)
|
||||
.toList());
|
||||
writeNotNull(
|
||||
'subjectFields',
|
||||
instance.subjectFields
|
||||
?.map((e) => _$GetTimetableParamsOptionsFieldsEnumMap[e]!)
|
||||
.toList());
|
||||
writeNotNull(
|
||||
'teacherFields',
|
||||
instance.teacherFields
|
||||
?.map((e) => _$GetTimetableParamsOptionsFieldsEnumMap[e]!)
|
||||
.toList());
|
||||
return val;
|
||||
}
|
||||
|
||||
const _$GetTimetableParamsOptionsFieldsEnumMap = {
|
||||
GetTimetableParamsOptionsFields.id: 'id',
|
||||
@@ -99,14 +106,22 @@ GetTimetableParamsOptionsElement _$GetTimetableParamsOptionsElementFromJson(
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$GetTimetableParamsOptionsElementToJson(
|
||||
GetTimetableParamsOptionsElement instance) =>
|
||||
<String, dynamic>{
|
||||
'id': instance.id,
|
||||
'type': instance.type,
|
||||
if (_$GetTimetableParamsOptionsElementKeyTypeEnumMap[instance.keyType]
|
||||
case final value?)
|
||||
'keyType': value,
|
||||
};
|
||||
GetTimetableParamsOptionsElement instance) {
|
||||
final val = <String, dynamic>{
|
||||
'id': instance.id,
|
||||
'type': instance.type,
|
||||
};
|
||||
|
||||
void writeNotNull(String key, dynamic value) {
|
||||
if (value != null) {
|
||||
val[key] = value;
|
||||
}
|
||||
}
|
||||
|
||||
writeNotNull('keyType',
|
||||
_$GetTimetableParamsOptionsElementKeyTypeEnumMap[instance.keyType]);
|
||||
return val;
|
||||
}
|
||||
|
||||
const _$GetTimetableParamsOptionsElementKeyTypeEnumMap = {
|
||||
GetTimetableParamsOptionsElementKeyType.id: 'id',
|
||||
|
||||
@@ -18,11 +18,19 @@ GetTimetableResponse _$GetTimetableResponseFromJson(
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$GetTimetableResponseToJson(
|
||||
GetTimetableResponse instance) =>
|
||||
<String, dynamic>{
|
||||
if (instance.headers case final value?) 'headers': value,
|
||||
'result': instance.result.map((e) => e.toJson()).toList(),
|
||||
};
|
||||
GetTimetableResponse instance) {
|
||||
final val = <String, dynamic>{};
|
||||
|
||||
void writeNotNull(String key, dynamic value) {
|
||||
if (value != null) {
|
||||
val[key] = value;
|
||||
}
|
||||
}
|
||||
|
||||
writeNotNull('headers', instance.headers);
|
||||
val['result'] = instance.result.map((e) => e.toJson()).toList();
|
||||
return val;
|
||||
}
|
||||
|
||||
GetTimetableResponseObject _$GetTimetableResponseObjectFromJson(
|
||||
Map<String, dynamic> json) =>
|
||||
|
||||
@@ -19,7 +19,7 @@ abstract class WebuntisApi extends ApiRequest {
|
||||
WebuntisApi(this.method, this.genericParam, {this.authenticatedResponse = true});
|
||||
|
||||
|
||||
Future<String> query(WebuntisApi untis, {bool retry = false}) async {
|
||||
Future<String> query(WebuntisApi untis) async {
|
||||
var query = '{"id":"ID","method":"$method","params":${untis._body()},"jsonrpc":"2.0"}';
|
||||
|
||||
var sessionId = '0';
|
||||
@@ -32,9 +32,8 @@ abstract class WebuntisApi extends ApiRequest {
|
||||
dynamic jsonData = jsonDecode(data.body);
|
||||
if(jsonData['error'] != null) {
|
||||
if(jsonData['error']['code'] == -8520) {
|
||||
if(retry) throw WebuntisError('Authentication was tried (probably session timeout), but was not successful!', 1);
|
||||
await Authenticate.createSession();
|
||||
return await this.query(untis, retry: true);
|
||||
this.query(untis);
|
||||
} else {
|
||||
throw WebuntisError(jsonData['error']['message'], jsonData['error']['code']);
|
||||
}
|
||||
|
||||
76
lib/app.dart
76
lib/app.dart
@@ -8,6 +8,7 @@ import 'package:flutter/material.dart';
|
||||
import 'state/app/modules/app_modules.dart';
|
||||
import 'package:persistent_bottom_nav_bar_v2/persistent_bottom_nav_bar_v2.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
import 'package:badges/badges.dart' as badges;
|
||||
|
||||
import 'api/mhsl/breaker/getBreakers/getBreakersResponse.dart';
|
||||
import 'api/mhsl/server/userIndex/update/updateUserindex.dart';
|
||||
@@ -24,7 +25,6 @@ import 'storage/base/settingsProvider.dart';
|
||||
import 'view/pages/overhang.dart';
|
||||
|
||||
class App extends StatefulWidget {
|
||||
static GlobalKey appContext = GlobalKey();
|
||||
const App({super.key});
|
||||
|
||||
@override
|
||||
@@ -32,6 +32,7 @@ class App extends StatefulWidget {
|
||||
}
|
||||
|
||||
class _AppState extends State<App> with WidgetsBindingObserver {
|
||||
|
||||
late Timer refetchChats;
|
||||
late Timer updateTimings;
|
||||
|
||||
@@ -92,34 +93,57 @@ class _AppState extends State<App> with WidgetsBindingObserver {
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) => Consumer<SettingsProvider>(builder: (context, settings, child) => PersistentTabView(
|
||||
controller: Main.bottomNavigator,
|
||||
navBarOverlap: const NavBarOverlap.none(),
|
||||
backgroundColor: Theme.of(context).colorScheme.primary,
|
||||
handleAndroidBackButtonPress: false,
|
||||
Widget build(BuildContext context) => PersistentTabView(
|
||||
controller: Main.bottomNavigator,
|
||||
navBarOverlap: const NavBarOverlap.none(),
|
||||
backgroundColor: Theme.of(context).colorScheme.primary,
|
||||
handleAndroidBackButtonPress: true,
|
||||
|
||||
screenTransitionAnimation: const ScreenTransitionAnimation(curve: Curves.easeOutQuad, duration: Duration(milliseconds: 200)),
|
||||
tabs: [
|
||||
...AppModule.getBottomBarModules(context).map((e) => e.toBottomTab(context)),
|
||||
|
||||
PersistentTabConfig(
|
||||
screen: const Breaker(breaker: BreakerArea.more, child: Overhang()),
|
||||
item: ItemConfig(
|
||||
activeForegroundColor: Theme.of(context).primaryColor,
|
||||
inactiveForegroundColor: Theme.of(context).colorScheme.secondary,
|
||||
icon: const Icon(Icons.apps),
|
||||
title: 'Mehr'
|
||||
),
|
||||
),
|
||||
],
|
||||
navBarBuilder: (config) => Style6BottomNavBar(
|
||||
navBarConfig: config,
|
||||
navBarDecoration: NavBarDecoration(
|
||||
border: const Border(top: BorderSide(width: 1, color: Colors.grey)),
|
||||
color: Theme.of(context).colorScheme.surface,
|
||||
screenTransitionAnimation: const ScreenTransitionAnimation(curve: Curves.easeOutQuad, duration: Duration(milliseconds: 200)),
|
||||
tabs: [
|
||||
AppModule.getModule(Modules.timetable).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.blocFiles).toBottomTab(context),
|
||||
AppModule.getModule(Modules.files).toBottomTab(context),
|
||||
|
||||
PersistentTabConfig(
|
||||
screen: const Breaker(breaker: BreakerArea.more, child: Overhang()),
|
||||
item: ItemConfig(
|
||||
activeForegroundColor: Theme.of(context).primaryColor,
|
||||
inactiveForegroundColor: Theme.of(context).colorScheme.secondary,
|
||||
icon: const Icon(Icons.apps),
|
||||
title: 'Mehr'
|
||||
),
|
||||
),
|
||||
],
|
||||
navBarBuilder: (config) => Style6BottomNavBar(
|
||||
navBarConfig: config,
|
||||
navBarDecoration: NavBarDecoration(
|
||||
border: const Border(top: BorderSide(width: 1, color: Colors.grey)),
|
||||
color: Theme.of(context).colorScheme.surface,
|
||||
),
|
||||
),
|
||||
);
|
||||
|
||||
@override
|
||||
void dispose() {
|
||||
|
||||
@@ -1,64 +0,0 @@
|
||||
import 'dart:developer';
|
||||
|
||||
import 'package:background_fetch/background_fetch.dart';
|
||||
import 'package:shared_preferences/shared_preferences.dart';
|
||||
|
||||
import '../app.dart';
|
||||
import '../homescreen_widgets/timetable/timetableHomeWidget.dart';
|
||||
|
||||
class ScheduledTask {
|
||||
static final String fetchApiLastRunTimestampKey = 'fetchApiLastRunTimestamp';
|
||||
|
||||
static Future<void> configure() async {
|
||||
var status = await BackgroundFetch.configure(BackgroundFetchConfig(
|
||||
minimumFetchInterval: 15,
|
||||
stopOnTerminate: false,
|
||||
enableHeadless: true,
|
||||
requiresBatteryNotLow: false,
|
||||
requiresCharging: false,
|
||||
requiresStorageNotLow: false,
|
||||
requiresDeviceIdle: false,
|
||||
requiredNetworkType: NetworkType.ANY,
|
||||
startOnBoot: true,
|
||||
), (String taskId) async {
|
||||
log('Background fetch started with id $taskId');
|
||||
await ScheduledTask.backgroundFetch();
|
||||
BackgroundFetch.finish(taskId);
|
||||
}, (String taskId) async {
|
||||
log('Background fetch stopped because of an timeout with id $taskId');
|
||||
BackgroundFetch.finish(taskId);
|
||||
});
|
||||
|
||||
log('Background Fetch-API status: $status');
|
||||
}
|
||||
|
||||
// called periodically, iOS and Android
|
||||
static Future<void> backgroundFetch() async {
|
||||
var sp = await SharedPreferences.getInstance();
|
||||
var history = sp.getStringList(fetchApiLastRunTimestampKey) ?? List.empty(growable: true);
|
||||
history.add(DateTime.now().toIso8601String());
|
||||
try {
|
||||
TimetableHomeWidget.update(App.appContext.currentContext!);
|
||||
} on Exception catch(e) {
|
||||
history.add('Got Error:');
|
||||
history.add(e.toString());
|
||||
history.add('--- EXCEPTION END ---');
|
||||
}
|
||||
sp.setStringList(fetchApiLastRunTimestampKey, history.take(100).toList());
|
||||
}
|
||||
|
||||
// only Android, starts when app is terminated
|
||||
@pragma('vm:entry-point')
|
||||
static Future<void> headless(HeadlessTask task) async {
|
||||
var taskId = task.taskId;
|
||||
var isTimeout = task.timeout;
|
||||
if (isTimeout) {
|
||||
log('Background fetch headless task timed-out: $taskId');
|
||||
BackgroundFetch.finish(taskId);
|
||||
return;
|
||||
}
|
||||
log('Background fetch headless event received.');
|
||||
await backgroundFetch();
|
||||
BackgroundFetch.finish(taskId);
|
||||
}
|
||||
}
|
||||
@@ -1,87 +0,0 @@
|
||||
import 'dart:async';
|
||||
import 'dart:convert';
|
||||
import 'dart:developer';
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_localizations/flutter_localizations.dart';
|
||||
import 'package:home_widget/home_widget.dart';
|
||||
import 'package:screenshot/screenshot.dart';
|
||||
import 'package:syncfusion_flutter_calendar/calendar.dart';
|
||||
|
||||
import '../../model/accountData.dart';
|
||||
import '../../model/timetable/timetableProps.dart';
|
||||
import '../../storage/base/settingsProvider.dart';
|
||||
import '../../theming/darkAppTheme.dart';
|
||||
import '../../theming/lightAppTheme.dart';
|
||||
import '../../view/pages/timetable/calendar.dart';
|
||||
|
||||
class TimetableHomeWidget {
|
||||
static Future<void> update(BuildContext context) async {
|
||||
await AccountData().waitForPopulation();
|
||||
var data = TimetableProps();
|
||||
var settings = SettingsProvider();
|
||||
settings.waitForPopulation();
|
||||
var completer = Completer();
|
||||
|
||||
data.addListener(() async {
|
||||
if(completer.isCompleted) return;
|
||||
if(data.primaryLoading()) return;
|
||||
await _generate(data, settings);
|
||||
if(completer.isCompleted) return;
|
||||
completer.complete();
|
||||
});
|
||||
|
||||
data.run();
|
||||
await completer.future;
|
||||
}
|
||||
|
||||
static Future<void> _generate(TimetableProps data, SettingsProvider settings) async {
|
||||
log('Generating widget screen...');
|
||||
var screenshotController = ScreenshotController();
|
||||
var calendarController = CalendarController();
|
||||
calendarController.displayDate = DateTime.now().copyWith(hour: 07, minute: 00);
|
||||
|
||||
var imageData = await screenshotController.captureFromWidget(
|
||||
SizedBox(
|
||||
height: 700,
|
||||
width: 300,
|
||||
child: Directionality(
|
||||
textDirection: TextDirection.ltr,
|
||||
child: MediaQuery(
|
||||
data: MediaQueryData(),
|
||||
child: MaterialApp(
|
||||
localizationsDelegates: const [
|
||||
...GlobalMaterialLocalizations.delegates,
|
||||
GlobalWidgetsLocalizations.delegate,
|
||||
],
|
||||
supportedLocales: const [
|
||||
Locale('de'),
|
||||
Locale('en'),
|
||||
],
|
||||
locale: const Locale('de'),
|
||||
darkTheme: DarkAppTheme.theme,
|
||||
theme: LightAppTheme.theme,
|
||||
themeMode: settings.val().appTheme,
|
||||
home: ClipRRect(
|
||||
borderRadius: BorderRadius.circular(20),
|
||||
child: Scaffold(
|
||||
body: Calendar(
|
||||
controller: calendarController,
|
||||
timetableProps: data,
|
||||
settings: settings,
|
||||
isHomeWidget: true,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
delay: Duration(seconds: 5),
|
||||
);
|
||||
|
||||
HomeWidget.saveWidgetData<String>('screen', base64.encode(imageData));
|
||||
HomeWidget.updateWidget(name: 'TimetableWidget');
|
||||
log('Widget screen successfully updated! (${imageData.length})');
|
||||
}
|
||||
}
|
||||
@@ -2,23 +2,21 @@ import 'dart:async';
|
||||
import 'dart:developer';
|
||||
import 'dart:io';
|
||||
|
||||
import 'package:background_fetch/background_fetch.dart';
|
||||
import 'package:firebase_core/firebase_core.dart';
|
||||
import 'package:firebase_messaging/firebase_messaging.dart';
|
||||
import 'package:flutter/foundation.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
import 'package:flutter_localizations/flutter_localizations.dart';
|
||||
import 'package:hydrated_bloc/hydrated_bloc.dart';
|
||||
import 'package:jiffy/jiffy.dart';
|
||||
import 'package:loader_overlay/loader_overlay.dart';
|
||||
import 'package:path_provider/path_provider.dart';
|
||||
import 'package:persistent_bottom_nav_bar_v2/persistent_bottom_nav_bar_v2.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
import 'package:flutter_localizations/flutter_localizations.dart';
|
||||
|
||||
import 'api/mhsl/breaker/getBreakers/getBreakersResponse.dart';
|
||||
import 'app.dart';
|
||||
import 'background_tasks/scheduledTask.dart';
|
||||
import 'firebase_options.dart';
|
||||
import 'model/accountData.dart';
|
||||
import 'model/accountModel.dart';
|
||||
@@ -44,16 +42,13 @@ Future<void> main() async {
|
||||
var initialisationTasks = [
|
||||
Firebase.initializeApp(options: DefaultFirebaseOptions.currentPlatform)
|
||||
.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', stackTrace: stackTrace)),
|
||||
|
||||
PlatformAssetBundle().load('assets/ca/lets-encrypt-r3.pem').then(addCertificateAsTrusted),
|
||||
PlatformAssetBundle().load('assets/ca/lets-encrypt-r10.pem').then(addCertificateAsTrusted),
|
||||
PlatformAssetBundle().load('assets/ca/lets-encrypt-r13.pem').then(addCertificateAsTrusted),
|
||||
|
||||
Future(() async {
|
||||
await HydratedStorage.build(
|
||||
storageDirectory: HydratedStorageDirectory((await getTemporaryDirectory()).path)
|
||||
).then((storage) => HydratedBloc.storage = storage);
|
||||
await HydratedStorage.build(storageDirectory: await getTemporaryDirectory()).then((storage) => HydratedBloc.storage = storage);
|
||||
})
|
||||
];
|
||||
|
||||
@@ -87,8 +82,6 @@ Future<void> main() async {
|
||||
child: const Main(),
|
||||
)
|
||||
);
|
||||
|
||||
BackgroundFetch.registerHeadlessTask(ScheduledTask.headless);
|
||||
}
|
||||
|
||||
class Main extends StatefulWidget {
|
||||
@@ -116,7 +109,6 @@ class _MainState extends State<Main> {
|
||||
Provider.of<BreakerProps>(context, listen: false).run();
|
||||
});
|
||||
|
||||
ScheduledTask.configure();
|
||||
super.initState();
|
||||
}
|
||||
|
||||
@@ -131,6 +123,7 @@ class _MainState extends State<Main> {
|
||||
checkerboardOffscreenLayers: devToolsSettings.checkerboardOffscreenLayers,
|
||||
checkerboardRasterCacheImages: devToolsSettings.checkerboardRasterCacheImages,
|
||||
|
||||
debugShowCheckedModeBanner: false,
|
||||
localizationsDelegates: const [
|
||||
...GlobalMaterialLocalizations.delegates,
|
||||
GlobalWidgetsLocalizations.delegate,
|
||||
@@ -152,7 +145,7 @@ class _MainState extends State<Main> {
|
||||
child: Consumer<AccountModel>(
|
||||
builder: (context, accountModel, child) {
|
||||
switch(accountModel.state) {
|
||||
case AccountModelState.loggedIn: return App(key: App.appContext);
|
||||
case AccountModelState.loggedIn: return const App();
|
||||
case AccountModelState.loggedOut: return const Login();
|
||||
case AccountModelState.undefined: return const PlaceholderView(icon: Icons.timer, text: 'Daten werden geladen');
|
||||
}
|
||||
|
||||
@@ -23,11 +23,7 @@ class _BreakerState extends State<Breaker> {
|
||||
builder: (context, value, child) {
|
||||
var blocked = value.isBlocked(widget.breaker);
|
||||
if(blocked != null) {
|
||||
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 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 widget.child;
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
import 'package:flutter/foundation.dart';
|
||||
import 'package:package_info_plus/package_info_plus.dart';
|
||||
import 'package:package_info/package_info.dart';
|
||||
|
||||
import '../../api/apiResponse.dart';
|
||||
import '../../api/mhsl/breaker/getBreakers/getBreakersCache.dart';
|
||||
@@ -13,8 +12,6 @@ class BreakerProps extends DataHolder {
|
||||
PackageInfo? packageInfo;
|
||||
|
||||
String? isBlocked(BreakerArea? type) {
|
||||
if(kDebugMode) return null;
|
||||
|
||||
if(packageInfo == null) {
|
||||
PackageInfo.fromPlatform().then((value) => packageInfo = value);
|
||||
return null;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
|
||||
import 'package:flutter_app_badge/flutter_app_badge.dart';
|
||||
import 'package:flutter_app_badger/flutter_app_badger.dart';
|
||||
|
||||
import '../../api/apiResponse.dart';
|
||||
import '../../api/marianumcloud/talk/room/getRoomCache.dart';
|
||||
@@ -20,7 +20,7 @@ class ChatListProps extends DataHolder {
|
||||
onUpdate: (GetRoomResponse data) => {
|
||||
_getRoomResponse = data,
|
||||
notifyListeners(),
|
||||
FlutterAppBadge.count(data.data.map((e) => e.unreadMessages).reduce((a, b) => a+b))
|
||||
FlutterAppBadger.updateBadgeCount(data.data.map((e) => e.unreadMessages).reduce((a, b) => a+b))
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
@@ -41,7 +41,7 @@ class EndpointData {
|
||||
|
||||
Endpoint webuntis() => EndpointOptions(
|
||||
live: Endpoint(
|
||||
domain: 'marianum-fulda.webuntis.com',
|
||||
domain: 'peleus.webuntis.com',
|
||||
),
|
||||
staged: Endpoint(
|
||||
domain: 'mhsl.eu',
|
||||
|
||||
@@ -44,7 +44,7 @@ class NotificationController {
|
||||
}
|
||||
|
||||
static Future<void> onAppOpenedByNotification(RemoteMessage message, BuildContext context) async {
|
||||
NotificationTasks.navigateToTalk(context);
|
||||
NotificationTasks.navigateToTalk();
|
||||
NotificationTasks.updateProviders(context);
|
||||
|
||||
DebugTile(context).run(() {
|
||||
|
||||
@@ -15,6 +15,9 @@ class NotificationService {
|
||||
);
|
||||
|
||||
final iosSettings = DarwinInitializationSettings(
|
||||
onDidReceiveLocalNotification: (id, title, body, payload) {
|
||||
// TODO Navigate to Talk section (This runs when an Notification is tapped)
|
||||
},
|
||||
);
|
||||
|
||||
|
||||
|
||||
@@ -1,16 +1,15 @@
|
||||
import 'package:firebase_messaging/firebase_messaging.dart';
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter_app_badge/flutter_app_badge.dart';
|
||||
import 'package:flutter_app_badger/flutter_app_badger.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
|
||||
import '../main.dart';
|
||||
import '../model/chatList/chatListProps.dart';
|
||||
import '../model/chatList/chatProps.dart';
|
||||
import '../state/app/modules/app_modules.dart';
|
||||
|
||||
class NotificationTasks {
|
||||
static void updateBadgeCount(RemoteMessage notification) {
|
||||
FlutterAppBadge.count(int.parse(notification.data['unreadCount'] ?? 0));
|
||||
FlutterAppBadger.updateBadgeCount(int.parse(notification.data['unreadCount'] ?? 0));
|
||||
}
|
||||
|
||||
static void updateProviders(BuildContext context) {
|
||||
@@ -18,9 +17,7 @@ class NotificationTasks {
|
||||
Provider.of<ChatProps>(context, listen: false).run();
|
||||
}
|
||||
|
||||
static void navigateToTalk(BuildContext context) {
|
||||
var talkTab = AppModule.getBottomBarModules(context).map((e) => e.module).toList().indexOf(Modules.talk);
|
||||
if(talkTab == -1) return;
|
||||
Main.bottomNavigator.jumpToTab(talkTab);
|
||||
static void navigateToTalk() {
|
||||
Main.bottomNavigator.jumpToTab(1);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import 'package:dio/dio.dart';
|
||||
|
||||
import '../../infrastructure/dataLoader/data_loader.dart';
|
||||
import '../../infrastructure/dataLoader/http_data_loader.dart';
|
||||
|
||||
abstract class HolidayDataLoader<TResult> extends DataLoader<TResult> {
|
||||
abstract class HolidayDataLoader<TResult> extends HttpDataLoader<TResult> {
|
||||
HolidayDataLoader() : super(Dio(BaseOptions(
|
||||
baseUrl: 'https://ferien-api.de/api/v1/',
|
||||
)));
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import 'package:dio/dio.dart';
|
||||
|
||||
import '../../infrastructure/dataLoader/data_loader.dart';
|
||||
import '../../infrastructure/dataLoader/http_data_loader.dart';
|
||||
|
||||
abstract class MhslDataLoader<TResult> extends DataLoader<TResult> {
|
||||
abstract class MhslDataLoader<TResult> extends HttpDataLoader<TResult> {
|
||||
MhslDataLoader() : super(Dio(BaseOptions(
|
||||
baseUrl: 'https://mhsl.eu/marianum/marianummobile/'
|
||||
)));
|
||||
|
||||
@@ -2,26 +2,21 @@ import 'dart:convert';
|
||||
import 'dart:developer';
|
||||
|
||||
import 'package:dio/dio.dart';
|
||||
import 'package:flutter/foundation.dart';
|
||||
|
||||
abstract class DataLoader<TResult> {
|
||||
abstract class HttpDataLoader<TResult> {
|
||||
final Dio dio;
|
||||
DataLoader(this.dio) {
|
||||
HttpDataLoader(this.dio) {
|
||||
dio.options.connectTimeout = const Duration(seconds: 10).inMilliseconds;
|
||||
dio.options.sendTimeout = const Duration(seconds: 30).inMilliseconds;
|
||||
dio.options.receiveTimeout = const Duration(seconds: 30).inMilliseconds;
|
||||
}
|
||||
|
||||
Future<TResult> run() async {
|
||||
var fetcher = fetch();
|
||||
await Future.wait([
|
||||
fetcher,
|
||||
Future.delayed(const Duration(milliseconds: 500)) // TODO tune or remove
|
||||
]);
|
||||
|
||||
var response = await fetcher;
|
||||
var response = await fetch();
|
||||
try {
|
||||
return assemble(DataLoaderResult(
|
||||
json: jsonDecode(response.data!),
|
||||
json: await compute(jsonDecode, response.data!),
|
||||
headers: response.headers.map.map((key, value) => MapEntry(key, value.join(';'))),
|
||||
));
|
||||
} catch(trace, e) {
|
||||
@@ -19,9 +19,7 @@ mixin _$LoadableStateState {
|
||||
List<ConnectivityResult>? get connections =>
|
||||
throw _privateConstructorUsedError;
|
||||
|
||||
/// Create a copy of LoadableStateState
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@JsonKey(ignore: true)
|
||||
$LoadableStateStateCopyWith<LoadableStateState> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
}
|
||||
@@ -45,8 +43,6 @@ class _$LoadableStateStateCopyWithImpl<$Res, $Val extends LoadableStateState>
|
||||
// ignore: unused_field
|
||||
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')
|
||||
@override
|
||||
$Res call({
|
||||
@@ -80,8 +76,6 @@ class __$$LoadableStateStateImplCopyWithImpl<$Res>
|
||||
$Res Function(_$LoadableStateStateImpl) _then)
|
||||
: super(_value, _then);
|
||||
|
||||
/// Create a copy of LoadableStateState
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@pragma('vm:prefer-inline')
|
||||
@override
|
||||
$Res call({
|
||||
@@ -131,9 +125,7 @@ class _$LoadableStateStateImpl implements _LoadableStateState {
|
||||
int get hashCode => Object.hash(
|
||||
runtimeType, const DeepCollectionEquality().hash(_connections));
|
||||
|
||||
/// Create a copy of LoadableStateState
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@JsonKey(ignore: true)
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
_$$LoadableStateStateImplCopyWith<_$LoadableStateStateImpl> get copyWith =>
|
||||
@@ -148,11 +140,8 @@ abstract class _LoadableStateState implements LoadableStateState {
|
||||
|
||||
@override
|
||||
List<ConnectivityResult>? get connections;
|
||||
|
||||
/// Create a copy of LoadableStateState
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@JsonKey(ignore: true)
|
||||
_$$LoadableStateStateImplCopyWith<_$LoadableStateStateImpl> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
@@ -22,9 +22,7 @@ mixin _$LoadableState<TState> {
|
||||
void Function()? get reFetch => throw _privateConstructorUsedError;
|
||||
LoadingError? get error => throw _privateConstructorUsedError;
|
||||
|
||||
/// Create a copy of LoadableState
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@JsonKey(ignore: true)
|
||||
$LoadableStateCopyWith<TState, LoadableState<TState>> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
}
|
||||
@@ -56,8 +54,6 @@ class _$LoadableStateCopyWithImpl<TState, $Res,
|
||||
// ignore: unused_field
|
||||
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')
|
||||
@override
|
||||
$Res call({
|
||||
@@ -91,8 +87,6 @@ class _$LoadableStateCopyWithImpl<TState, $Res,
|
||||
) as $Val);
|
||||
}
|
||||
|
||||
/// Create a copy of LoadableState
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
$LoadingErrorCopyWith<$Res>? get error {
|
||||
@@ -134,8 +128,6 @@ class __$$LoadableStateImplCopyWithImpl<TState, $Res>
|
||||
$Res Function(_$LoadableStateImpl<TState>) _then)
|
||||
: super(_value, _then);
|
||||
|
||||
/// Create a copy of LoadableState
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@pragma('vm:prefer-inline')
|
||||
@override
|
||||
$Res call({
|
||||
@@ -215,9 +207,7 @@ class _$LoadableStateImpl<TState> extends _LoadableState<TState> {
|
||||
int get hashCode => Object.hash(runtimeType, isLoading,
|
||||
const DeepCollectionEquality().hash(data), lastFetch, reFetch, error);
|
||||
|
||||
/// Create a copy of LoadableState
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@JsonKey(ignore: true)
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
_$$LoadableStateImplCopyWith<TState, _$LoadableStateImpl<TState>>
|
||||
@@ -244,11 +234,8 @@ abstract class _LoadableState<TState> extends LoadableState<TState> {
|
||||
void Function()? get reFetch;
|
||||
@override
|
||||
LoadingError? get error;
|
||||
|
||||
/// Create a copy of LoadableState
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@JsonKey(ignore: true)
|
||||
_$$LoadableStateImplCopyWith<TState, _$LoadableStateImpl<TState>>
|
||||
get copyWith => throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
@@ -19,9 +19,7 @@ mixin _$LoadingError {
|
||||
String get message => throw _privateConstructorUsedError;
|
||||
bool get allowRetry => throw _privateConstructorUsedError;
|
||||
|
||||
/// Create a copy of LoadingError
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@JsonKey(ignore: true)
|
||||
$LoadingErrorCopyWith<LoadingError> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
}
|
||||
@@ -45,8 +43,6 @@ class _$LoadingErrorCopyWithImpl<$Res, $Val extends LoadingError>
|
||||
// ignore: unused_field
|
||||
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')
|
||||
@override
|
||||
$Res call({
|
||||
@@ -85,8 +81,6 @@ class __$$LoadingErrorImplCopyWithImpl<$Res>
|
||||
_$LoadingErrorImpl _value, $Res Function(_$LoadingErrorImpl) _then)
|
||||
: super(_value, _then);
|
||||
|
||||
/// Create a copy of LoadingError
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@pragma('vm:prefer-inline')
|
||||
@override
|
||||
$Res call({
|
||||
@@ -135,9 +129,7 @@ class _$LoadingErrorImpl implements _LoadingError {
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType, message, allowRetry);
|
||||
|
||||
/// Create a copy of LoadingError
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@JsonKey(ignore: true)
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
_$$LoadingErrorImplCopyWith<_$LoadingErrorImpl> get copyWith =>
|
||||
@@ -153,11 +145,8 @@ abstract class _LoadingError implements LoadingError {
|
||||
String get message;
|
||||
@override
|
||||
bool get allowRetry;
|
||||
|
||||
/// Create a copy of LoadingError
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@JsonKey(ignore: true)
|
||||
_$$LoadingErrorImplCopyWith<_$LoadingErrorImpl> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
@@ -17,13 +17,16 @@ class LoadableStateConsumer<TController extends Bloc<LoadableHydratedBlocEvent<T
|
||||
final Widget Function(TState state, bool loading) child;
|
||||
final void Function(TState state)? onLoad;
|
||||
final bool wrapWithScrollView;
|
||||
const LoadableStateConsumer({required this.child, this.onLoad, this.wrapWithScrollView = false, super.key});
|
||||
final TController? controllerByValue;
|
||||
const LoadableStateConsumer({required this.child, this.onLoad, this.wrapWithScrollView = false, this.controllerByValue = null, super.key});
|
||||
|
||||
static Duration animationDuration = const Duration(milliseconds: 200);
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
var loadableState = context.watch<TController>().state;
|
||||
var loadableState = controllerByValue != null
|
||||
? controllerByValue!.state
|
||||
: context.watch<TController>().state;
|
||||
|
||||
if(!loadableState.isLoading && onLoad != null) {
|
||||
WidgetsBinding.instance.addPostFrameCallback((timeStamp) => onLoad!(loadableState.data));
|
||||
|
||||
@@ -30,16 +30,17 @@ abstract class LoadableHydratedBloc<
|
||||
isLoading: state.isLoading,
|
||||
data: event.state(innerState ?? fromNothing()),
|
||||
lastFetch: state.lastFetch,
|
||||
reFetch: retry,
|
||||
reFetch: fetch,
|
||||
error: state.error,
|
||||
));
|
||||
if(event.fetch) fetch();
|
||||
});
|
||||
|
||||
on<DataGathered<TState>>((event, emit) => emit(LoadableState(
|
||||
isLoading: false,
|
||||
data: event.state(innerState ?? fromNothing()),
|
||||
lastFetch: DateTime.now().millisecondsSinceEpoch,
|
||||
reFetch: retry,
|
||||
reFetch: fetch,
|
||||
error: null,
|
||||
)));
|
||||
|
||||
@@ -55,7 +56,7 @@ abstract class LoadableHydratedBloc<
|
||||
isLoading: false,
|
||||
data: innerState,
|
||||
lastFetch: state.lastFetch,
|
||||
reFetch: retry,
|
||||
reFetch: fetch,
|
||||
error: event.error
|
||||
)));
|
||||
|
||||
@@ -66,19 +67,14 @@ abstract class LoadableHydratedBloc<
|
||||
TState? get innerState => state.data;
|
||||
TRepository get repo => _repository;
|
||||
|
||||
void retry() {
|
||||
log('Fetch retry triggered for ${TState.toString()}');
|
||||
add(RefetchStarted<TState>());
|
||||
fetch();
|
||||
}
|
||||
|
||||
void fetch() {
|
||||
log('Fetching data for ${TState.toString()}');
|
||||
add(RefetchStarted<TState>());
|
||||
gatherData().catchError(
|
||||
(e) {
|
||||
log('Error while fetching ${TState.toString()}: ${e.toString()}');
|
||||
add(Error(LoadingError(
|
||||
message: e.message ?? e.toString(),
|
||||
message: e.toString(),
|
||||
allowRetry: true,
|
||||
)));
|
||||
},
|
||||
@@ -92,7 +88,7 @@ abstract class LoadableHydratedBloc<
|
||||
var rawData = LoadableSaveContext.unwrap(json);
|
||||
return LoadableState(
|
||||
isLoading: true,
|
||||
data: fromStorage(rawData.data),
|
||||
data: fromStorage(rawData.data), // TODO fromStorage in isolate
|
||||
lastFetch: rawData.meta.timestamp,
|
||||
reFetch: null,
|
||||
error: null,
|
||||
@@ -103,7 +99,7 @@ abstract class LoadableHydratedBloc<
|
||||
Map<String, dynamic>? toJson(LoadableState<TState> state) {
|
||||
Map<String, dynamic>? data;
|
||||
try {
|
||||
data = state.data == null ? null : toStorage(state.data);
|
||||
data = state.data == null ? null : toStorage(state.data); // TODO toStorage in isolate
|
||||
} catch(e) {
|
||||
log('Failed to save state ${TState.toString()}: ${e.toString()}');
|
||||
}
|
||||
|
||||
@@ -3,7 +3,8 @@ import '../../loadableState/loading_error.dart';
|
||||
class LoadableHydratedBlocEvent<TState> {}
|
||||
class Emit<TState> extends LoadableHydratedBlocEvent<TState> {
|
||||
final TState Function(TState state) state;
|
||||
Emit(this.state);
|
||||
final bool fetch;
|
||||
Emit(this.state, {this.fetch = false});
|
||||
}
|
||||
class DataGathered<TState> extends LoadableHydratedBlocEvent<TState> {
|
||||
final TState Function(TState state) state;
|
||||
|
||||
@@ -22,12 +22,8 @@ LoadableSaveContext _$LoadableSaveContextFromJson(Map<String, dynamic> json) {
|
||||
mixin _$LoadableSaveContext {
|
||||
int get timestamp => throw _privateConstructorUsedError;
|
||||
|
||||
/// Serializes this LoadableSaveContext to a JSON map.
|
||||
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
|
||||
|
||||
/// Create a copy of LoadableSaveContext
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@JsonKey(ignore: true)
|
||||
$LoadableSaveContextCopyWith<LoadableSaveContext> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
}
|
||||
@@ -51,8 +47,6 @@ class _$LoadableSaveContextCopyWithImpl<$Res, $Val extends LoadableSaveContext>
|
||||
// ignore: unused_field
|
||||
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')
|
||||
@override
|
||||
$Res call({
|
||||
@@ -86,8 +80,6 @@ class __$$LoadableSaveContextImplCopyWithImpl<$Res>
|
||||
$Res Function(_$LoadableSaveContextImpl) _then)
|
||||
: super(_value, _then);
|
||||
|
||||
/// Create a copy of LoadableSaveContext
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@pragma('vm:prefer-inline')
|
||||
@override
|
||||
$Res call({
|
||||
@@ -127,13 +119,11 @@ class _$LoadableSaveContextImpl extends _LoadableSaveContext {
|
||||
other.timestamp == timestamp));
|
||||
}
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@JsonKey(ignore: true)
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType, timestamp);
|
||||
|
||||
/// Create a copy of LoadableSaveContext
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@JsonKey(ignore: true)
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
_$$LoadableSaveContextImplCopyWith<_$LoadableSaveContextImpl> get copyWith =>
|
||||
@@ -158,11 +148,8 @@ abstract class _LoadableSaveContext extends LoadableSaveContext {
|
||||
|
||||
@override
|
||||
int get timestamp;
|
||||
|
||||
/// Create a copy of LoadableSaveContext
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@JsonKey(ignore: true)
|
||||
_$$LoadableSaveContextImplCopyWith<_$LoadableSaveContextImpl> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,48 @@
|
||||
import 'dart:async';
|
||||
|
||||
import 'package:bloc/bloc.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
import 'bloc_module.dart';
|
||||
|
||||
class SwappingBloc<TBloc> {
|
||||
final TBloc initialBloc;
|
||||
final StreamController<TBloc> updater = StreamController<TBloc>();
|
||||
|
||||
SwappingBloc(this.initialBloc);
|
||||
|
||||
void swap(TBloc bloc) {
|
||||
updater.add(bloc);
|
||||
}
|
||||
}
|
||||
|
||||
class SwappingBlocModule<TBloc extends StateStreamableSource<TState>, TState> extends StatefulWidget {
|
||||
final SwappingBloc<TBloc> bloc;
|
||||
final Widget Function(BuildContext context, TBloc bloc, TState state) child;
|
||||
const SwappingBlocModule({super.key, required this.bloc, required this.child});
|
||||
|
||||
@override
|
||||
State<SwappingBlocModule<TBloc, TState>> createState() => _SwappingBlocModuleState<TBloc, TState>();
|
||||
}
|
||||
|
||||
class _SwappingBlocModuleState<TBloc extends StateStreamableSource<TState>, TState> extends State<SwappingBlocModule<TBloc, TState>> {
|
||||
late TBloc bloc;
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
bloc = widget.bloc.initialBloc;
|
||||
widget.bloc.updater.stream.listen((event) {
|
||||
setState(() {
|
||||
bloc = event;
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) => BlocModule<TBloc, TState>(
|
||||
autoRebuild: true,
|
||||
create: (context) => bloc,
|
||||
child: (context, bloc, state) => widget.child(context, bloc, state),
|
||||
);
|
||||
}
|
||||
@@ -1,129 +1,51 @@
|
||||
import 'package:flutter/material.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 '../../../model/breakers/Breaker.dart';
|
||||
import '../../../model/chatList/chatListProps.dart';
|
||||
import '../../../storage/base/settingsProvider.dart';
|
||||
import '../../../view/pages/files/files.dart';
|
||||
import '../../../view/pages/more/roomplan/roomplan.dart';
|
||||
import '../../../view/pages/talk/chatList.dart';
|
||||
import '../../../view/pages/timetable/timetable.dart';
|
||||
import '../../../widget/centeredLeading.dart';
|
||||
import 'files/view/files_view.dart';
|
||||
import 'gradeAverages/view/grade_averages_view.dart';
|
||||
import 'holidays/view/holidays_view.dart';
|
||||
import 'marianumMessage/view/marianum_message_list_view.dart';
|
||||
|
||||
import 'package:badges/badges.dart' as badges;
|
||||
|
||||
class AppModule {
|
||||
Modules module;
|
||||
String name;
|
||||
Widget Function() icon;
|
||||
BreakerArea breakerArea;
|
||||
IconData icon;
|
||||
Widget Function() create;
|
||||
|
||||
AppModule(this.module, {required this.name, required this.icon, this.breakerArea = BreakerArea.global, required this.create});
|
||||
AppModule(this.name, this.icon, this.create);
|
||||
|
||||
static Map<Modules, AppModule> modules(BuildContext context, { showFiltered = false }) {
|
||||
var settings = Provider.of<SettingsProvider>(context, listen: false);
|
||||
var available = {
|
||||
Modules.timetable: AppModule(
|
||||
Modules.timetable,
|
||||
name: 'Stundenplan',
|
||||
icon: () => Icon(Icons.calendar_month),
|
||||
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 Map<Modules, AppModule> modules() => {
|
||||
Modules.timetable: AppModule('Vertretung', Icons.calendar_month, Timetable.new),
|
||||
Modules.talk: AppModule('Talk', Icons.chat, ChatList.new),
|
||||
Modules.files: AppModule('Files', Icons.folder, Files.new),
|
||||
Modules.blocFiles: AppModule('BlocFiles', Icons.folder, FilesView.new),
|
||||
Modules.marianumMessage: AppModule('Marianum Message', Icons.newspaper, MarianumMessageListView.new),
|
||||
Modules.roomPlan: AppModule('Raumplan', Icons.location_pin, Roomplan.new),
|
||||
Modules.gradeAveragesCalculator: AppModule('Notendurschnittsrechner', Icons.calculate, GradeAveragesView.new),
|
||||
Modules.holidays: AppModule('Schulferien', Icons.flight, HolidaysView.new),
|
||||
};
|
||||
|
||||
if(!showFiltered) available.removeWhere((key, value) => settings.val().modulesSettings.hiddenModules.contains(key));
|
||||
static AppModule getModule(Modules module) => modules()[module]!;
|
||||
|
||||
return { for (var element in settings.val().modulesSettings.moduleOrder.where((element) => available.containsKey(element))) element : available[element]! };
|
||||
}
|
||||
|
||||
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()),
|
||||
Widget toListTile(BuildContext context) => ListTile(
|
||||
leading: CenteredLeading(Icon(icon)),
|
||||
title: Text(name),
|
||||
onTap: isReorder ? null : () => pushScreen(context, withNavBar: false, screen: create()),
|
||||
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),
|
||||
onTap: () => pushScreen(context, withNavBar: false, screen: create()),
|
||||
trailing: const Icon(Icons.arrow_right),
|
||||
);
|
||||
|
||||
PersistentTabConfig toBottomTab(BuildContext context, {Widget Function(IconData icon)? iconBuilder}) => PersistentTabConfig(
|
||||
screen: Breaker(breaker: breakerArea, child: create()),
|
||||
PersistentTabConfig toBottomTab(BuildContext context, {Widget Function(IconData icon)? itemBuilder}) => PersistentTabConfig(
|
||||
screen: Breaker(breaker: BreakerArea.global, child: create()),
|
||||
item: ItemConfig(
|
||||
activeForegroundColor: Theme.of(context).primaryColor,
|
||||
inactiveForegroundColor: Theme.of(context).colorScheme.secondary,
|
||||
icon: icon(),
|
||||
icon: itemBuilder == null ? Icon(icon) : itemBuilder(icon),
|
||||
title: name
|
||||
),
|
||||
);
|
||||
@@ -133,6 +55,7 @@ enum Modules {
|
||||
timetable,
|
||||
talk,
|
||||
files,
|
||||
blocFiles,
|
||||
marianumMessage,
|
||||
roomPlan,
|
||||
gradeAveragesCalculator,
|
||||
|
||||
71
lib/state/app/modules/files/bloc/files_bloc.dart
Normal file
71
lib/state/app/modules/files/bloc/files_bloc.dart
Normal file
@@ -0,0 +1,71 @@
|
||||
|
||||
import 'dart:developer';
|
||||
|
||||
import 'package:sorted/sorted.dart';
|
||||
|
||||
import '../../../infrastructure/utilityWidgets/loadableHydratedBloc/loadable_hydrated_bloc.dart';
|
||||
import '../../../infrastructure/utilityWidgets/loadableHydratedBloc/loadable_hydrated_bloc_event.dart';
|
||||
import '../repository/files_repository.dart';
|
||||
import 'files_event.dart';
|
||||
import 'files_state.dart';
|
||||
|
||||
class FilesBloc extends LoadableHydratedBloc<FilesEvent, FilesState, FilesRepository> {
|
||||
static const String basePath = '/';
|
||||
|
||||
FilesBloc() {
|
||||
add(Emit((state) => state.copyWith(currentFolder: basePath)));
|
||||
on<EnterFolder>((event, emit) {
|
||||
add(Emit((state) {
|
||||
log('setFolder');
|
||||
return state.copyWith(currentFolder: event.absolutePath);
|
||||
}, fetch: true));
|
||||
});
|
||||
}
|
||||
|
||||
List<File>? getVisibleFiles() => innerState?.files[innerState?.currentFolder];
|
||||
String getCurrentFolder() => innerState?.currentFolder ?? basePath;
|
||||
String getCurrentFolderName() {
|
||||
var folder = innerState?.currentFolder.split('/').reversed.elementAt(1);
|
||||
return folder!.isEmpty ? 'Dateien' : folder;
|
||||
}
|
||||
bool canGoBack() => innerState?.currentFolder != basePath;
|
||||
String goBackLocation() {
|
||||
var pathSegments = innerState?.currentFolder.split(basePath) ?? [];
|
||||
if (pathSegments.isNotEmpty) {
|
||||
pathSegments.removeLast();
|
||||
pathSegments.removeLast();
|
||||
}
|
||||
return pathSegments.join(basePath) + basePath;
|
||||
}
|
||||
|
||||
List currentSortConfiguration() => [
|
||||
SortedComparable<File, DateTime>((file) => file.updatedAt ?? DateTime.now()),
|
||||
];
|
||||
|
||||
@override
|
||||
FilesState fromNothing() => const FilesState(currentFolder: basePath, files: {});
|
||||
|
||||
@override
|
||||
FilesState fromStorage(Map<String, dynamic> json) => FilesState.fromJson(json);
|
||||
|
||||
@override
|
||||
Future<void> gatherData() async {
|
||||
var fetchFolder = getCurrentFolder();
|
||||
log(fetchFolder);
|
||||
var files = await repo.getFileList(fetchFolder);
|
||||
var newFileMap = Map.of(innerState?.files ?? <String, List<File>>{});
|
||||
newFileMap[fetchFolder] = files;
|
||||
if(fetchFolder != getCurrentFolder()) {
|
||||
log('Fetch aborted due to folder change (expected "$fetchFolder" got "${getCurrentFolder()}")');
|
||||
return;
|
||||
}
|
||||
add(DataGathered((state) => state.copyWith(files: newFileMap)));
|
||||
}
|
||||
|
||||
@override
|
||||
FilesRepository repository() => FilesRepository();
|
||||
|
||||
@override
|
||||
Map<String, dynamic>? toStorage(FilesState state) => state.toJson();
|
||||
|
||||
}
|
||||
10
lib/state/app/modules/files/bloc/files_event.dart
Normal file
10
lib/state/app/modules/files/bloc/files_event.dart
Normal file
@@ -0,0 +1,10 @@
|
||||
|
||||
import '../../../infrastructure/utilityWidgets/loadableHydratedBloc/loadable_hydrated_bloc_event.dart';
|
||||
import 'files_state.dart';
|
||||
|
||||
sealed class FilesEvent extends LoadableHydratedBlocEvent<FilesState> {}
|
||||
class EnterFolder extends FilesEvent {
|
||||
String absolutePath;
|
||||
EnterFolder(this.absolutePath);
|
||||
}
|
||||
|
||||
29
lib/state/app/modules/files/bloc/files_state.dart
Normal file
29
lib/state/app/modules/files/bloc/files_state.dart
Normal file
@@ -0,0 +1,29 @@
|
||||
import 'package:freezed_annotation/freezed_annotation.dart';
|
||||
|
||||
part 'files_state.freezed.dart';
|
||||
part 'files_state.g.dart';
|
||||
|
||||
@freezed
|
||||
class FilesState with _$FilesState {
|
||||
const factory FilesState({
|
||||
required String currentFolder,
|
||||
required Map<String, List<File>> files,
|
||||
}) = _FilesState;
|
||||
|
||||
factory FilesState.fromJson(Map<String, Object?> json) => _$FilesStateFromJson(json);
|
||||
}
|
||||
|
||||
@freezed
|
||||
class File with _$File {
|
||||
const factory File({
|
||||
required String path,
|
||||
required bool isFolder,
|
||||
required String name,
|
||||
required DateTime? createdAt,
|
||||
required DateTime? updatedAt,
|
||||
required int? size,
|
||||
required String? mimeType,
|
||||
}) = _File;
|
||||
|
||||
factory File.fromJson(Map<String, Object?> json) => _$FileFromJson(json);
|
||||
}
|
||||
439
lib/state/app/modules/files/bloc/files_state.freezed.dart
Normal file
439
lib/state/app/modules/files/bloc/files_state.freezed.dart
Normal file
@@ -0,0 +1,439 @@
|
||||
// coverage:ignore-file
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
// ignore_for_file: type=lint
|
||||
// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark
|
||||
|
||||
part of 'files_state.dart';
|
||||
|
||||
// **************************************************************************
|
||||
// FreezedGenerator
|
||||
// **************************************************************************
|
||||
|
||||
T _$identity<T>(T value) => value;
|
||||
|
||||
final _privateConstructorUsedError = UnsupportedError(
|
||||
'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models');
|
||||
|
||||
FilesState _$FilesStateFromJson(Map<String, dynamic> json) {
|
||||
return _FilesState.fromJson(json);
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
mixin _$FilesState {
|
||||
String get currentFolder => throw _privateConstructorUsedError;
|
||||
Map<String, List<File>> get files => throw _privateConstructorUsedError;
|
||||
|
||||
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
|
||||
@JsonKey(ignore: true)
|
||||
$FilesStateCopyWith<FilesState> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class $FilesStateCopyWith<$Res> {
|
||||
factory $FilesStateCopyWith(
|
||||
FilesState value, $Res Function(FilesState) then) =
|
||||
_$FilesStateCopyWithImpl<$Res, FilesState>;
|
||||
@useResult
|
||||
$Res call({String currentFolder, Map<String, List<File>> files});
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class _$FilesStateCopyWithImpl<$Res, $Val extends FilesState>
|
||||
implements $FilesStateCopyWith<$Res> {
|
||||
_$FilesStateCopyWithImpl(this._value, this._then);
|
||||
|
||||
// ignore: unused_field
|
||||
final $Val _value;
|
||||
// ignore: unused_field
|
||||
final $Res Function($Val) _then;
|
||||
|
||||
@pragma('vm:prefer-inline')
|
||||
@override
|
||||
$Res call({
|
||||
Object? currentFolder = null,
|
||||
Object? files = null,
|
||||
}) {
|
||||
return _then(_value.copyWith(
|
||||
currentFolder: null == currentFolder
|
||||
? _value.currentFolder
|
||||
: currentFolder // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
files: null == files
|
||||
? _value.files
|
||||
: files // ignore: cast_nullable_to_non_nullable
|
||||
as Map<String, List<File>>,
|
||||
) as $Val);
|
||||
}
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class _$$FilesStateImplCopyWith<$Res>
|
||||
implements $FilesStateCopyWith<$Res> {
|
||||
factory _$$FilesStateImplCopyWith(
|
||||
_$FilesStateImpl value, $Res Function(_$FilesStateImpl) then) =
|
||||
__$$FilesStateImplCopyWithImpl<$Res>;
|
||||
@override
|
||||
@useResult
|
||||
$Res call({String currentFolder, Map<String, List<File>> files});
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class __$$FilesStateImplCopyWithImpl<$Res>
|
||||
extends _$FilesStateCopyWithImpl<$Res, _$FilesStateImpl>
|
||||
implements _$$FilesStateImplCopyWith<$Res> {
|
||||
__$$FilesStateImplCopyWithImpl(
|
||||
_$FilesStateImpl _value, $Res Function(_$FilesStateImpl) _then)
|
||||
: super(_value, _then);
|
||||
|
||||
@pragma('vm:prefer-inline')
|
||||
@override
|
||||
$Res call({
|
||||
Object? currentFolder = null,
|
||||
Object? files = null,
|
||||
}) {
|
||||
return _then(_$FilesStateImpl(
|
||||
currentFolder: null == currentFolder
|
||||
? _value.currentFolder
|
||||
: currentFolder // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
files: null == files
|
||||
? _value._files
|
||||
: files // ignore: cast_nullable_to_non_nullable
|
||||
as Map<String, List<File>>,
|
||||
));
|
||||
}
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
@JsonSerializable()
|
||||
class _$FilesStateImpl implements _FilesState {
|
||||
const _$FilesStateImpl(
|
||||
{required this.currentFolder,
|
||||
required final Map<String, List<File>> files})
|
||||
: _files = files;
|
||||
|
||||
factory _$FilesStateImpl.fromJson(Map<String, dynamic> json) =>
|
||||
_$$FilesStateImplFromJson(json);
|
||||
|
||||
@override
|
||||
final String currentFolder;
|
||||
final Map<String, List<File>> _files;
|
||||
@override
|
||||
Map<String, List<File>> get files {
|
||||
if (_files is EqualUnmodifiableMapView) return _files;
|
||||
// ignore: implicit_dynamic_type
|
||||
return EqualUnmodifiableMapView(_files);
|
||||
}
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'FilesState(currentFolder: $currentFolder, files: $files)';
|
||||
}
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) ||
|
||||
(other.runtimeType == runtimeType &&
|
||||
other is _$FilesStateImpl &&
|
||||
(identical(other.currentFolder, currentFolder) ||
|
||||
other.currentFolder == currentFolder) &&
|
||||
const DeepCollectionEquality().equals(other._files, _files));
|
||||
}
|
||||
|
||||
@JsonKey(ignore: true)
|
||||
@override
|
||||
int get hashCode => Object.hash(
|
||||
runtimeType, currentFolder, const DeepCollectionEquality().hash(_files));
|
||||
|
||||
@JsonKey(ignore: true)
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
_$$FilesStateImplCopyWith<_$FilesStateImpl> get copyWith =>
|
||||
__$$FilesStateImplCopyWithImpl<_$FilesStateImpl>(this, _$identity);
|
||||
|
||||
@override
|
||||
Map<String, dynamic> toJson() {
|
||||
return _$$FilesStateImplToJson(
|
||||
this,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
abstract class _FilesState implements FilesState {
|
||||
const factory _FilesState(
|
||||
{required final String currentFolder,
|
||||
required final Map<String, List<File>> files}) = _$FilesStateImpl;
|
||||
|
||||
factory _FilesState.fromJson(Map<String, dynamic> json) =
|
||||
_$FilesStateImpl.fromJson;
|
||||
|
||||
@override
|
||||
String get currentFolder;
|
||||
@override
|
||||
Map<String, List<File>> get files;
|
||||
@override
|
||||
@JsonKey(ignore: true)
|
||||
_$$FilesStateImplCopyWith<_$FilesStateImpl> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
File _$FileFromJson(Map<String, dynamic> json) {
|
||||
return _File.fromJson(json);
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
mixin _$File {
|
||||
String get path => throw _privateConstructorUsedError;
|
||||
bool get isFolder => throw _privateConstructorUsedError;
|
||||
String get name => throw _privateConstructorUsedError;
|
||||
DateTime? get createdAt => throw _privateConstructorUsedError;
|
||||
DateTime? get updatedAt => throw _privateConstructorUsedError;
|
||||
int? get size => throw _privateConstructorUsedError;
|
||||
String? get mimeType => throw _privateConstructorUsedError;
|
||||
|
||||
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
|
||||
@JsonKey(ignore: true)
|
||||
$FileCopyWith<File> get copyWith => throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class $FileCopyWith<$Res> {
|
||||
factory $FileCopyWith(File value, $Res Function(File) then) =
|
||||
_$FileCopyWithImpl<$Res, File>;
|
||||
@useResult
|
||||
$Res call(
|
||||
{String path,
|
||||
bool isFolder,
|
||||
String name,
|
||||
DateTime? createdAt,
|
||||
DateTime? updatedAt,
|
||||
int? size,
|
||||
String? mimeType});
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class _$FileCopyWithImpl<$Res, $Val extends File>
|
||||
implements $FileCopyWith<$Res> {
|
||||
_$FileCopyWithImpl(this._value, this._then);
|
||||
|
||||
// ignore: unused_field
|
||||
final $Val _value;
|
||||
// ignore: unused_field
|
||||
final $Res Function($Val) _then;
|
||||
|
||||
@pragma('vm:prefer-inline')
|
||||
@override
|
||||
$Res call({
|
||||
Object? path = null,
|
||||
Object? isFolder = null,
|
||||
Object? name = null,
|
||||
Object? createdAt = freezed,
|
||||
Object? updatedAt = freezed,
|
||||
Object? size = freezed,
|
||||
Object? mimeType = freezed,
|
||||
}) {
|
||||
return _then(_value.copyWith(
|
||||
path: null == path
|
||||
? _value.path
|
||||
: path // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
isFolder: null == isFolder
|
||||
? _value.isFolder
|
||||
: isFolder // ignore: cast_nullable_to_non_nullable
|
||||
as bool,
|
||||
name: null == name
|
||||
? _value.name
|
||||
: name // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
createdAt: freezed == createdAt
|
||||
? _value.createdAt
|
||||
: createdAt // ignore: cast_nullable_to_non_nullable
|
||||
as DateTime?,
|
||||
updatedAt: freezed == updatedAt
|
||||
? _value.updatedAt
|
||||
: updatedAt // ignore: cast_nullable_to_non_nullable
|
||||
as DateTime?,
|
||||
size: freezed == size
|
||||
? _value.size
|
||||
: size // ignore: cast_nullable_to_non_nullable
|
||||
as int?,
|
||||
mimeType: freezed == mimeType
|
||||
? _value.mimeType
|
||||
: mimeType // ignore: cast_nullable_to_non_nullable
|
||||
as String?,
|
||||
) as $Val);
|
||||
}
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class _$$FileImplCopyWith<$Res> implements $FileCopyWith<$Res> {
|
||||
factory _$$FileImplCopyWith(
|
||||
_$FileImpl value, $Res Function(_$FileImpl) then) =
|
||||
__$$FileImplCopyWithImpl<$Res>;
|
||||
@override
|
||||
@useResult
|
||||
$Res call(
|
||||
{String path,
|
||||
bool isFolder,
|
||||
String name,
|
||||
DateTime? createdAt,
|
||||
DateTime? updatedAt,
|
||||
int? size,
|
||||
String? mimeType});
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class __$$FileImplCopyWithImpl<$Res>
|
||||
extends _$FileCopyWithImpl<$Res, _$FileImpl>
|
||||
implements _$$FileImplCopyWith<$Res> {
|
||||
__$$FileImplCopyWithImpl(_$FileImpl _value, $Res Function(_$FileImpl) _then)
|
||||
: super(_value, _then);
|
||||
|
||||
@pragma('vm:prefer-inline')
|
||||
@override
|
||||
$Res call({
|
||||
Object? path = null,
|
||||
Object? isFolder = null,
|
||||
Object? name = null,
|
||||
Object? createdAt = freezed,
|
||||
Object? updatedAt = freezed,
|
||||
Object? size = freezed,
|
||||
Object? mimeType = freezed,
|
||||
}) {
|
||||
return _then(_$FileImpl(
|
||||
path: null == path
|
||||
? _value.path
|
||||
: path // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
isFolder: null == isFolder
|
||||
? _value.isFolder
|
||||
: isFolder // ignore: cast_nullable_to_non_nullable
|
||||
as bool,
|
||||
name: null == name
|
||||
? _value.name
|
||||
: name // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
createdAt: freezed == createdAt
|
||||
? _value.createdAt
|
||||
: createdAt // ignore: cast_nullable_to_non_nullable
|
||||
as DateTime?,
|
||||
updatedAt: freezed == updatedAt
|
||||
? _value.updatedAt
|
||||
: updatedAt // ignore: cast_nullable_to_non_nullable
|
||||
as DateTime?,
|
||||
size: freezed == size
|
||||
? _value.size
|
||||
: size // ignore: cast_nullable_to_non_nullable
|
||||
as int?,
|
||||
mimeType: freezed == mimeType
|
||||
? _value.mimeType
|
||||
: mimeType // ignore: cast_nullable_to_non_nullable
|
||||
as String?,
|
||||
));
|
||||
}
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
@JsonSerializable()
|
||||
class _$FileImpl implements _File {
|
||||
const _$FileImpl(
|
||||
{required this.path,
|
||||
required this.isFolder,
|
||||
required this.name,
|
||||
required this.createdAt,
|
||||
required this.updatedAt,
|
||||
required this.size,
|
||||
required this.mimeType});
|
||||
|
||||
factory _$FileImpl.fromJson(Map<String, dynamic> json) =>
|
||||
_$$FileImplFromJson(json);
|
||||
|
||||
@override
|
||||
final String path;
|
||||
@override
|
||||
final bool isFolder;
|
||||
@override
|
||||
final String name;
|
||||
@override
|
||||
final DateTime? createdAt;
|
||||
@override
|
||||
final DateTime? updatedAt;
|
||||
@override
|
||||
final int? size;
|
||||
@override
|
||||
final String? mimeType;
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'File(path: $path, isFolder: $isFolder, name: $name, createdAt: $createdAt, updatedAt: $updatedAt, size: $size, mimeType: $mimeType)';
|
||||
}
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) ||
|
||||
(other.runtimeType == runtimeType &&
|
||||
other is _$FileImpl &&
|
||||
(identical(other.path, path) || other.path == path) &&
|
||||
(identical(other.isFolder, isFolder) ||
|
||||
other.isFolder == isFolder) &&
|
||||
(identical(other.name, name) || other.name == name) &&
|
||||
(identical(other.createdAt, createdAt) ||
|
||||
other.createdAt == createdAt) &&
|
||||
(identical(other.updatedAt, updatedAt) ||
|
||||
other.updatedAt == updatedAt) &&
|
||||
(identical(other.size, size) || other.size == size) &&
|
||||
(identical(other.mimeType, mimeType) ||
|
||||
other.mimeType == mimeType));
|
||||
}
|
||||
|
||||
@JsonKey(ignore: true)
|
||||
@override
|
||||
int get hashCode => Object.hash(
|
||||
runtimeType, path, isFolder, name, createdAt, updatedAt, size, mimeType);
|
||||
|
||||
@JsonKey(ignore: true)
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
_$$FileImplCopyWith<_$FileImpl> get copyWith =>
|
||||
__$$FileImplCopyWithImpl<_$FileImpl>(this, _$identity);
|
||||
|
||||
@override
|
||||
Map<String, dynamic> toJson() {
|
||||
return _$$FileImplToJson(
|
||||
this,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
abstract class _File implements File {
|
||||
const factory _File(
|
||||
{required final String path,
|
||||
required final bool isFolder,
|
||||
required final String name,
|
||||
required final DateTime? createdAt,
|
||||
required final DateTime? updatedAt,
|
||||
required final int? size,
|
||||
required final String? mimeType}) = _$FileImpl;
|
||||
|
||||
factory _File.fromJson(Map<String, dynamic> json) = _$FileImpl.fromJson;
|
||||
|
||||
@override
|
||||
String get path;
|
||||
@override
|
||||
bool get isFolder;
|
||||
@override
|
||||
String get name;
|
||||
@override
|
||||
DateTime? get createdAt;
|
||||
@override
|
||||
DateTime? get updatedAt;
|
||||
@override
|
||||
int? get size;
|
||||
@override
|
||||
String? get mimeType;
|
||||
@override
|
||||
@JsonKey(ignore: true)
|
||||
_$$FileImplCopyWith<_$FileImpl> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
}
|
||||
50
lib/state/app/modules/files/bloc/files_state.g.dart
Normal file
50
lib/state/app/modules/files/bloc/files_state.g.dart
Normal file
@@ -0,0 +1,50 @@
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
|
||||
part of 'files_state.dart';
|
||||
|
||||
// **************************************************************************
|
||||
// JsonSerializableGenerator
|
||||
// **************************************************************************
|
||||
|
||||
_$FilesStateImpl _$$FilesStateImplFromJson(Map<String, dynamic> json) =>
|
||||
_$FilesStateImpl(
|
||||
currentFolder: json['currentFolder'] as String,
|
||||
files: (json['files'] as Map<String, dynamic>).map(
|
||||
(k, e) => MapEntry(
|
||||
k,
|
||||
(e as List<dynamic>)
|
||||
.map((e) => File.fromJson(e as Map<String, dynamic>))
|
||||
.toList()),
|
||||
),
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$$FilesStateImplToJson(_$FilesStateImpl instance) =>
|
||||
<String, dynamic>{
|
||||
'currentFolder': instance.currentFolder,
|
||||
'files': instance.files,
|
||||
};
|
||||
|
||||
_$FileImpl _$$FileImplFromJson(Map<String, dynamic> json) => _$FileImpl(
|
||||
path: json['path'] as String,
|
||||
isFolder: json['isFolder'] as bool,
|
||||
name: json['name'] as String,
|
||||
createdAt: json['createdAt'] == null
|
||||
? null
|
||||
: DateTime.parse(json['createdAt'] as String),
|
||||
updatedAt: json['updatedAt'] == null
|
||||
? null
|
||||
: DateTime.parse(json['updatedAt'] as String),
|
||||
size: (json['size'] as num?)?.toInt(),
|
||||
mimeType: json['mimeType'] as String?,
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$$FileImplToJson(_$FileImpl instance) =>
|
||||
<String, dynamic>{
|
||||
'path': instance.path,
|
||||
'isFolder': instance.isFolder,
|
||||
'name': instance.name,
|
||||
'createdAt': instance.createdAt?.toIso8601String(),
|
||||
'updatedAt': instance.updatedAt?.toIso8601String(),
|
||||
'size': instance.size,
|
||||
'mimeType': instance.mimeType,
|
||||
};
|
||||
31
lib/state/app/modules/files/repository/files_repository.dart
Normal file
31
lib/state/app/modules/files/repository/files_repository.dart
Normal file
@@ -0,0 +1,31 @@
|
||||
|
||||
import 'package:nextcloud/nextcloud.dart';
|
||||
|
||||
import '../../../../../api/marianumcloud/webdav/webdavApi.dart';
|
||||
import '../../../infrastructure/repository/repository.dart';
|
||||
import '../bloc/files_state.dart';
|
||||
|
||||
class FilesRepository extends Repository<FilesState> {
|
||||
Future<List<File>> getFileList(String path) async {
|
||||
var webdav = await WebdavApi.webdav;
|
||||
var response = await webdav.propfind(PathUri.parse(path)); // TODO move to custom data loader
|
||||
var davFiles = response.toWebDavFiles();
|
||||
|
||||
davFiles.removeWhere((file) {
|
||||
var filePath = file.path.path;
|
||||
return filePath.isEmpty || filePath == path;
|
||||
});
|
||||
|
||||
var files = davFiles.map((davFile) => File(
|
||||
path: davFile.path.path,
|
||||
isFolder: davFile.isDirectory,
|
||||
name: davFile.name,
|
||||
createdAt: davFile.createdDate,
|
||||
updatedAt: davFile.lastModified,
|
||||
size: davFile.size,
|
||||
mimeType: davFile.mimeType
|
||||
));
|
||||
|
||||
return files.toList();
|
||||
}
|
||||
}
|
||||
17
lib/state/app/modules/files/view/files_view.dart
Normal file
17
lib/state/app/modules/files/view/files_view.dart
Normal file
@@ -0,0 +1,17 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import '../../../infrastructure/loadableState/loadable_state.dart';
|
||||
import '../../../infrastructure/utilityWidgets/bloc_module.dart';
|
||||
import '../bloc/files_bloc.dart';
|
||||
import '../bloc/files_state.dart';
|
||||
import 'folder_view.dart';
|
||||
|
||||
class FilesView extends StatelessWidget {
|
||||
const FilesView({super.key});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) => BlocModule<FilesBloc, LoadableState<FilesState>>(
|
||||
create: (context) => FilesBloc(),
|
||||
autoRebuild: true,
|
||||
child: (context, bloc, state) => FolderView(bloc),
|
||||
);
|
||||
}
|
||||
57
lib/state/app/modules/files/view/folder_view.dart
Normal file
57
lib/state/app/modules/files/view/folder_view.dart
Normal file
@@ -0,0 +1,57 @@
|
||||
import 'dart:developer';
|
||||
|
||||
import 'package:filesize/filesize.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:jiffy/jiffy.dart';
|
||||
|
||||
import '../../../../../widget/centeredLeading.dart';
|
||||
import '../../../../../widget/list_view_util.dart';
|
||||
import '../../../infrastructure/loadableState/view/loadable_state_consumer.dart';
|
||||
import '../bloc/files_bloc.dart';
|
||||
import '../bloc/files_event.dart';
|
||||
import '../bloc/files_state.dart';
|
||||
|
||||
class FolderView extends StatelessWidget {
|
||||
final FilesBloc bloc;
|
||||
const FolderView(this.bloc, {super.key});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) => Scaffold(
|
||||
appBar: AppBar(
|
||||
leading: !bloc.canGoBack() ? null : IconButton(
|
||||
icon: const Icon(Icons.arrow_back),
|
||||
onPressed: () {
|
||||
bloc.add(EnterFolder(bloc.goBackLocation()));
|
||||
Navigator.of(context).pop();
|
||||
},
|
||||
),
|
||||
title: Text(bloc.getCurrentFolderName()),
|
||||
|
||||
actions: [
|
||||
IconButton(onPressed: () {
|
||||
log(bloc.innerState?.toJson().toString() ?? 'leer');
|
||||
}, icon: const Icon(Icons.bug_report)),
|
||||
IconButton(onPressed: () {
|
||||
bloc.add(EnterFolder('/'));
|
||||
}, icon: const Icon(Icons.home)),
|
||||
],
|
||||
),
|
||||
body: LoadableStateConsumer<FilesBloc, FilesState>(
|
||||
controllerByValue: bloc,
|
||||
child: (state, loading) => ListViewUtil.fromList<File>(bloc.getVisibleFiles(), (file) => ListTile(
|
||||
leading: CenteredLeading(Icon(file.isFolder ? Icons.folder : Icons.description_outlined)),
|
||||
title: Text(file.name),
|
||||
subtitle: file.isFolder
|
||||
? Text('geändert ${Jiffy.parseFromDateTime(file.updatedAt ?? DateTime.now()).fromNow()}')
|
||||
: Text('${filesize(file.size)}, ${Jiffy.parseFromDateTime(file.updatedAt ?? DateTime.now()).fromNow()}'),
|
||||
trailing: Icon(file.isFolder ? Icons.arrow_right : null),
|
||||
onTap: () {
|
||||
log(file.path);
|
||||
if(!file.isFolder) return;
|
||||
Navigator.of(context).push(MaterialPageRoute(builder: (context) => FolderView(bloc)));
|
||||
bloc.add(EnterFolder(file.path));
|
||||
},
|
||||
))
|
||||
)
|
||||
);
|
||||
}
|
||||
@@ -24,12 +24,8 @@ mixin _$GradeAveragesState {
|
||||
throw _privateConstructorUsedError;
|
||||
List<int> get grades => throw _privateConstructorUsedError;
|
||||
|
||||
/// Serializes this GradeAveragesState to a JSON map.
|
||||
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
|
||||
|
||||
/// Create a copy of GradeAveragesState
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@JsonKey(ignore: true)
|
||||
$GradeAveragesStateCopyWith<GradeAveragesState> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
}
|
||||
@@ -53,8 +49,6 @@ class _$GradeAveragesStateCopyWithImpl<$Res, $Val extends GradeAveragesState>
|
||||
// ignore: unused_field
|
||||
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')
|
||||
@override
|
||||
$Res call({
|
||||
@@ -93,8 +87,6 @@ class __$$GradeAveragesStateImplCopyWithImpl<$Res>
|
||||
$Res Function(_$GradeAveragesStateImpl) _then)
|
||||
: super(_value, _then);
|
||||
|
||||
/// Create a copy of GradeAveragesState
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@pragma('vm:prefer-inline')
|
||||
@override
|
||||
$Res call({
|
||||
@@ -149,14 +141,12 @@ class _$GradeAveragesStateImpl implements _GradeAveragesState {
|
||||
const DeepCollectionEquality().equals(other._grades, _grades));
|
||||
}
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@JsonKey(ignore: true)
|
||||
@override
|
||||
int get hashCode => Object.hash(
|
||||
runtimeType, gradingSystem, const DeepCollectionEquality().hash(_grades));
|
||||
|
||||
/// Create a copy of GradeAveragesState
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@JsonKey(ignore: true)
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
_$$GradeAveragesStateImplCopyWith<_$GradeAveragesStateImpl> get copyWith =>
|
||||
@@ -183,11 +173,8 @@ abstract class _GradeAveragesState implements GradeAveragesState {
|
||||
GradeAveragesGradingSystem get gradingSystem;
|
||||
@override
|
||||
List<int> get grades;
|
||||
|
||||
/// Create a copy of GradeAveragesState
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@JsonKey(ignore: true)
|
||||
_$$GradeAveragesStateImplCopyWith<_$GradeAveragesStateImpl> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
@@ -24,12 +24,8 @@ mixin _$HolidaysState {
|
||||
bool get showDisclaimer => throw _privateConstructorUsedError;
|
||||
List<Holiday> get holidays => throw _privateConstructorUsedError;
|
||||
|
||||
/// Serializes this HolidaysState to a JSON map.
|
||||
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
|
||||
|
||||
/// Create a copy of HolidaysState
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@JsonKey(ignore: true)
|
||||
$HolidaysStateCopyWith<HolidaysState> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
}
|
||||
@@ -54,8 +50,6 @@ class _$HolidaysStateCopyWithImpl<$Res, $Val extends HolidaysState>
|
||||
// ignore: unused_field
|
||||
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')
|
||||
@override
|
||||
$Res call({
|
||||
@@ -100,8 +94,6 @@ class __$$HolidaysStateImplCopyWithImpl<$Res>
|
||||
_$HolidaysStateImpl _value, $Res Function(_$HolidaysStateImpl) _then)
|
||||
: super(_value, _then);
|
||||
|
||||
/// Create a copy of HolidaysState
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@pragma('vm:prefer-inline')
|
||||
@override
|
||||
$Res call({
|
||||
@@ -179,14 +171,12 @@ class _$HolidaysStateImpl
|
||||
const DeepCollectionEquality().equals(other._holidays, _holidays));
|
||||
}
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@JsonKey(ignore: true)
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType, showPastHolidays, showDisclaimer,
|
||||
const DeepCollectionEquality().hash(_holidays));
|
||||
|
||||
/// Create a copy of HolidaysState
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@JsonKey(ignore: true)
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
_$$HolidaysStateImplCopyWith<_$HolidaysStateImpl> get copyWith =>
|
||||
@@ -215,11 +205,8 @@ abstract class _HolidaysState implements HolidaysState {
|
||||
bool get showDisclaimer;
|
||||
@override
|
||||
List<Holiday> get holidays;
|
||||
|
||||
/// Create a copy of HolidaysState
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@JsonKey(ignore: true)
|
||||
_$$HolidaysStateImplCopyWith<_$HolidaysStateImpl> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
}
|
||||
@@ -237,12 +224,8 @@ mixin _$Holiday {
|
||||
String get name => throw _privateConstructorUsedError;
|
||||
String get slug => throw _privateConstructorUsedError;
|
||||
|
||||
/// Serializes this Holiday to a JSON map.
|
||||
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
|
||||
|
||||
/// Create a copy of Holiday
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@JsonKey(ignore: true)
|
||||
$HolidayCopyWith<Holiday> get copyWith => throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
@@ -270,8 +253,6 @@ class _$HolidayCopyWithImpl<$Res, $Val extends Holiday>
|
||||
// ignore: unused_field
|
||||
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')
|
||||
@override
|
||||
$Res call({
|
||||
@@ -335,8 +316,6 @@ class __$$HolidayImplCopyWithImpl<$Res>
|
||||
_$HolidayImpl _value, $Res Function(_$HolidayImpl) _then)
|
||||
: super(_value, _then);
|
||||
|
||||
/// Create a copy of Holiday
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@pragma('vm:prefer-inline')
|
||||
@override
|
||||
$Res call({
|
||||
@@ -435,14 +414,12 @@ class _$HolidayImpl with DiagnosticableTreeMixin implements _Holiday {
|
||||
(identical(other.slug, slug) || other.slug == slug));
|
||||
}
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@JsonKey(ignore: true)
|
||||
@override
|
||||
int get hashCode =>
|
||||
Object.hash(runtimeType, start, end, year, stateCode, name, slug);
|
||||
|
||||
/// Create a copy of Holiday
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@JsonKey(ignore: true)
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
_$$HolidayImplCopyWith<_$HolidayImpl> get copyWith =>
|
||||
@@ -479,11 +456,8 @@ abstract class _Holiday implements Holiday {
|
||||
String get name;
|
||||
@override
|
||||
String get slug;
|
||||
|
||||
/// Create a copy of Holiday
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@JsonKey(ignore: true)
|
||||
_$$HolidayImplCopyWith<_$HolidayImpl> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import 'package:dio/dio.dart';
|
||||
|
||||
import '../../../basis/dataloader/holiday_data_loader.dart';
|
||||
import '../../../infrastructure/dataLoader/data_loader.dart';
|
||||
import '../../../infrastructure/dataLoader/http_data_loader.dart';
|
||||
import '../bloc/holidays_state.dart';
|
||||
|
||||
class HolidaysGetHolidays extends HolidayDataLoader<List<Holiday>> {
|
||||
|
||||
@@ -22,12 +22,8 @@ MarianumMessageState _$MarianumMessageStateFromJson(Map<String, dynamic> json) {
|
||||
mixin _$MarianumMessageState {
|
||||
MarianumMessageList get messageList => throw _privateConstructorUsedError;
|
||||
|
||||
/// Serializes this MarianumMessageState to a JSON map.
|
||||
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
|
||||
|
||||
/// Create a copy of MarianumMessageState
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@JsonKey(ignore: true)
|
||||
$MarianumMessageStateCopyWith<MarianumMessageState> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
}
|
||||
@@ -54,8 +50,6 @@ class _$MarianumMessageStateCopyWithImpl<$Res,
|
||||
// ignore: unused_field
|
||||
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')
|
||||
@override
|
||||
$Res call({
|
||||
@@ -69,8 +63,6 @@ class _$MarianumMessageStateCopyWithImpl<$Res,
|
||||
) as $Val);
|
||||
}
|
||||
|
||||
/// Create a copy of MarianumMessageState
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
$MarianumMessageListCopyWith<$Res> get messageList {
|
||||
@@ -102,8 +94,6 @@ class __$$MarianumMessageStateImplCopyWithImpl<$Res>
|
||||
$Res Function(_$MarianumMessageStateImpl) _then)
|
||||
: super(_value, _then);
|
||||
|
||||
/// Create a copy of MarianumMessageState
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@pragma('vm:prefer-inline')
|
||||
@override
|
||||
$Res call({
|
||||
@@ -143,13 +133,11 @@ class _$MarianumMessageStateImpl implements _MarianumMessageState {
|
||||
other.messageList == messageList));
|
||||
}
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@JsonKey(ignore: true)
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType, messageList);
|
||||
|
||||
/// Create a copy of MarianumMessageState
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@JsonKey(ignore: true)
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
_$$MarianumMessageStateImplCopyWith<_$MarianumMessageStateImpl>
|
||||
@@ -175,11 +163,8 @@ abstract class _MarianumMessageState implements MarianumMessageState {
|
||||
|
||||
@override
|
||||
MarianumMessageList get messageList;
|
||||
|
||||
/// Create a copy of MarianumMessageState
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@JsonKey(ignore: true)
|
||||
_$$MarianumMessageStateImplCopyWith<_$MarianumMessageStateImpl>
|
||||
get copyWith => throw _privateConstructorUsedError;
|
||||
}
|
||||
@@ -193,12 +178,8 @@ mixin _$MarianumMessageList {
|
||||
String get base => throw _privateConstructorUsedError;
|
||||
List<MarianumMessage> get messages => throw _privateConstructorUsedError;
|
||||
|
||||
/// Serializes this MarianumMessageList to a JSON map.
|
||||
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
|
||||
|
||||
/// Create a copy of MarianumMessageList
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@JsonKey(ignore: true)
|
||||
$MarianumMessageListCopyWith<MarianumMessageList> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
}
|
||||
@@ -222,8 +203,6 @@ class _$MarianumMessageListCopyWithImpl<$Res, $Val extends MarianumMessageList>
|
||||
// ignore: unused_field
|
||||
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')
|
||||
@override
|
||||
$Res call({
|
||||
@@ -262,8 +241,6 @@ class __$$MarianumMessageListImplCopyWithImpl<$Res>
|
||||
$Res Function(_$MarianumMessageListImpl) _then)
|
||||
: super(_value, _then);
|
||||
|
||||
/// Create a copy of MarianumMessageList
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@pragma('vm:prefer-inline')
|
||||
@override
|
||||
$Res call({
|
||||
@@ -317,14 +294,12 @@ class _$MarianumMessageListImpl implements _MarianumMessageList {
|
||||
const DeepCollectionEquality().equals(other._messages, _messages));
|
||||
}
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@JsonKey(ignore: true)
|
||||
@override
|
||||
int get hashCode => Object.hash(
|
||||
runtimeType, base, const DeepCollectionEquality().hash(_messages));
|
||||
|
||||
/// Create a copy of MarianumMessageList
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@JsonKey(ignore: true)
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
_$$MarianumMessageListImplCopyWith<_$MarianumMessageListImpl> get copyWith =>
|
||||
@@ -352,11 +327,8 @@ abstract class _MarianumMessageList implements MarianumMessageList {
|
||||
String get base;
|
||||
@override
|
||||
List<MarianumMessage> get messages;
|
||||
|
||||
/// Create a copy of MarianumMessageList
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@JsonKey(ignore: true)
|
||||
_$$MarianumMessageListImplCopyWith<_$MarianumMessageListImpl> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
}
|
||||
@@ -371,12 +343,8 @@ mixin _$MarianumMessage {
|
||||
String get date => throw _privateConstructorUsedError;
|
||||
String get url => throw _privateConstructorUsedError;
|
||||
|
||||
/// Serializes this MarianumMessage to a JSON map.
|
||||
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
|
||||
|
||||
/// Create a copy of MarianumMessage
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@JsonKey(ignore: true)
|
||||
$MarianumMessageCopyWith<MarianumMessage> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
}
|
||||
@@ -400,8 +368,6 @@ class _$MarianumMessageCopyWithImpl<$Res, $Val extends MarianumMessage>
|
||||
// ignore: unused_field
|
||||
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')
|
||||
@override
|
||||
$Res call({
|
||||
@@ -445,8 +411,6 @@ class __$$MarianumMessageImplCopyWithImpl<$Res>
|
||||
_$MarianumMessageImpl _value, $Res Function(_$MarianumMessageImpl) _then)
|
||||
: super(_value, _then);
|
||||
|
||||
/// Create a copy of MarianumMessage
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@pragma('vm:prefer-inline')
|
||||
@override
|
||||
$Res call({
|
||||
@@ -502,13 +466,11 @@ class _$MarianumMessageImpl implements _MarianumMessage {
|
||||
(identical(other.url, url) || other.url == url));
|
||||
}
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@JsonKey(ignore: true)
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType, name, date, url);
|
||||
|
||||
/// Create a copy of MarianumMessage
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@JsonKey(ignore: true)
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
_$$MarianumMessageImplCopyWith<_$MarianumMessageImpl> get copyWith =>
|
||||
@@ -538,11 +500,8 @@ abstract class _MarianumMessage implements MarianumMessage {
|
||||
String get date;
|
||||
@override
|
||||
String get url;
|
||||
|
||||
/// Create a copy of MarianumMessage
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@JsonKey(ignore: true)
|
||||
_$$MarianumMessageImplCopyWith<_$MarianumMessageImpl> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import 'package:dio/dio.dart';
|
||||
|
||||
import '../../../infrastructure/dataLoader/data_loader.dart';
|
||||
import '../../../infrastructure/dataLoader/http_data_loader.dart';
|
||||
import '../../../basis/dataloader/mhsl_data_loader.dart';
|
||||
import '../bloc/marianum_message_state.dart';
|
||||
|
||||
|
||||
@@ -4,7 +4,6 @@ import 'package:json_annotation/json_annotation.dart';
|
||||
import '../devTools/devToolsSettings.dart';
|
||||
import '../file/fileSettings.dart';
|
||||
import '../fileView/fileViewSettings.dart';
|
||||
import '../general/modulesSettings.dart';
|
||||
import '../holidays/holidaysSettings.dart';
|
||||
import '../notification/notificationSettings.dart';
|
||||
import '../talk/talkSettings.dart';
|
||||
@@ -21,7 +20,6 @@ class Settings {
|
||||
ThemeMode appTheme;
|
||||
bool devToolsEnabled;
|
||||
|
||||
ModulesSettings modulesSettings;
|
||||
TimetableSettings timetableSettings;
|
||||
TalkSettings talkSettings;
|
||||
FileSettings fileSettings;
|
||||
@@ -33,7 +31,6 @@ class Settings {
|
||||
Settings({
|
||||
required this.appTheme,
|
||||
required this.devToolsEnabled,
|
||||
required this.modulesSettings,
|
||||
required this.timetableSettings,
|
||||
required this.talkSettings,
|
||||
required this.fileSettings,
|
||||
|
||||
@@ -9,8 +9,6 @@ part of 'settings.dart';
|
||||
Settings _$SettingsFromJson(Map<String, dynamic> json) => Settings(
|
||||
appTheme: Settings._themeFromJson(json['appTheme'] as String),
|
||||
devToolsEnabled: json['devToolsEnabled'] as bool,
|
||||
modulesSettings: ModulesSettings.fromJson(
|
||||
json['modulesSettings'] as Map<String, dynamic>),
|
||||
timetableSettings: TimetableSettings.fromJson(
|
||||
json['timetableSettings'] as Map<String, dynamic>),
|
||||
talkSettings:
|
||||
@@ -30,7 +28,6 @@ Settings _$SettingsFromJson(Map<String, dynamic> json) => Settings(
|
||||
Map<String, dynamic> _$SettingsToJson(Settings instance) => <String, dynamic>{
|
||||
'appTheme': Settings._themeToJson(instance.appTheme),
|
||||
'devToolsEnabled': instance.devToolsEnabled,
|
||||
'modulesSettings': instance.modulesSettings.toJson(),
|
||||
'timetableSettings': instance.timetableSettings.toJson(),
|
||||
'talkSettings': instance.talkSettings.toJson(),
|
||||
'fileSettings': instance.fileSettings.toJson(),
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
import 'dart:async';
|
||||
import 'dart:convert';
|
||||
import 'dart:developer';
|
||||
import 'package:easy_debounce/easy_debounce.dart';
|
||||
@@ -14,8 +13,6 @@ class SettingsProvider extends ChangeNotifier {
|
||||
late SharedPreferences _storage;
|
||||
late Settings _settings = DefaultSettings.get();
|
||||
|
||||
final Completer<void> _populated = Completer();
|
||||
|
||||
Settings val({bool write = false}) {
|
||||
if(write) {
|
||||
notifyListeners();
|
||||
@@ -59,7 +56,6 @@ class SettingsProvider extends ChangeNotifier {
|
||||
}
|
||||
|
||||
notifyListeners();
|
||||
_populated.complete();
|
||||
}
|
||||
|
||||
Future<void> update() async {
|
||||
@@ -81,8 +77,4 @@ class SettingsProvider extends ChangeNotifier {
|
||||
|
||||
return mergedMap;
|
||||
}
|
||||
|
||||
Future<void> waitForPopulation() async {
|
||||
await _populated.future;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,19 +0,0 @@
|
||||
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);
|
||||
}
|
||||
@@ -1,35 +0,0 @@
|
||||
// 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',
|
||||
};
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user